diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr42299.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr42299.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr42299.c b/gcc/testsuite/gcc.c-torture/compile/pr42299.c new file mode 100644 index 000000000..5a9199f27 --- /dev/null +++ b/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 (); +} |