diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/20030804-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20030804-1.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20030804-1.c b/gcc/testsuite/gcc.c-torture/compile/20030804-1.c new file mode 100644 index 000000000..189fde3ce --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20030804-1.c @@ -0,0 +1,9 @@ +/* Extracted from PR middle-end/11771. */ +/* The following testcase used to ICE without -ffast-math from unbounded + recursion in fold. This was due to the logic in negate_expr_p not + matching that in negate_expr. */ + +double f(double x) { + return -(1 - x) + (x ? -(1 - x) : 0); +} + |