Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/20170111-1.c

raw
1 /* PR rtl-optimization/79032 */
2 /* Reported by Daniel Cederman <[email protected]> */
3
4 extern void abort (void);
5
6 struct S {
7 short a;
8 long long b;
9 short c;
10 char d;
11 unsigned short e;
12 long *f;
13 };
14
15 static long foo (struct S *s) __attribute__((noclone, noinline));
16
17 static long foo (struct S *s)
18 {
19 long a = 1;
20 a /= s->e;
21 s->f[a]--;
22 return a;
23 }
24
25 int main (void)
26 {
27 long val = 1;
28 struct S s = { 0, 0, 0, 0, 2, &val };
29 val = foo (&s);
30 if (val != 0)
31 abort ();
32 return 0;
33 }