aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/csmith/reduce/reduce.sh
diff options
context:
space:
mode:
authorDavid Monniaux <David.Monniaux@univ-grenoble-alpes.fr>2021-09-23 18:32:53 +0200
committerDavid Monniaux <David.Monniaux@univ-grenoble-alpes.fr>2021-09-23 18:32:53 +0200
commit87e3508310e3e312e26f7d69357289a99242e243 (patch)
treef859db7e337dd74ce136509504397a1faf5ed792 /test/monniaux/csmith/reduce/reduce.sh
parent2a0096bc0c6057577f10d6343063d9eca76cbdea (diff)
parente893a80b4e9add0b765416ad9514d31e10131a73 (diff)
downloadcompcert-kvx-87e3508310e3e312e26f7d69357289a99242e243.tar.gz
compcert-kvx-87e3508310e3e312e26f7d69357289a99242e243.zip
Merge branch 'csmith' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert into csmith
Diffstat (limited to 'test/monniaux/csmith/reduce/reduce.sh')
-rwxr-xr-xtest/monniaux/csmith/reduce/reduce.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/monniaux/csmith/reduce/reduce.sh b/test/monniaux/csmith/reduce/reduce.sh
new file mode 100755
index 00000000..d8df11a5
--- /dev/null
+++ b/test/monniaux/csmith/reduce/reduce.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+INCLUDE=-I$COMPCERT/test/monniaux/csmith/csmith/include/csmith-2.3.0
+if kvx-cos-gcc $INCLUDE -Werror=uninitialized -Werror=implicit source.c -o source.gcc.target && kvx-cluster -- source.gcc.target >& source.gcc.log
+then
+ if $COMPCERT/ccomp $INCLUDE -fall -fno-cse -fno-cse2 -fno-cse3 source.c -o source.ccomp.target
+ then
+ kvx-cluster -- source.ccomp.target >& source.ccomp.log
+ grep OPCODE source.ccomp.log
+ else
+ exit 2
+ fi
+else
+ exit 1
+fi
+