OSDN Git Service

* gcc.dg/special/ecos.exp (gcsec-1.c): Find linker used by gcc.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / old-style-asm-1.c
1 /* PR inline-asm/8832 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4
5 /* Verify that GCC doesn't optimize
6    old style asm instructions.  */
7
8 void foo(int v)
9 {
10   if (v)
11     asm ("dummy1");
12
13   asm ("dummy2");
14
15   if (v)
16     asm ("dummy3");
17 }
18
19 /* The purpose of the test below is to check that there are two branches
20    in the generated code, supposedly corresponding to the if-statements.
21    Warning: this is fragile and assumes that one of the generated labels
22    for the branches matches the string "L2", or as with
23    mmix-knuth-mmixware, "L:2".  That assumption is generally invalid,
24    because for example it depends on the target macro
25    ASM_GENERATE_INTERNAL_LABEL to generate a name matching this regexp (as
26    with the default definition).  */
27 /* { dg-final { scan-assembler "L(:|\\\$0*)?2" } } */