Debian Codegraph @

gcc/testsuite/gcc.target/riscv/pr116085.c

raw
1 /* { dg-do run } */
2 /* { dg-require-effective-target rv64 } */
3 /* { dg-options "-march=rv64gc_zbb -mabi=lp64d -fno-ext-dce" } */
4
5 extern void abort (void);
6
7 int a = 2;
8 unsigned b = 0x80000000;
9 int arr_5[2][23];
10 void test(int, unsigned, int);
11 int main() {
12 test(a, b, 1);
13 if (arr_5[1][0] != -2147483648)
14 abort ();
15 return 0;
16 }
17
18 #define c(a, b) \
19 ({ \
20 long d = a; \
21 long e = b; \
22 d > e ? d : e; \
23 })
24 __attribute__((noipa))
25 void test(int f, unsigned g, int h) {
26 for (int i = 0; i < h; i = f)
27 arr_5[1][i] = h ? c(g, 7) : 0;
28 }
29