This is reduced from 10316, but it was too simple to be fun (less than 3 minutes to cut down :-): ----------------------------- template <class> struct A { static const int n = 1; } ; template <int> struct B; template <class S> struct restype_order { static const int s = A<S>::n; typedef typename B<(s > 0)>::t t; }; ----------------------------- This ICEs not with present mainline: tmp/gg> ../build-gcc/gcc-install/bin/c++ -c x.cc x.cc:7: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. It doesn't ICE with 3.3.0, but I don't have a 3.3 branch snapshot on this machine, so can't test whether this bug also is on the branch. It's a regression in any case. The bug was introduced into mainline after 20030520. W.
I am not going to confirm this because I was the one who orignally reported as ICE'ing but it does not ICE in 3.3.1 (20030707). Using Phil's regression hunter: Search converges between 2003-07-08-trunk (#258) and 2003- 07-09-trunk (#259). And it passes with 3.3.1 (20030712).
I guess your word is enough -- it just takes a second person on a second system to confirm that something doesn't work. If you say it doesn't, and the regression finder agrees, that should be ok. Thanks W.
Looking at Nathanael's comment 19 in bug 11489, this looks very much related to that bug.
PR 11489 is now PR 11511. W.
Subject: Bug 11509 CVSROOT: /cvs/gcc Module name: gcc Changes by: mmitchel@gcc.gnu.org 2003-07-14 21:32:26 Modified files: gcc/cp : ChangeLog pt.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/template: crash6.C Log message: PR c++/11509 * pt.c (dependent_scope_ref_p): New function. (value_dependent_expression_p): Use it. (type_dependent_expression_p): Likewise. * pt.c (tsubst_friend_function): Use reregister_specialization. PR c++/11509 * g++.dg/template/crash6.C: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3522&r2=1.3523 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.725&r2=1.726 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2875&r2=1.2876 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
Fixed in GCC 3.4.
*** Bug 11511 has been marked as a duplicate of this bug. ***