aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr58340.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr58340.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr58340.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr58340.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr58340.c
new file mode 100644
index 000000000..ca3ccda0a
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr58340.c
@@ -0,0 +1,16 @@
+int a, b, c, d;
+
+int foo (int x, int y)
+{
+ return y == 0 ? x : 1 % y;
+}
+
+int main ()
+{
+ c = 0 || a;
+
+ for (;;)
+ b = foo (d, c) && 1;
+
+ return 0;
+}