This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13092] [3.4 regression] Segfault in convert_nontype_argument
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Nov 2003 23:49:28 -0000
- Subject: [Bug c++/13092] [3.4 regression] Segfault in convert_nontype_argument
- References: <20031117223716.13092.giovannibajo@libero.it>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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