summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-05-10 07:59:27 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-05-10 07:59:27 +0000
commitdf80f5b3745b5d85cbf42601f9532618c063d703 (patch)
tree0fd667c114e1788ad03cd2df90919ce168e41b7f /test
parent9c03226a7efab5642efd75a385c4ca439e3dde74 (diff)
Another regression
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1344 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test')
-rw-r--r--test/regression/Makefile2
-rw-r--r--test/regression/Results/casts11
-rw-r--r--test/regression/casts1.c8
3 files changed, 10 insertions, 1 deletions
diff --git a/test/regression/Makefile b/test/regression/Makefile
index f8d2b87..4581bac 100644
--- a/test/regression/Makefile
+++ b/test/regression/Makefile
@@ -8,7 +8,7 @@ LIBS=$(LIBMATH)
# Can run and have reference output in Results
TESTS=bitfields1 bitfields2 bitfields3 expr1 initializers volatile2 \
- funct3 expr5 struct7 struct8
+ funct3 expr5 struct7 struct8 casts1
# Other tests: should compile to .s without errors (but expect warnings)
EXTRAS=commaprec expr2 expr3 expr4 extern1 funct2 funptr1 init1 \
diff --git a/test/regression/Results/casts1 b/test/regression/Results/casts1
new file mode 100644
index 0000000..7a53b35
--- /dev/null
+++ b/test/regression/Results/casts1
@@ -0,0 +1 @@
+65535
diff --git a/test/regression/casts1.c b/test/regression/casts1.c
new file mode 100644
index 0000000..3496222
--- /dev/null
+++ b/test/regression/casts1.c
@@ -0,0 +1,8 @@
+#include <stdio.h>
+
+int main(void)
+{
+ unsigned short p_69 = (signed char) (-1);
+ printf("%d\n", p_69);
+ return 0;
+}