+1998-09-08 Richard Henderson <rth@cygnus.com>
+ Mark Mitchell <mark@markmitchell.com>
+
+ * pt.c (process_partial_specialization): Consistantly allocate
+ and zero tpd.parms based on ntparms. Use tpd2.parms, not
+ tpd.parms, where appropriate.
+
Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
* Makefile.in (INCLUDES): Update after recent toplevel gcc
or some such would have been OK. */
tpd.level = TMPL_PARMS_DEPTH (current_template_parms);
tpd.parms = alloca (sizeof (int) * ntparms);
- bzero (tpd.parms, sizeof (int) * nargs);
+ bzero (tpd.parms, sizeof (int) * ntparms);
tpd.arg_uses_template_parms = alloca (sizeof (int) * nargs);
bzero (tpd.arg_uses_template_parms, sizeof (int) * nargs);
/* We haven't yet initialized TPD2. Do so now. */
tpd2.arg_uses_template_parms
= (int*) alloca (sizeof (int) * nargs);
+ /* The number of paramters here is the number in the
+ main template, which, as checked in the assertion
+ above, is NARGS. */
tpd2.parms = (int*) alloca (sizeof (int) * nargs);
tpd2.level =
TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (maintmpl));
template, not in the specialization. */
tpd2.current_arg = i;
tpd2.arg_uses_template_parms[i] = 0;
- bzero (tpd.parms, sizeof (int) * nargs);
+ bzero (tpd2.parms, sizeof (int) * nargs);
for_each_template_parm (type,
&mark_template_parm,
&tpd2);