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