diff options
-rwxr-xr-x | test/gourdinl/compare_pp.sh | 16 | ||||
-rw-r--r-- | test/gourdinl/postpass_exp.c | 5 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/gourdinl/compare_pp.sh b/test/gourdinl/compare_pp.sh new file mode 100755 index 00000000..09183cf9 --- /dev/null +++ b/test/gourdinl/compare_pp.sh @@ -0,0 +1,16 @@ +ffname=$(basename $1) +fname=${ffname%.*} +nopp=$fname.nopp.s +pp=$fname.pp.s + +../../ccomp -fno-coalesce-mem -fno-postpass -S $1 -o $nopp +../../ccomp -fno-coalesce-mem -fpostpass= list -S $1 -o $pp +sed -i '1,2d' $nopp +sed -i '1,2d' $pp +if cmp -s $nopp $pp; then + echo "same!" +else + echo "differents!" + diff -y $nopp $pp +fi + diff --git a/test/gourdinl/postpass_exp.c b/test/gourdinl/postpass_exp.c new file mode 100644 index 00000000..522ac2a6 --- /dev/null +++ b/test/gourdinl/postpass_exp.c @@ -0,0 +1,5 @@ +int main(int x, int y) { + int z = x << 32; + y = y - z; + return x + y; +} |