aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/pr46909-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/pr46909-1.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/pr46909-1.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/pr46909-1.c b/SingleSource/Regression/C/gcc-c-torture/execute/pr46909-1.c
new file mode 100644
index 00000000..c6c92fcb
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/pr46909-1.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/46909 */
+
+extern void abort ();
+
+int
+__attribute__ ((__noinline__))
+foo (unsigned int x)
+{
+ if (! (x == 4 || x == 6) || (x == 2 || x == 6))
+ return 1;
+ return -1;
+}
+
+int
+main ()
+{
+ int i;
+ for (i = -10; i < 10; i++)
+ if (foo (i) != 1 - 2 * (i == 4))
+ abort ();
+ return 0;
+}