egcs-2.91.33 19980525 : ICE with missing template parameter in default initializer

Laurent Bonnaud bonnaud@irisa.fr
Wed May 27 07:53:00 GMT 1998


Hi,

the following (incorrect) code crashes g++ on i686-pc-linux-gnu and
sparc-sun-solaris2.5.1 :

template <class T>
class A
{
};

class B
{
public:
  B(const A<int>& a=A()); // should be A<int>()
};


% g++ ICEa.cc 
ICEa.cc:9: Internal compiler error.
ICEa.cc:9: Please submit a full bug report to `egcs-bugs@cygnus.com'.

% g++ -v
Reading specs from /udd/bonnaud/poubelle/sparc-egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.33/specs
gcc version egcs-2.91.33 19980525 (gcc2 ss-980502 experimental)

% g++ -v
Reading specs from /udd/bonnaud/poubelle/linux-egcs/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.33/specs
gcc version egcs-2.91.33 19980525 (gcc2 ss-980502 experimental)

-- 
Laurent.



More information about the Gcc-bugs mailing list