aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr20412.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr20412.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr20412.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr20412.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr20412.c
new file mode 100644
index 000000000..a165a921a
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr20412.c
@@ -0,0 +1,20 @@
+int
+foo(void)
+{
+ int a,b,g;
+ int i,len;
+ int stop;
+
+ len = 10;
+ stop = 0;
+ for (i=0; i<len; i++)
+ {
+ a = bar1() ? 0 : 1;
+ b = bar2() ? 0 : 1;
+ g = bar3() ? 0 : 1;
+
+ if (stop = ((a+b) % 2 != g)) break;
+ }
+
+ return stop;
+}