aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/pr43942.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/pr43942.c')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/pr43942.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/pr43942.c b/gcc-4.9/gcc/testsuite/c-c++-common/pr43942.c
new file mode 100644
index 000000000..3d97db662
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/pr43942.c
@@ -0,0 +1,33 @@
+/* PR debug/43942 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug" } */
+
+extern int f1 (int);
+
+int
+f2 (int x)
+{
+ extern int v;
+ return f1 (x);
+}
+
+void
+f3 (void)
+{
+ f2 (0);
+}
+
+static inline int
+f4 (int x)
+{
+ extern int w;
+ if (w)
+ return f1 (x);
+ return 0;
+}
+
+void
+f5 (void)
+{
+ f4 (0);
+}