E6035

E6035 — A Memory declaration's within: names a space that is not built in, and that the program and its machine files do not declare. A typo in the name is the usual cause.

What the compiler reports

E6035{{.*}}memory space 'Typo' is `within: Memory::SmemBlck`, but the program and its machine files declare no memory space 'SmemBlck'

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
//
// A `within:` must name a built-in space or a declared one (E6035). `Memory::SmemBlck` is a
// typo for `SmemBlk`. `Inner` is within the declared `SmemBlk`, and `OnTheGpu` within the
// built-in `GPU_HBM`, so neither gets an error.
//

Memory SmemBlk {
  capacity: 228 KiB
}
Memory Typo {
  within: Memory::SmemBlck, capacity: 64 KiB
}
Memory Inner {
  within: Memory::SmemBlk, capacity: 64 KiB
}
Memory OnTheGpu {
  within: Memory::GPU_HBM, capacity: 64 KiB
}

fn main() -> i32 {
  return 0;
}

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

Related