Skip to content

Assert failure when aliasing a variable with a given address #142

@undisbeliever

Description

@undisbeliever

Minimal reproducible test case:

bank ram      @  0x200  : [vardata;    0x600];
bank code     @ 0x8000  : [constdata; 0x8000];

var byteVariable @ 0x1234 : u8;

in code {
    var test : u8 in byteVariable;
}
* wiz: version 0.1.2 (alpha)
>> Parsing...
>> Compiling...
wiz: src/wiz/utility/optional.h:112: T& wiz::Optional<T>::get() & [with T = long unsigned int]: Assertion `hasValue_' failed.

The test will compile successfully (with test pointing to the correct address) if the in code { line is replaced with in ram {.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions