problem with your GIMPLE_FORMAL_TEMP change
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Thu Aug 19 23:33:00 GMT 2004
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.
More information about the Gcc
mailing list