Skip to content

Commit

Permalink
add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 26, 2022
1 parent b85178a commit 468c617
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/ui/consts/extra-const-ub/issue-101034.rs
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 468c617

Please sign in to comment.