OSDN Git Service

2012-02-28 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / torture / pr43560.c
1 /* { dg-do run } */
2 /* { dg-require-weak "" } */
3
4 int g_6[1][2] = {{1,1}};
5 int g_34 = 0;
6 int *const g_82 = &g_6[0][1];
7 int *g_85[2][1] __attribute__((weak));
8
9 void __attribute__((noinline))
10 func_4 (int x)
11 {
12   int i;
13   for (i = 0; i <= x; i++) {
14       if (g_6[0][1]) {
15           *g_82 = 1;
16       } else {
17           int **l_109 = &g_85[1][0];
18           if (&g_82 != l_109) {
19           } else {
20               *l_109 = &g_6[0][1];
21           }
22           *g_82 = 1;
23       }
24   }
25 }
26
27 int main (void)
28 {
29   g_85[0][0] = &g_34;
30   g_85[1][0] = &g_34;
31   func_4(1);
32   return 0;
33
34