1/* { dg-do compile } */ 2/* { dg-options "-O3" } */ 3 4template <typename> struct A { 5 unsigned _width, _height, _depth, _spectrum; 6 template <typename t> A(t p1) { 7 int a = p1.size(); 8 if (a) { 9 _width = p1._width; 10 _depth = _height = _spectrum = p1._spectrum; 11 } 12 } 13 long size() { return (long)_width * _height * _depth * _spectrum; } 14}; 15 16int d; 17void fn1(void *); 18A<int> *fn2(); 19void fn3() { 20 int b; 21 for (;;) { 22 A<char> c(*fn2()); 23 fn1(&c); 24 if (d || !b) 25 throw; 26 } 27} 28 29 30 31 32