aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr38807.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr38807.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr38807.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr38807.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr38807.c
new file mode 100644
index 000000000..8b05d08aa
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr38807.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/38807 */
+
+int
+baz (short x)
+{
+ return x;
+}
+
+int a, b;
+
+int
+bar (int x)
+{
+ if (baz (a ^ x ^ a))
+ return b;
+ return 0;
+}
+
+int
+foo (void)
+{
+ return bar (a == 0 || 1 == 1 - a) ? 1 : bar (1 && a);
+}