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