1 /* Test error conditions of asm flag outputs. */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
4
5 void f_B(void) { _Bool x; asm("" : "=@cccc"(x)); }
6 void f_c(void) { char x; asm("" : "=@cccc"(x)); }
7 void f_s(void) { short x; asm("" : "=@cccc"(x)); }
8 void f_i(void) { int x; asm("" : "=@cccc"(x)); }
9 void f_l(void) { long x; asm("" : "=@cccc"(x)); }
10 void f_ll(void) { long long x; asm("" : "=@cccc"(x)); }
11
12 void f_f(void)
13 {
14 float x;
15 asm("" : "=@cccc"(x)); /* { dg-error invalid type } */
16 }
17
18 void f_d(void)
19 {
20 double x;
21 asm("" : "=@cccc"(x)); /* { dg-error invalid type } */
22 }
23
24 struct S { int x[3]; };
25
26 void f_S(void)
27 {
28 struct S x;
29 asm("" : "=@cccc"(x)); /* { dg-error invalid type } */
30 }