| 1 |
/* { dg-do run { target { riscv_v } } } */ |
| 2 |
/* { dg-additional-options "-std=c99 -O3 -fno-vect-cost-model" } */ |
| 3 |
|
| 4 |
int printf(char *, ...); |
| 5 |
int a, l, i, p, q, t, n, o; |
| 6 |
int *volatile c; |
| 7 |
static int j; |
| 8 |
static struct pack_1_struct d; |
| 9 |
long e; |
| 10 |
char m = 5; |
| 11 |
short s; |
| 12 |
|
| 13 |
#pragma pack(1) |
| 14 |
struct pack_1_struct { |
| 15 |
long c; |
| 16 |
int d; |
| 17 |
int e; |
| 18 |
int f; |
| 19 |
int g; |
| 20 |
int h; |
| 21 |
int i; |
| 22 |
} h, r = {1}, *f = &h, *volatile g; |
| 23 |
|
| 24 |
void add_em_up(int count, ...) { |
| 25 |
__builtin_va_list ap; |
| 26 |
__builtin_va_start(ap, count); |
| 27 |
__builtin_va_end(ap); |
| 28 |
} |
| 29 |
|
| 30 |
int main() { |
| 31 |
int u; |
| 32 |
j = 0; |
| 33 |
|
| 34 |
for (; j < 9; ++j) { |
| 35 |
u = ++t ? a : 0; |
| 36 |
if (u) { |
| 37 |
int *v = &d.d; |
| 38 |
*v = g || e; |
| 39 |
*c = 0; |
| 40 |
*f = h; |
| 41 |
} |
| 42 |
s = l && c; |
| 43 |
o = i; |
| 44 |
d.f || (p = 0); |
| 45 |
q |= n; |
| 46 |
} |
| 47 |
|
| 48 |
r = *f; |
| 49 |
|
| 50 |
add_em_up(1, 1); |
| 51 |
printf("%d\n", m); |
| 52 |
|
| 53 |
if (m != 5) |
| 54 |
__builtin_abort (); |
| 55 |
|
| 56 |
return 0; |
| 57 |
} |