From 0d27eae0b07c7c46cb7d4e6d7b0b1145dbdab0c3 Mon Sep 17 00:00:00 2001 From: xleroy Date: Sun, 19 May 2013 07:57:29 +0000 Subject: 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 --- test/regression/seqops.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') 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); +} -- cgit v1.2.3