PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20170111-1.c
blob0ff4bab23e697fa655dd05842ebb5015af6ecdaf
1 /* PR rtl-optimization/79032 */
2 /* Reported by Daniel Cederman <cederman@gaisler.com> */
4 extern void abort (void);
6 struct S {
7 short a;
8 long long b;
9 short c;
10 char d;
11 unsigned short e;
12 long *f;
15 static long foo (struct S *s) __attribute__((noclone, noinline));
17 static long foo (struct S *s)
19 long a = 1;
20 a /= s->e;
21 s->f[a]--;
22 return a;
25 int main (void)
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;