This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Re: GCC 2.95 Solaris7 i86pc compilation fail with-g generates internal compiler error
Here's a more correct fix for the dwarf debugging problem.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
1999-08-13 Mark Mitchell <mark@codesourcery.com>
* pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
decl_constant_value to simplify array bounds.
Index: pt.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/pt.c,v
retrieving revision 1.325
diff -c -p -r1.325 pt.c
*** pt.c 1999/08/12 01:45:44 1.325
--- pt.c 1999/08/13 08:15:59
*************** tsubst (t, args, complain, in_decl)
*** 6185,6190 ****
--- 6185,6195 ----
if (max == error_mark_node)
return error_mark_node;
+ /* See if we can reduce this expression to something simpler. */
+ max = maybe_fold_nontype_arg (max);
+ if (!processing_template_decl && TREE_READONLY_DECL_P (max))
+ max = decl_constant_value (max);
+
if (processing_template_decl
/* When providing explicit arguments to a template
function, but leaving some arguments for subsequent
*************** tsubst (t, args, complain, in_decl)
*** 6192,6199 ****
not PROCESSING_TEMPLATE_DECL. */
|| TREE_CODE (max) != INTEGER_CST)
{
! return build_index_type (build_min
! (MINUS_EXPR, sizetype, max, integer_one_node));
}
if (integer_zerop (omax))
--- 6197,6207 ----
not PROCESSING_TEMPLATE_DECL. */
|| TREE_CODE (max) != INTEGER_CST)
{
! tree itype = make_node (INTEGER_TYPE);
! TYPE_MIN_VALUE (itype) = size_zero_node;
! TYPE_MAX_VALUE (itype) = build_min (MINUS_EXPR, sizetype, max,
! integer_one_node);
! return itype;
}
if (integer_zerop (omax))