From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18108 invoked by alias); 21 Nov 2003 23:49:29 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 18088 invoked by uid 48); 21 Nov 2003 23:49:28 -0000 Date: Fri, 21 Nov 2003 23:49:00 -0000 Message-ID: <20031121234928.18087.qmail@sources.redhat.com> From: "giovannibajo at libero dot it" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20031117223716.13092.giovannibajo@libero.it> References: <20031117223716.13092.giovannibajo@libero.it> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/13092] [3.4 regression] Segfault in convert_nontype_argument X-Bugzilla-Reason: CC X-SW-Source: 2003-11/txt/msg01967.txt.bz2 List-Id: ------- Additional Comments From giovannibajo at libero dot it 2003-11-21 23:49 ------- Thanks for the explanation Kriang, I'm still trying to make a sense out of all these trees. It turned out I was fighting windmills, the problem is that we were trying to tsubst too early. I'm testing this patch right now, it fixes the regression and I'm confident it's doing the right thing. Index: pt.c =================================================================== RCS file: /cvsroot/gcc/gcc/gcc/cp/pt.c,v retrieving revision 1.791 diff -c -p -r1.791 pt.c *** pt.c 24 Oct 2003 07:59:40 -0000 1.791 --- pt.c 21 Nov 2003 23:46:26 -0000 *************** convert_template_argument (tree parm, *** 3549,3555 **** if (invalid_nontype_parm_type_p (t, complain)) return error_mark_node; ! if (!uses_template_parms (arg) && !uses_template_parms (t)) /* We used to call digest_init here. However, digest_init will report errors, which we don't want when complain is zero. More importantly, digest_init will try too --- 3549,3556 ---- if (invalid_nontype_parm_type_p (t, complain)) return error_mark_node; ! if (!uses_template_parms (arg) && !uses_template_parms (t) ! && TREE_TYPE (arg)) /* We used to call digest_init here. However, digest_init will report errors, which we don't want when complain is zero. More importantly, digest_init will try too -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13092