]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/sanitize/new-llvm-pass-manager-thin-lto.rs
1 // Regression test for sanitizer function instrumentation passes not
2 // being run when compiling with new LLVM pass manager and ThinLTO.
3 // Note: The issue occurred only on non-zero opt-level.
5 // needs-sanitizer-support
6 // needs-sanitizer-address
9 // revisions: opt0 opt1
10 // compile-flags: -Zsanitizer=address -Clto=thin
11 //[opt0]compile-flags: -Copt-level=0
12 //[opt1]compile-flags: -Copt-level=1
14 // error-pattern: ERROR: AddressSanitizer: stack-use-after-scope
16 static mut P
: *mut usize = std
::ptr
::null_mut();
24 std
::ptr
::write_volatile(P
, 123);