OSDN Git Service

* gcc.dg/simulate-thread/simulate-thread.gdb: Call
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr46522.c
1 /* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
2 /* { dg-options "-O3 -fkeep-inline-functions -fsel-sched-pipelining -fselective-scheduling2 -funroll-loops" } */
3
4 struct S
5 {
6   unsigned i, j;
7 };
8
9 static inline void
10 bar (struct S *s)
11 {
12   if (s->i++ == 1)
13     {
14       s->i = 0;
15       s->j++;
16     }
17 }
18
19 void
20 foo1 (struct S *s)
21 {
22   bar (s);
23 }
24
25 void
26 foo2 (struct S s1, struct S s2, int i)
27 {
28   while (s1.i != s2.i) {
29     if (i)
30       *(unsigned *) 0 |= (1U << s1.i);
31     bar (&s1);
32   }
33 }