aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/asm-qual-1.c
blob: 7e216877637a2b0005a94b678217491fdc64af92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Test that qualifiers other than volatile are disallowed on asm.  */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-options "-std=gnu99" } */

void
f (void)
{
  asm volatile ("");

  asm const (""); /* { dg-error {'const' is not a valid 'asm' qualifier} } */

  asm restrict (""); /* { dg-error {'restrict' is not a valid 'asm' qualifier} } */
}