1 // Test that asm-qualifiers are not allowed on toplevel asm.
3 // { dg-options "-std=gnu++98" }
5 asm const (""); // { dg-error {'const' is not an 'asm' qualifier} }
6 asm volatile (""); // { dg-warning {'asm' qualifier 'volatile' ignored outside of function body} }
7 asm restrict (""); // { dg-error {expected '\(' before 'restrict'} }
8 asm inline (""); // { dg-error {'asm' qualifier outside of function body} }
9 asm goto (""); // { dg-error {'asm' qualifier outside of function body} }
11 // There are many other things wrong with this code, so:
12 // { dg-excess-errors "" }