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