]> git.lizzy.rs Git - rust.git/blob - tests/fail/extern_static_wrong_size.rs
check for extern static size mismatches
[rust.git] / tests / fail / extern_static_wrong_size.rs
1 //@ only-target-linux: we need a specific extern supported on this target
2 //@normalize-stderr-test: "[48] bytes" -> "N bytes"
3
4 extern "C" {
5     static mut environ: i8;
6 }
7
8 fn main() {
9     let _val = unsafe { environ }; //~ ERROR: /has been declared with a size of 1 bytes and alignment of 1 bytes, but Miri emulates it via an extern static shim with a size of [48] bytes and alignment of [48] bytes/
10 }