c++/4934: Seg fault on legal code

Reichelt reichelt@igpm.rwth-aachen.de
Fri Dec 21 11:50:00 GMT 2001


Hi,

the offending code can be reduced to

template<unsigned>   struct A {};
template<typename T> struct B { A<sizeof(+int())> a; };

These two lines will crash gcc 3.0.x and gcc 3.1 20011210
on i686-pc-linux-gnu and mips-sgi-irix6.5.
Just compile with "g++ -c".

Greetings,
Volker Reichelt


http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4934




More information about the Gcc-bugs mailing list