This commit is contained in:
nora 2023-05-30 16:46:04 +02:00
parent 096d0e78ac
commit aa0f9c3553
3 changed files with 10 additions and 2 deletions

View file

@ -2,6 +2,14 @@
rustc code.rs --crate-name ll -Zmir-enable-passes=-ConstProp --emit llvm-ir -Cno-prepopulate-passes --crate-type=lib rustc code.rs --crate-name ll -Zmir-enable-passes=-ConstProp --emit llvm-ir -Cno-prepopulate-passes --crate-type=lib
clang ll.ll helper.c clang ll.ll helper.c -O1 -o good
clang ll.ll helper.c -O2 -o bad
./a.out bad=$(./bad)
good=$(./good)
if [ "$good" != "$bad" ]; then
echo "MISCOMPILATION"
else
echo "no repro"
fi

BIN
llbad Executable file

Binary file not shown.

BIN
llgood Executable file

Binary file not shown.