From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10741 invoked by alias); 5 Jul 2007 20:05:23 -0000 Received: (qmail 10678 invoked by uid 48); 5 Jul 2007 20:05:11 -0000 Date: Thu, 05 Jul 2007 20:05:00 -0000 Message-ID: <20070705200511.10677.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/31992] [4.1/4.2/4.3 regression] ICE initializing static variable of template class In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "brolley at redhat dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg00687.txt.bz2 ------- Comment #1 from brolley at redhat dot com 2007-07-05 20:05 ------- I've worked on this a bit and just realized that it's assigned to Mark Mitchell. However, here's what I've learned, in case it helps... The segfault occurs in convert_for_initialization because the TREE_TYPE of rhs is NULL_TREE. This is because the tree is a SCOPE_REF referring to A and i. The TREE_TYPE was set to NULL_TREE because A is a dependent type. Now, it's documented in build_qualified_name in cp/tree.c that a SCOPE_REF has NULL type in the event that the expression represents a dependent type. However, since i does not depend on any of the template parameters of A, I think that A::i is not a dependent type and that the TREE_TYPE should have been set to the type of i. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31992