]>
Commit | Line | Data |
---|---|---|
93313b94 JM |
1 | /* Test :: token handling in asm. */ |
2 | /* { dg-do compile } */ | |
3 | /* { dg-options "-std=gnu2x" } */ | |
4 | ||
5 | void | |
6 | f (void) | |
7 | { | |
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" } */ | |
27 | } |