------- Comment #2 from pinskia at gcc dot gnu dot org 2005-10-03 01:26 ------- Here is a slightly shorter testcase:
template<typename T = float> struct CImg; template<typename T = float> struct CImgl; struct IOException { IOException( const char * ){} }; inline int* dummy( const char* const path, const char* const mode ) { throw IOException( mode[ 0 ] == 'r' ? "a" : (mode[ 0 ] == 'w' ? "b" : "" )); } template<typename T> struct CImg { T *data; explicit CImg( const unsigned int dx = 0 ) { } CImg( const char *filename ) { CImgl<T>( filename ).get_append( 'v', 'p' ); } }; template<typename T> struct CImgl { CImgl( const unsigned int ) { } CImgl(const char* filename) { dummy( filename, "rb" ); unsigned int n; CImgl<T> res( n ); } CImg<T> get_append( const char, const char ) const { CImg<T> res; } }; void prepare_inpaint( ) { CImg<unsigned char> mask = CImg<unsigned char>( "" ); } --- I have not tried to reduce it further. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24172