g++ 3.5 mainline crashes on the code below: $ g++ -c x.cc x.cc: In constructor `D::D(C<int>)': x.cc:15: internal compiler error: in cp_expr_size, at cp/cp-lang.c:280 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. $ Environment: System: Linux karma 2.6.7 #16 Tue Jun 22 21:52:28 EDT 2004 i686 i686 i386 GNU/Linux Architecture: i686 <machine, os, target, libraries (multiple lines)> host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: /home/sss/gcc/gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long --enable-languages=c,c++,f95 How-To-Repeat: ------------------------------ template <class T> struct C { C (const C& i); C& operator= (const C& i); }; struct D { D (C<int> it); C<int> _it; }; D::D (C<int> it) : _it (it) {} ------------------------------
Fix: <how to correct or work around the problem, if known (multiple lines)>
Confirmed, why it happens only on one of the clones I do not know.
This problem appeared with Jason's fix for PR 16115 and was fixed by reverting the patch on 20040706: http://gcc.gnu.org/ml/gcc-cvs/2004-07/msg00231.html