blob: 6439104e5791cf5f709ed7290cd8383e1fbe9051 [file] [log] [blame]
/* Test :: token handling in asm. */
/* { dg-do compile } */
/* { dg-options "-std=gnu2x" } */
void
f (void)
{
asm ("");
asm ("" : );
asm ("" : :);
asm ("" ::);
asm ("" : : :);
asm ("" :: :);
asm ("" : ::);
asm goto ("" : : : : lab);
asm goto ("" :: : : lab);
asm goto ("" : :: : lab);
asm goto ("" : : :: lab);
asm goto ("" :: :: lab);
lab: ;
/* Test errors when :: is at the end of asm and only one : allowed. */
asm ("" : : ::); /* { dg-error "expected" } */
asm ("" :: ::); /* { dg-error "expected" } */
asm goto ("" : : : :: lab); /* { dg-error "expected" } */
asm goto ("" :: : :: lab); /* { dg-error "expected" } */
asm goto ("" : :: :: lab); /* { dg-error "expected" } */
}