Debian Codegraph @

gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr112988-2.c

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