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: martin at mira dot isdn dot cs dot tu-berlin dot de
- Subject: Re: safe_from_p changes tree code
- From: Craig Burley <burley at gnu dot org>
- Date: Thu, 2 Jul 1998 15:28:07 -0400 (EDT)
- CC: law at cygnus dot com, mark at markmitchell dot com, egcs-patches at cygnus dot com
>> Thanks for the attempt, but don't install this just yet. See
>> my hastily-typed changes below.
>
>You mean, like the change included below? It is not an equivalent
>transformation of the original code, unless I miss something.
Eek, never mind, my brain stopped working for a moment there.
Your earlier patch is probably fine. (I was back in the mode
where I thought the same change made to contains_placeholder_p
could be, and had been [by myself, which is really sad ;-], made
to safe_from_p.)
>! TREE_SET_CODE (exp, ERROR_MARK);
>! res = safe_from_p (x, operand, 0);
>! TREE_SET_CODE (exp, SAVE_EXPR);
>! if (res == 0)
>! return 0;
No, don't bother with that, as you understood already (and I forgot),
the point is to *leave* the exp as ERROR_MARK when the block of
code is finished, as your patch did. I got thrown off by the
resetting to SAVE_EXPR as the last statement within the loop over
the operands, but of course that's the right thing to do. If you
made the change you're now suggesting, based on my erroneous
input, the code would work fine -- but a few g77 tests would start
taking apparently "forever" to compile once again.
I'll be upgrading to RedHat GNU/Brain 5.1 someday soon, so hopefully
these kinds of problems won't turn up in the future. :)
tq vm, (burley)