aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr20412.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr20412.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr20412.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr20412.c b/gcc/testsuite/gcc.c-torture/compile/pr20412.c
new file mode 100644
index 00000000000..c0feecf3d43
--- /dev/null
+++ b/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;
+}