/* { dg-do compile } */ /* { dg-options "-O3" } */ template struct A { unsigned _width, _height, _depth, _spectrum; template A(t p1) { int a = p1.size(); if (a) { _width = p1._width; _depth = _height = _spectrum = p1._spectrum; } } long size() { return (long)_width * _height * _depth * _spectrum; } }; int d; void fn1(void *); A *fn2(); void fn3() { int b; for (;;) { A c(*fn2()); fn1(&c); if (d || !b) throw; } }