aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gcc.dg/torture/pr59715.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.dg/torture/pr59715.c')
-rw-r--r--gcc-4.8/gcc/testsuite/gcc.dg/torture/pr59715.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.dg/torture/pr59715.c b/gcc-4.8/gcc/testsuite/gcc.dg/torture/pr59715.c
new file mode 100644
index 000000000..19c09de55
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gcc.dg/torture/pr59715.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int a = 2, b;
+
+int
+main ()
+{
+ int c;
+ if (!b)
+ {
+ b = a;
+ c = a == 0 ? 1 : 1 % a;
+ if (c)
+ b = 0;
+ }
+ if (b != 0)
+ abort ();
+ return 0;
+}