]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/gcc-tumbl.git/blob - gcc/testsuite/gcc.dg/pr45472.c
Backport from mainline
[fpga/lx-cpu1/gcc-tumbl.git] / gcc / testsuite / gcc.dg / pr45472.c
1 /* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
2 /* { dg-options "-O -fschedule-insns2 -fselective-scheduling2" } */
3
4 struct S
5 {
6   volatile long vl;
7   int i;
8 };
9 struct S s1, s2;
10
11 void
12 foo (int j, int c)
13 {
14   int i;
15   for (i = 0; i <= j; i++)
16     {
17       if (c)
18         s2.vl += s1.vl;
19       s1 = s2;
20     }
21 }
22 /* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
23 /* { dg-options "-O -fschedule-insns2 -fselective-scheduling2" } */
24
25 struct S
26 {
27   volatile long vl;
28   int i;
29 };
30 struct S s1, s2;
31
32 void
33 foo (int j, int c)
34 {
35   int i;
36   for (i = 0; i <= j; i++)
37     {
38       if (c)
39         s2.vl += s1.vl;
40       s1 = s2;
41     }
42 }
43 /* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
44 /* { dg-options "-O -fschedule-insns2 -fselective-scheduling2" } */
45
46 struct S
47 {
48   volatile long vl;
49   int i;
50 };
51 struct S s1, s2;
52
53 void
54 foo (int j, int c)
55 {
56   int i;
57   for (i = 0; i <= j; i++)
58     {
59       if (c)
60         s2.vl += s1.vl;
61       s1 = s2;
62     }
63 }