libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / asm-scope-1.c
blob4a6189b9b36b03091333085cdd3b0e982c6ba075
1 /* Test :: token handling in asm. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=gnu23" } */
5 void
6 f (void)
8 asm ("");
9 asm ("" : );
10 asm ("" : :);
11 asm ("" ::);
12 asm ("" : : :);
13 asm ("" :: :);
14 asm ("" : ::);
15 asm goto ("" : : : : lab);
16 asm goto ("" :: : : lab);
17 asm goto ("" : :: : lab);
18 asm goto ("" : : :: lab);
19 asm goto ("" :: :: lab);
20 lab: ;
21 /* Test errors when :: is at the end of asm and only one : allowed. */
22 asm ("" : : ::); /* { dg-error "expected" } */
23 asm ("" :: ::); /* { dg-error "expected" } */
24 asm goto ("" : : : :: lab); /* { dg-error "expected" } */
25 asm goto ("" :: : :: lab); /* { dg-error "expected" } */
26 asm goto ("" : :: :: lab); /* { dg-error "expected" } */