summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-05-19 07:57:29 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-05-19 07:57:29 +0000
commit0d27eae0b07c7c46cb7d4e6d7b0b1145dbdab0c3 (patch)
tree7fdacd8abd518194cc5b05f1aa614c646e635805 /test
parenta3f1744823d6dbeaf400812de86263fb615bbbba (diff)
Issue with simplification of nested ?: expressions of different types.
(Ill-typed Clight/Cminor/RTL code was generated due to incorrect reuse of destination temporary.) git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2257 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test')
-rw-r--r--test/regression/seqops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/regression/seqops.c b/test/regression/seqops.c
index c9ee549..0e31090 100644
--- a/test/regression/seqops.c
+++ b/test/regression/seqops.c
@@ -85,3 +85,9 @@ int mixed4l(int x, int y, int z, int u) { return ((f(x) && f(y)) || f(z)) && f(u
int mixed4r(int x, int y, int z, int u) { return f(x) && (f(y) || (f(z) && f(u))); }
int mixed4b(int x, int y, int z, int u) { return (f(x) && f(y)) || (f(z) && f(u)); }
+
+/* This caused a RTL type error in CompCert 1.11 and 1.12 */
+double cond2(int x)
+{
+ return x == 0 ? 3.1415 : (x > 0 ? 1 : -1);
+}