aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr42299.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr42299.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr42299.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr42299.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr42299.c
new file mode 100644
index 000000000..5a9199f27
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr42299.c
@@ -0,0 +1,23 @@
+/* { dg-options "-g" } */
+
+static int
+foo (int x, int y)
+{
+ if (y)
+ goto lab;
+ if (x)
+ y = 0;
+ if (y)
+ goto lab;
+ y = 0;
+lab:
+ return y;
+}
+
+void
+baz (int x, int y)
+{
+ y = foo (x, y);
+ if (y != 0)
+ bar ();
+}