This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
GCC gives an ICE when trying to compile the attached .cpp file. The exact error messsage is: test.cpp: In instantiation of `B<char>': test.cpp:29: instantiated from here test.cpp:16: Internal error: Speicherzugriffsfehler Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. Release: gcc version 3.0.2 20010917 (prerelease) Environment: SuSE Linux 7.3 on a Pentium-III How-To-Repeat: g++ -o test test.cpp
Fix: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg02052.html
State-Changed-From-To: open->analyzed State-Changed-Why: Confirmed as a bug. Present in both 3.1 branch and main trunk. The code is illegal. The declaration of '_a' inside 'B' should be typename A<U,SubB1>::template SubA<SubB2> _a; Also, inside class 'SubB1', it cannot contain an instance of 'B'.
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu> To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: c++/5333 Date: Wed, 22 Jan 2003 14:12:23 -0600 (CST) Still exists as of today in 3.2, 3.3, and 3.4 branches: g/a> /home/bangerth/bin/gcc-3.4-pre/bin/c++ test2.cpp test2.cpp: In instantiation of `A<U, B<U>::SubB1>': test2.cpp:24: instantiated from here test2.cpp:11: error: `A<T1, T2>::_t1' has incomplete type test2.cpp:11: error: invalid use of template type parameter test2.cpp:6: internal compiler error: Speicherzugriffsfehler Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth/
From: mmitchel@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c++/5333 Date: 24 Feb 2003 07:43:23 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2003-02-24 07:43:23 Modified files: gcc/cp : ChangeLog cp-tree.h parser.c pt.c gcc/testsuite : ChangeLog gcc/testsuite/g++.dg/parse: fused-params1.C Added files: gcc/testsuite/g++.dg/template: nested3.C Log message: PR c++/5333 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro. * parser.c (cp_parser_diagnose_invalid_type_name): Use it. * pt.c (instantiate_class_template): Don't try to instantiate dependent types. (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE. PR c++/5333 * g++.dg/parse/fused-params1.C: Adjust error messages. * g++.dg/template/nested3.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3211&r2=1.3212 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.813&r2=1.814 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.44&r2=1.45 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.662&r2=1.663 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2439&r2=1.2440 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/fused-params1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/nested3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed in GCC 3.4, will not be fixed in GCC 3.2/3.3. See: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg02052.html