From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2951 invoked by alias); 19 Dec 2009 22:41:00 -0000 Received: (qmail 2923 invoked by alias); 19 Dec 2009 22:40:51 -0000 Date: Sat, 19 Dec 2009 22:41:00 -0000 Message-ID: <20091219224051.2922.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/42225] [4.5 Regression] GCC 4.5 ICE (segfault) on C++ templated code In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dodji at gcc dot gnu dot org" 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: 2009-12/txt/msg01941.txt.bz2 ------- Comment #18 from dodji at gcc dot gnu dot org 2009-12-19 22:40 ------- Subject: Bug 42225 Author: dodji Date: Sat Dec 19 22:40:37 2009 New Revision: 155363 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155363 Log: Fix PR c++/42225, take 2 gcc/cp/ChangeLog: PR c++/42225 * pt.c (push_template_decl_real): Set DECL_CONTEXT of template type parms to their containing template decl. * typeck.c (comp_template_parms_position): Split this from structural_comptypes. (incompatible_template_type_parms_p): Renamed incompatible_dependent_typedefs_p into this. Change the function to handle comparison between TEMPLATE_TYPE_PARMs only. (structural_comptypes): Use comp_template_parms_position in TEMPLATE_TEMPLATE_PARM and BOUND_TEMPLATE_TEMPLATE_PARM cases. Use incompatible_template_type_parms_p in TEMPLATE_TYPE_PARM case. * mangle.c (decl_mangling_context): Template type parms don't have a mangling context. * tree.c (cp_set_underlying_type): Set type structural equality only for TEMPLATE_TYPE_PARMs. gcc/testsuite/ChangeLog: PR c++/42225 * g++.dg/template/typedef26.C: New test. Added: trunk/gcc/testsuite/g++.dg/template/typedef26.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/mangle.c trunk/gcc/cp/pt.c trunk/gcc/cp/tree.c trunk/gcc/cp/typeck.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42225