aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/csmith/reduce/reduce.sh
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2021-09-19 09:59:03 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2021-09-19 09:59:03 +0200
commita4c242f24d02bc69853b21071bc34beff8f31d3b (patch)
tree2ffb7a42c46c21683c9298e2771dbc550a866a3b /test/monniaux/csmith/reduce/reduce.sh
parent124cd837a591df308221f236810c7f66847b1abe (diff)
downloadcompcert-kvx-a4c242f24d02bc69853b21071bc34beff8f31d3b.tar.gz
compcert-kvx-a4c242f24d02bc69853b21071bc34beff8f31d3b.zip
creduce scripts
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
+