gcc/testsuite/c-c++-common/toplevel-asm-7.c
raw| 1 | /* PR c/41045 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O0" } */ |
| 4 | /* { dg-additional-options "-fpic" { target fpic } } */ |
| 5 | |
| 6 | struct S { char a; long long b; int c; }; |
| 7 | enum E { E0, E1 = sizeof (struct S) + 15 }; |
| 8 | int v[42]; |
| 9 | void foo (void) {} |
| 10 | |
| 11 | asm ("# %0 %1 %2 %cc3 %cc4 %% %=" |
| 12 | :: "i" (sizeof (struct S)), |
| 13 | "i" (__builtin_offsetof (struct S, c)), |
| 14 | "i" (E1), |
| 15 | "-s" (foo), |
| 16 | "-i" (v)); |