mirror of
https://github.com/Noratrieb/rlo-issue-112061.git
synced 2026-01-14 16:35:04 +01:00
15 lines
No EOL
318 B
Bash
Executable file
15 lines
No EOL
318 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
rustc code.rs --crate-name ll -Zmir-enable-passes=-ConstProp --emit llvm-ir -Cno-prepopulate-passes --crate-type=lib
|
|
|
|
clang ll.ll helper.c -O1 -o good
|
|
clang ll.ll helper.c -O2 -o bad
|
|
|
|
bad=$(./bad)
|
|
good=$(./good)
|
|
|
|
if [ "$good" != "$bad" ]; then
|
|
echo "MISCOMPILATION"
|
|
else
|
|
echo "no repro"
|
|
fi |