Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/pr27671-1.c

raw
1 /* PR rtl-optimization/27671.
2 The combiner used to simplify "a ^ b == a" to "a" via
3 simplify_relational_operation_1 in simplify-rtx.c. */
4
5 extern void abort (void) __attribute__ ((noreturn));
6 extern void exit (int) __attribute__ ((noreturn));
7
8 static int __attribute__((noinline))
9 foo (int a, int b)
10 {
11 int c = a ^ b;
12 if (c == a)
13 abort ();
14 }
15
16 int
17 main (void)
18 {
19 foo (0, 1);
20 exit (0);
21 }