comparison gcc/testsuite/gcc.dg/pr64536.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* PR rtl-optimization/64536 */
2 /* { dg-do link } */
3 /* { dg-options "-O2" } */
4 /* { dg-additional-options "-fPIC" { target fpic } } */
5 /* { dg-require-effective-target ptr32plus } */
6
7 struct S { long q; } *h;
8 long a, b, g, j, k, *c, *d, *e, *f, *i;
9 long *baz (void)
10 {
11 asm volatile ("" : : : "memory");
12 return e;
13 }
14
15 void
16 bar (int x)
17 {
18 int y;
19 for (y = 0; y < x; y++)
20 {
21 switch (b)
22 {
23 case 0:
24 case 2:
25 a++;
26 break;
27 case 3:
28 a++;
29 break;
30 case 1:
31 a++;
32 }
33 if (d)
34 {
35 f = baz ();
36 g = k++;
37 if (&h->q)
38 {
39 j = *f;
40 h->q = *f;
41 }
42 else
43 i = (long *) (h->q = *f);
44 *c++ = (long) f;
45 e += 6;
46 }
47 else
48 {
49 f = baz ();
50 g = k++;
51 if (&h->q)
52 {
53 j = *f;
54 h->q = *f;
55 }
56 else
57 i = (long *) (h->q = *f);
58 *c++ = (long) f;
59 e += 6;
60 }
61 }
62 }
63
64 int
65 main ()
66 {
67 return 0;
68 }