1 // { dg-do compile }
2 
3 int g, *gp[100];
4 struct V {
5     int* x;
6     int y;
7 };
8 
foo(V ** p,V * end,int i)9 void foo (V **p, V* end, int i)
10 {
11   *p = 0;
12   V* pp = *p;
13   int s = 100;
14   for (; pp < end; )
15     {
16       pp++;
17       (pp-1)->x = &g;
18       if (g)
19 	{
20 	  if (g>10)
21 	    g++;
22 	  int *t = (int*) operator new (100);
23 	  (pp-1)->x = t;
24 	}
25       else
26 	s--;
27       gp[end-pp] = (pp-1)->x + s;
28     }
29 }
30