2013-10-21 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / 20030324-1.c
blob67db669fda282c0df56f52b954a6f4c2051ed115
1 /* { dg-do run } */
2 /* { dg-options "-O -fstrict-aliasing -fgcse" } */
4 /* PR optimization/10087 */
5 /* Contributed by Peter van Hoof <p.van-hoof@qub.ac.uk> */
7 extern void abort(void);
9 void b(int*,int*);
11 typedef struct {
12 double T1;
13 char c;
14 } S;
16 int main(void)
18 int i,j;
19 double s;
21 S x1[2][2];
22 S *x[2] = { x1[0], x1[1] };
23 S **E = x;
25 for( i=0; i < 2; i++ )
26 for( j=0; j < 2; j++ )
27 E[j][i].T1 = 1;
29 for( i=0; i < 2; i++ )
30 for( j=0; j < 2; j++ )
31 s = E[j][i].T1;
33 b(&j,&i);
34 if (s != 1)
35 abort ();
36 return 0;
39 void b(int *i, int *j) {}