Closed
Description
The following test yields an ICE in trans
enum Foo {
IntVal(i32),
Int64Val(i64)
}
struct Bar {
i: i32,
v: Foo
}
static bar: Bar = Bar { i: 0, v: IntVal(0) };
fn main() {}
{ i32, { i32, i32, [8 x i8] } } { i32 0, { i32, i32, [8 x i8] } { i32 0, i32 0, [8 x i8] undef } }
{ i32, { i32, i64, [0 x i8] } } undef
error: internal compiler error: const expr(29: Bar{i: 0, v: IntVal(0),}) of type Bar has size 20 instead of 24
This error appears on arm target. and probably can appear on x86-32bit machine.