[lto][patch] Don't write DECL_CONTEXT of LABEL_DECLs
Sat Jan 24 16:38:00 GMT 2009
On Sat, Jan 24, 2009 at 11:21, Rafael Espindola <email@example.com> wrote:
>>>> + /* FIXME lto: this might not have been the value seen by the streamer,
>>>> + but the context of labels is no longer used. */
> What is wrong about it?
DECL_CONTEXT for a label *is* used. You stated in the next comment
that cfgexpand makes use of it. We run cfgexpand both in cc1/cc1plus
and lto1. So, if it's used in cc1/cc1plus, it *is* used in lto1
> While streaming out label_decls, we might see
> a DECL_CONTEXT that is not NULL. So the comment explains that there is
> a know disparity from what existed on cc1 and what we are constructing
> on lto1.
Sure. But that's not all that the comment says. The comment says
that the context of labels is no longer used. That's what doesn't
seem right to me, based on your other comment.
> This value will not be overwritten while reading the
What about this?
else if (code == GIMPLE_LABEL)
DECL_CONTEXT (gimple_label_label (stmt)) = fn->decl;
More information about the Gcc-patches