add a test

This commit is contained in:
Ralf Jung 2022-08-26 11:04:13 -04:00
parent b85178a5fc
commit 468c617c21

View File

@ -0,0 +1,17 @@
// check-pass
// compile-flags: -Zextra-const-ub-checks
#[repr(packed)]
pub struct Foo {
bar: u8,
baa: [u32; 1],
}
const FOOMP: Foo = Foo {
bar: 0,
baa: [69; 1],
};
fn main() {
let _val = FOOMP;
}