some UB gets masked by optimizations

This commit is contained in:
Ralf Jung 2020-04-18 09:15:59 +02:00
parent c6ab27577b
commit 0345ee42da
3 changed files with 6 additions and 5 deletions

View file

@ -1,5 +1,5 @@
// should find the bug even without these
// compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
// should find the bug even without these, but gets masked by optimizations
// compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows -Zmir-opt-level=0
struct SliceWithHead(u8, [u8]);

View file

@ -1,5 +1,5 @@
// should find the bug even without these
// compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows
// should find the bug even without these, but gets masked by optimizations
// compile-flags: -Zmiri-disable-validation -Zmiri-disable-stacked-borrows -Zmir-opt-level=0
#[repr(align(256))]
#[derive(Debug)]

View file

@ -1,4 +1,5 @@
// compile-flags: -Zmir-opt-level=1
// gets masked by optimizations
// compile-flags: -Zmir-opt-level=0
#![feature(rustc_attrs)]
#![allow(unused_attributes)]