2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.dg / 20030324-1.c
blob7e46d040ee2b387066b50a7441bf9a3a5b1af7b2
1 /* { dg-do run } */
2 /* { dg-options "-O -fstrength-reduce -fstrict-aliasing -fforce-mem -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) {}