Skip to content

Constant expression for smallest i32 emits undef #34

@ergawy

Description

@ergawy

The following code:

extern "C" {
    fn print_int(i32) -> ();
}

fn main() -> i32 {
    let test : i32 = 1 << 31;
    print_int(test);

    0
}

emits test value as undef while it should be the smallest i32 value.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions