1 // { dg-do compile } 2 // { dg-options "-g -Os" } 3 4 int grow (int); 5 void fn (int); 6 struct A { int a1, a2; }; 7 template <typename T> 8 struct B 9 { 10 A *b; ~BB11 ~B () { b3 (b); } 12 void b1 (int); 13 void b2 (int); 14 void b3 (A *); 15 }; 16 struct C { int c1, c2, c3; bool c4; }; 17 int bar(int x)18bar (int x) 19 { 20 int y = x / 6; 21 if (y > x / 2) 22 return y; 23 return 0; 24 } 25 void baz (double, double); 26 void foo(const C * x,int y,int z)27foo (const C *x, int y, int z) 28 { 29 B<int> p; 30 double r = y / 2; 31 int w = bar (int (r)); 32 double s = y / 2 + 0.5; 33 double t = z / 2 + 0.5; 34 int u = x->c3; 35 int v = (x->c2 + u - 1 - x->c1) / u; 36 p.b2 ((2 * v > p.b->a1 || (2 * v < p.b->a2 && 2 * v < (p.b->a1 >> 1))) 37 ? grow (0) : p.b->a1); 38 for (int i = 0; i <= v; ++i) 39 { 40 double l = x->c4 ? 4.5 - i * 6.2 / v : (3.1 - i * 31 / v) / 6; 41 baz (s + (r - w) * l, t - (r - w) * l); 42 } 43 } 44 45 46