aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr61681.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/torture/pr61681.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/torture/pr61681.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr61681.c b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr61681.c
new file mode 100644
index 000000000..226de0c1a
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr61681.c
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int a = 1, *e = &a, **f = &e, *l, *p, j;
+static int b;
+long d;
+short g;
+
+void
+fn1 (int *p)
+{
+ int m;
+ if (!(*p & j))
+ {
+ int *n = &m;
+ for (d = 6; d; d--)
+ {
+ for (g = 0; g < 1; g++)
+ {
+ n = l = *f;
+ b = *p;
+ }
+ *n = 0;
+ }
+ }
+}
+
+int
+main ()
+{
+ p = *f;
+ fn1 (p);
+ if (b != 0)
+ abort ();
+ return 0;
+}