gcc/testsuite/g++.dg/asm-qual-1.C
raw| 1 | // Test that qualifiers other than volatile are disallowed on asm. |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-std=gnu++98" } |
| 4 | |
| 5 | void |
| 6 | f () |
| 7 | { |
| 8 | asm volatile (""); |
| 9 | |
| 10 | asm const (""); // { dg-error {'const' is not an 'asm' qualifier} } |
| 11 | |
| 12 | asm __restrict (""); // { dg-error {'__restrict' is not an 'asm' qualifier} } |
| 13 | } |