From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6048 invoked by alias); 3 Feb 2009 12:51:32 -0000 Received: (qmail 6008 invoked by uid 48); 3 Feb 2009 12:51:23 -0000 Date: Tue, 03 Feb 2009 12:51:00 -0000 Message-ID: <20090203125123.6007.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/37314] [4.2/4.3/4.4 Regression] seg violation In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "bonzini at 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-02/txt/msg00193.txt.bz2 ------- Comment #17 from bonzini at gnu dot org 2009-02-03 12:51 ------- The failure happens because structural_comptypes calls resolve_typename_type, while merge_types does not. Maybe it should as in this patch? Index: ../../peak-gcc-src/gcc/cp/typeck.c =================================================================== --- ../../peak-gcc-src/gcc/cp/typeck.c (revision 143676) +++ ../../peak-gcc-src/gcc/cp/typeck.c (working copy) @@ -606,6 +606,11 @@ merge_types (tree t1, tree t2) if (TYPE_PTRMEMFUNC_P (t2)) t2 = TYPE_PTRMEMFUNC_FN_TYPE (t2); + if (TREE_CODE (t1) == TYPENAME_TYPE) + t1 = resolve_typename_type (t2, /*only_current_p=*/true); + if (TREE_CODE (t2) == TYPENAME_TYPE) + t2 = resolve_typename_type (t2, /*only_current_p=*/true); + code1 = TREE_CODE (t1); code2 = TREE_CODE (t2); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37314