[Bug c++/13092] [3.4 regression] Segfault in convert_nontype_argument
giovannibajo at libero dot it
gcc-bugzilla@gcc.gnu.org
Fri Nov 21 23:49:00 GMT 2003
------- 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
More information about the Gcc-bugs
mailing list