aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20030804-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20030804-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20030804-1.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20030804-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20030804-1.c
new file mode 100644
index 000000000..189fde3ce
--- /dev/null
+++ b/gcc-4.9/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);
+}
+