compile this code: template <typename X> class Foo { int i; public: Foo() { X::explode(); } }; class Bar { Foo<int> foo_; public: Bar() {} }; template class Foo<int>; Since this is split, and I can confirm this on the mainline (20030610) and 3.3.1 (20030526) and I do not see the ICE. in 3.2.3
Confirmed indeed. A regression in 3.3 and mainline over 3.2.
Subject: Bug 11149 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: mmitchel@gcc.gnu.org 2003-07-01 17:35:00 Modified files: gcc/cp : ChangeLog call.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/lookup: scoped6.C Log message: PR c++/11149 * call.c (resolve_scoped_fn_name): Check that the qualifying scope is a class type. PR c++/11149 * g++.dg/lookup/scoped6.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.170&r2=1.3076.2.171 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.341.2.24&r2=1.341.2.25 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.210&r2=1.2261.2.211 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/scoped6.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
Subject: Bug 11149 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2003-07-01 17:36:00 Modified files: gcc/cp : ChangeLog call.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/lookup: scoped6.C Log message: PR c++/11149 * call.c (resolve_scoped_fn_name): Check that the qualifying scope is a class type. PR c++/11149 * g++.dg/lookup/scoped6.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3476&r2=1.3477 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.394&r2=1.395 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2824&r2=1.2825 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/lookup/scoped6.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
Fixed in GCC 3.3.1, GCC 3.4.