aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gcc.c-torture/execute/pr58831.c
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-06-20 13:50:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-06-20 02:04:52 +0000
commit3c447213baf828ebd01c45ad459552b3c9922c92 (patch)
tree198ed6386925c6ff5c24faf686b836aa74082836 /gcc-4.8/gcc/testsuite/gcc.c-torture/execute/pr58831.c
parente1be674a8e345aaa025ad9f1d38bab4272301e1d (diff)
parentf190d6284359da8ae8694b2d2e14b01602a959ed (diff)
downloadtoolchain_gcc-3c447213baf828ebd01c45ad459552b3c9922c92.tar.gz
toolchain_gcc-3c447213baf828ebd01c45ad459552b3c9922c92.tar.bz2
toolchain_gcc-3c447213baf828ebd01c45ad459552b3c9922c92.zip
Merge "Merge GCC 4.8.3"
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.c-torture/execute/pr58831.c')
-rw-r--r--gcc-4.8/gcc/testsuite/gcc.c-torture/execute/pr58831.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.c-torture/execute/pr58831.c b/gcc-4.8/gcc/testsuite/gcc.c-torture/execute/pr58831.c
new file mode 100644
index 000000000..a40cd54d2
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gcc.c-torture/execute/pr58831.c
@@ -0,0 +1,40 @@
+#include <assert.h>
+
+int a, *b, c, d, f, **i, p, q, *r;
+short o, j;
+
+static int __attribute__((noinline, noclone))
+fn1 (int *p1, int **p2)
+{
+ int **e = &b;
+ for (; p; p++)
+ *p1 = 1;
+ *e = *p2 = &d;
+
+ assert (r);
+
+ return c;
+}
+
+static int ** __attribute__((noinline, noclone))
+fn2 (void)
+{
+ for (f = 0; f != 42; f++)
+ {
+ int *g[3] = {0, 0, 0};
+ for (o = 0; o; o--)
+ for (; a > 1;)
+ {
+ int **h[1] = { &g[2] };
+ }
+ }
+ return &r;
+}
+
+int
+main (void)
+{
+ i = fn2 ();
+ fn1 (b, i);
+ return 0;
+}