This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
problem with your GIMPLE_FORMAL_TEMP change
- 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: Thu, 19 Aug 04 19:15:25 EDT
- Subject: problem with your GIMPLE_FORMAL_TEMP change
This is likely what Arno ran into.
Suppose I have a SAVE_EXPR inside function F and nested inside F are
G and H, all of which use the SAVE_EXPR.
When gimplifying F, we make a temp with DECL_GIMPLE_FORMAL_TEMP_P set
and put that as the operand of the SAVE_EXPR. Call that T.1. When we
go out of F, pop_gimplify_context clears DECL_GIMPLE_FORMAL_TEMP_P.
So now when gimplifying G, that flag is no longer set and we make a
new temporary for the SAVE_EXPR (call that T.2) and assign T.2 from T.1.
That assignment is OK.
Now when exiting the gimplification of G, T.2's flag is cleared. So
when gimplifying H, we again need to make a temporary, let's call it T.3.
However, here we generate the assignment T.3 := T.2 and that's *not* OK
since T.3's context is H and T.2's context is G and they are siblings
Why is it necessary to test DECL_GIMPLE_FORMAL_TEMP_P in
gimplify_save_expr?
If you want a test case, the ACATS test ad7203b seems to be the first
one to hit this.