Debian Codegraph @

gcc/testsuite/gcc.dg/torture/pr103037.c

raw
1 /* { dg-do run } */
2
3 static inline const unsigned short *
4 min(unsigned short *d, const unsigned short *e)
5 {
6 return *e < *d ? e : d;
7 }
8
9 unsigned short __attribute__((noipa))
10 test(unsigned short arr, unsigned short val)
11 {
12 unsigned short tem = 1;
13 unsigned short tem2 = *min(&arr, &tem);
14 return tem2 / (arr ? arr : val);
15 }
16
17 int
18 main()
19 {
20 if (test (2, 2) != 0)
21 __builtin_abort();
22 return 0;
23 }