E6007
E6007 — AMemorysub-space'scapacityexceeds its parent's capacity (a child cannot be larger than what contains it).
What the compiler reports
E6007
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 sub-space cannot be larger than the space that contains it (E6007).
//
Memory SmemBlk {
capacity: 228 KiB
}
Memory TooBig {
within: Memory::SmemBlk, capacity: 512 KiB
}
fn main() -> i32 {
return 0;
}
From tests/frontend/fail/memory_capacity_exceeds_parent.vx, which asserts this diagnostic on every commit.
Related
Topologies and memoryThe chapter covering the rule this code enforces.
All diagnosticsEvery code the compiler can emit, grouped by stage.
E6006A
Memory declaration's within: hierarchy forms a cycle (a space contains itself).
E6008A Memory declaration has a non-positive capacity, bandwidth, or granule.