summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr27671-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr27671-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr27671-2.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr27671-2.c b/gcc/testsuite/gcc.dg/pr27671-2.c
new file mode 100644
index 000000000..78820427b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr27671-2.c
@@ -0,0 +1,24 @@
+/* PR rtl-optimization/27671.
+ The combiner used to simplify "a ^ b == a" to "a" via
+ simplify_relational_operation_1 in simplify-rtx.c. */
+/* { dg-do run } */
+/* { dg-options "-O1" } */
+/* { dg-options "-O1 -march=pentium4" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+
+extern void abort (void) __attribute__ ((noreturn));
+extern void exit (int) __attribute__ ((noreturn));
+
+static void __attribute__ ((noinline))
+bar (int k)
+{
+ int n = k % 2;
+ if (n == 0)
+ abort ();
+}
+
+int
+main (void)
+{
+ bar (1);
+ exit (0);
+}