diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-05-19 07:57:29 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-05-19 07:57:29 +0000 |
commit | 0d27eae0b07c7c46cb7d4e6d7b0b1145dbdab0c3 (patch) | |
tree | 7fdacd8abd518194cc5b05f1aa614c646e635805 /test/regression/seqops.c | |
parent | a3f1744823d6dbeaf400812de86263fb615bbbba (diff) | |
download | compcert-0d27eae0b07c7c46cb7d4e6d7b0b1145dbdab0c3.tar.gz compcert-0d27eae0b07c7c46cb7d4e6d7b0b1145dbdab0c3.zip |
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/regression/seqops.c')
-rw-r--r-- | test/regression/seqops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/regression/seqops.c b/test/regression/seqops.c index c9ee5497..0e310909 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); +} |