diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/debug-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/debug-2.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/debug-2.c b/gcc/testsuite/gcc.dg/debug-2.c new file mode 100644 index 0000000..4305059 --- /dev/null +++ b/gcc/testsuite/gcc.dg/debug-2.c @@ -0,0 +1,20 @@ +/* Verify that the scheduler does not discard the lexical block. */ +/* { dg-do compile } */ +/* { dg-options "-O2 -g -dA" } */ +/* { dg-final { scan-assembler "xyzzy" } } */ + +long foo(long p) +{ + if (1) + { + long xyzzy = 0; + if (p) + xyzzy = 2; + return xyzzy; + } + else + { + int x = 0; + return x; + } +} |