]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/extern_static_wrong_size.rs
Add 'src/tools/miri/' from commit '75dd959a3a40eb5b4574f8d2e23aa6efbeb33573'
[rust.git] / src / tools / miri / 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 }