1 /* PR debug/43670 */
2 /* { dg-do compile } */
3 /* { dg-options "-O -ftree-vrp -fcompare-debug" } */
4
5 extern void abort (void);
6
7 typedef struct { double T1; } S;
8
9 void
10 foo (void)
11 {
12 int i, j;
13 double s;
14
15 S y[2][2];
16 S *x[2] = { y[0], y[1] };
17 S **p = x;
18
19 for (i = 0; i < 2; i++)
20 for (j = 0; j < 2; j++)
21 p[j][i].T1 = 1;
22
23 for (i = 0; i < 2; i++)
24 for (j = 0; j < 2; j++)
25 s = p[j][i].T1;
26
27 if (s != 1)
28 abort ();
29 }