LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / asm-wide-1.c
blob88bbaed7f16a627bb382891ded3715346ab7ee7c
1 /* Wide string literals should not be allowed in asm. */
2 /* Origin: Joseph Myers <joseph@codesourcery.com> */
3 /* { dg-do compile } */
4 /* { dg-options "" } */
6 int foo asm (L"bar"); /* { dg-error "14:wide string literal in 'asm'" } */
8 asm (L"foo"); /* { dg-error "6:wide string literal in 'asm'" } */
10 void
11 f (void)
13 int x = 1;
14 asm (L"foo"); /* { dg-error "8:wide string literal in 'asm'" } */
15 asm ("foo" :
16 L"=g" (x)); /* { dg-error "8:wide string literal in 'asm'" } */
17 /* Extra errors from the substitution of "" for wide strings: */
18 /* { dg-error "output" "output" { target *-*-* } .-2 } */
19 asm ("foo" : [x]
20 L"=g" (x)); /* { dg-error "8:wide string literal in 'asm'" } */
21 /* { dg-error "output" "output" { target *-*-* } .-1 } */
22 asm ("foo" : [x] "=g" (x),
23 L"=g" (x)); /* { dg-error "8:wide string literal in 'asm'" } */
24 /* { dg-error "output" "output" { target *-*-* } .-1 } */
25 asm ("foo" : :
26 L"g" (x)); /* { dg-error "8:wide string literal in 'asm'" } */
27 asm ("foo" : : :
28 L"memory"); /* { dg-error "8:wide string literal in 'asm'" } */
29 asm ("foo" : : : "memory",
30 L"memory"); /* { dg-error "8:wide string literal in 'asm'" } */