aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40570.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40570.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40570.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40570.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40570.c
new file mode 100644
index 000000000..7c3f4d83b
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr40570.c
@@ -0,0 +1,22 @@
+extern void anything(int);
+
+static int foo(int i);
+
+static int bar(int i) { foo(i); }
+
+extern int j;
+
+static int foo(int i)
+{
+ if (j)
+ anything(j);
+ return bar(i);
+}
+
+int baz()
+{
+ foo(0);
+ if (baz())
+ return 1;
+ return 0;
+}