This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: safe_from_p changes tree code
- To: law at cygnus dot com
- Subject: Re: safe_from_p changes tree code
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Wed, 1 Jul 1998 21:49:53 +0200
- CC: burley at gnu dot org, mark at markmitchell dot com, egcs-patches at cygnus dot com
- References: <15844.899190875@hurl.cygnus.com>
> Martin, do you want to take care of making the change?
Here you go.
Martin
Wed Jul 1 21:45:44 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
* expr.c (safe_from_p): Change code to ERROR_MARK only when not
accessing nodes.
Index: expr.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/expr.c,v
retrieving revision 1.77
diff -c -p -r1.77 expr.c
*** expr.c 1998/06/25 15:14:26 1.77
--- expr.c 1998/06/30 21:34:47
*************** safe_from_p (x, exp, top_p)
*** 4854,4866 ****
if (save_expr_count >= save_expr_size)
return 0;
save_expr_rewritten[save_expr_count++] = exp;
- TREE_SET_CODE (exp, ERROR_MARK);
nops = tree_code_length[(int) SAVE_EXPR];
for (i = 0; i < nops; i++)
! if (TREE_OPERAND (exp, i) != 0
! && ! safe_from_p (x, TREE_OPERAND (exp, i), 0))
! return 0;
return 1;
case BIND_EXPR:
--- 4854,4872 ----
if (save_expr_count >= save_expr_size)
return 0;
save_expr_rewritten[save_expr_count++] = exp;
nops = tree_code_length[(int) SAVE_EXPR];
for (i = 0; i < nops; i++)
! {
! tree operand = TREE_OPERAND (exp, i);
! if (operand == NULL_TREE)
! continue;
! TREE_SET_CODE (exp, ERROR_MARK);
! if (!safe_from_p (x, operand, 0))
! return 0;
! TREE_SET_CODE (exp, SAVE_EXPR);
! }
! TREE_SET_CODE (exp, ERROR_MARK);
return 1;
case BIND_EXPR: