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