aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr58018.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/torture/pr58018.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/torture/pr58018.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr58018.c b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr58018.c
new file mode 100644
index 000000000..52c8e83fa
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr58018.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/58018 */
+/* { dg-do compile } */
+
+int a, b, c, d, e;
+
+void
+bar (int p)
+{
+ int f = b;
+ e &= p <= (f ^= 0);
+}
+
+void
+foo ()
+{
+ for (; d; d++)
+ {
+ bar (a && c);
+ bar (0);
+ bar (1);
+ }
+}