This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: WITH_CLEANUP_EXPR oddity
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 21 Jun 04 07:24:00 EDT
- Subject: Re: WITH_CLEANUP_EXPR oddity
I looked into fixing this once, but instead found so much redundant
scanning being done as to be criminal. Which lead me to rearrange
how the gimplifier was structured, and afterward the problem naturally
went away.
I actually kinda prefer this solution, as it punishes sloppiness.
Well, if we're going to go in that direction, how about going all the way
and adding a flag saying that a node has been gimplified and ICE if we
try again?
In what context are you finding yourself re-gimplifying?
It was with DECL_STMT in g++. It was calling gimplify_stmt on
most statements and adding them to the statement list. But because it didn't
do that for one statement, it returned GS_OK. So the whole list got
gimplified again. I changed it to gimplify all the statements it emits and
then return GS_ALL_DONE.
It looks like this was partially still using COMPOUND_EXPR, but I changed
it to use statement lists for consistency.