diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/old-style-asm-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/old-style-asm-1.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/old-style-asm-1.c b/gcc/testsuite/gcc.dg/old-style-asm-1.c new file mode 100644 index 0000000..006cf09 --- /dev/null +++ b/gcc/testsuite/gcc.dg/old-style-asm-1.c @@ -0,0 +1,19 @@ +/* PR inline-asm/8832 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +/* Verify that GCC doesn't optimize + old style asm instructions. */ + +void foo(int v) +{ + if (v) + asm ("dummy1"); + + asm ("dummy2"); + + if (v) + asm ("dummy3"); +} + +/* { dg-final { scan-assembler "L2" } } */ |