This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lto][patch] Don't write DECL_CONTEXT of LABEL_DECLs
> That's not what I meant.
>
> In the reader, when reading function bodies, notice how we set the
> context of the label contained in a GIMPLE_LABEL. That's all, it was
> just an observation.
Sure, but we read the label twice. Once while reading the function
body. Once when reading the static variables that point to it.
But rewinding a bit :-)
The comment was
>>> + /* 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? 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. This value will not be overwritten while reading the
functions.
>
> Diego.
>
Cheers,
--
Rafael Avila de Espindola
Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047