1 extern char string[]; 2 extern int *var; 3 templ(void)4static void templ(void) 5 { 6 asm(string); 7 } 8 ocons(void)9static void ocons(void) 10 { 11 asm("template" : [out] string (var) : [in] "r" (0)); 12 } 13 icons(void)14static void icons(void) 15 { 16 asm("template" : [out] "=r" (var): [in] string (0)); 17 } 18 oexpr(void)19static void oexpr(void) 20 { 21 asm("template" : [out] "=" (var[) : [in] "r" (0)); 22 } 23 iexpr(void)24static void iexpr(void) 25 { 26 asm("template" : [out] "=r" (var) : [in] "r" (var[)); 27 } 28 29 /* 30 * check-name: asm-bad0 31 * 32 * check-error-start 33 asm-bad0.c:6:13: error: string literal expected for inline asm 34 asm-bad0.c:11:32: error: string literal expected for asm constraint 35 asm-bad0.c:16:49: error: string literal expected for asm constraint 36 asm-bad0.c:21:41: error: Expected ] at end of array dereference 37 asm-bad0.c:21:41: error: got ) 38 asm-bad0.c:26:59: error: Expected ] at end of array dereference 39 asm-bad0.c:26:59: error: got ) 40 * check-error-end 41 */ 42