mirror of
https://github.com/Noratrieb/rlo-issue-112061.git
synced 2026-01-14 16:35:04 +01:00
more
This commit is contained in:
parent
746b6d292e
commit
b0c723f2c2
1 changed files with 6 additions and 4 deletions
10
checkllvm.sh
10
checkllvm.sh
|
|
@ -4,11 +4,13 @@ set -eu
|
|||
|
||||
# rustc code.rs --crate-name ll -Zmir-enable-passes=-ConstProp --emit llvm-ir -Cno-prepopulate-passes --crate-type=lib
|
||||
|
||||
clang $1 helper.c -O1 -o good
|
||||
clang $1 helper.c -O2 -o bad
|
||||
d=$(mktemp -d)
|
||||
|
||||
bad=$(./bad)
|
||||
good=$(./good)
|
||||
clang $1 helper.c -O1 -o "$d/good"
|
||||
clang $1 helper.c -O2 -o "$d/bad"
|
||||
|
||||
bad=$("$d/bad")
|
||||
good=$("$d/good")
|
||||
|
||||
if [ "$good" != "$bad" ]; then
|
||||
echo "MISCOMPILATION"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue