1 static void foo(void)
   2 {
   3         asm("");
   4         asm volatile ("v");
   5         asm inline ("i");
   6         asm volatile inline ("vi");
   7         asm inline volatile ("iv");
   8 
   9         asm goto ("g" :::: label);
  10         asm volatile goto ("vg" :::: label);
  11         asm inline goto ("ig" :::: label);
  12         asm volatile inline goto ("vig" :::: label);
  13         asm inline volatile goto ("ivg" :::: label);
  14 
  15         asm goto volatile ("gv" :::: label);
  16         asm goto inline ("gi" :::: label);
  17         asm goto volatile inline ("gvi" :::: label);
  18         asm goto inline volatile ("giv" :::: label);
  19         asm volatile goto inline ("vgi" :::: label);
  20         asm inline goto volatile ("giv" :::: label);
  21 
  22         // warn on duplicates
  23         asm volatile volatile ("vv");
  24         asm inline inline ("ii");
  25         asm goto goto ("gg" :::: label);
  26 
  27         asm inline volatile inline ("ivi");
  28         asm inline goto inline ("igi" :::: label);
  29         asm goto inline goto ("gig" :::: label);
  30         asm goto volatile goto ("gvg" :::: label);
  31         asm volatile inline volatile ("viv");
  32         asm volatile goto volatile ("vgv" :::: label);
  33 
  34 label:
  35         ;
  36 }
  37 
  38 /*
  39  * check-name: asm-inline
  40  *
  41  * check-error-start
  42 asm-inline.c:23:22: warning: duplicated asm modifier
  43 asm-inline.c:24:20: warning: duplicated asm modifier
  44 asm-inline.c:25:18: warning: duplicated asm modifier
  45 asm-inline.c:27:29: warning: duplicated asm modifier
  46 asm-inline.c:28:25: warning: duplicated asm modifier
  47 asm-inline.c:29:25: warning: duplicated asm modifier
  48 asm-inline.c:30:27: warning: duplicated asm modifier
  49 asm-inline.c:31:29: warning: duplicated asm modifier
  50 asm-inline.c:32:27: warning: duplicated asm modifier
  51  * check-error-end
  52  */