E6025

E6025 — A placement naming a location the machine does not have: a memory space no declared topology holds, written either as the space or as the device that would hold it. The derivation between the two spellings has a like-named fallback, so an undeclared name resolves to a space that exists only in the placement that mentions it.

What the compiler reports

Error[E6025]: `Memory::M` in function 'no_parameter' names no location: no declared topology holds `Memory::M`

The fragments the test suite holds the compiler to. An ellipsis marks text the test does not constrain; the emitted message also carries a source location.

A program that triggers it

//
// Part of the Vx Project, under the Apache License v2.0 with LLVM Exceptions.
// See LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// `Memory::M` names a memory parameter only in a function with `<M : Memory>`. In any other
// function it must name a memory, and the machine has no memory called `M`.
//

fn with_parameter<M : Memory>(t : &Tensor<i32, [?], Memory::M>) -> i32 {
  return t[0];
}

fn no_parameter(t : &Tensor<i32, [?], Memory::M>) -> i32 {
  return t[0];
}

fn main() -> i32 {
  let h = Tensor<i32, [2]>::fill(3);
  return with_parameter(&h);
}

From tests/frontend/fail/memory_variable_without_a_parameter.vx, which asserts this diagnostic on every commit.

Related