[lto][patch] Don't write DECL_CONTEXT of LABEL_DECLs

Diego Novillo dnovillo@google.com
Sat Jan 24 15:16:00 GMT 2009


On Sat, Jan 24, 2009 at 05:42, Rafael Espindola <espindola@google.com> wrote:

> @@ -2911,7 +2911,10 @@ input_label_decl (struct lto_input_block *ib, struct data_in *data_in)
>
>    /* omit locus, uid */
>    decl->decl_minimal.name = input_tree (ib, data_in);
> -  decl->decl_minimal.context = input_tree (ib, data_in);
> +
> +  /* FIXME lto: this might not have been the value seen by the streamer,
> +     but the context of labels is no longer used. */
> +  decl->decl_minimal.context = NULL_TREE;

Not quite correct.  We set the context of every label we see in a
GIMPLE_LABEL to the function that is currently being streamed in.

> [ ... ]
> +  /* FIXME lto: We cannot check the value of the context, since we might
> +     be called from the initialization of an static variable. We cannot clear

s/an static/a static/

> +     it in reset_decl_lang_specific, since the value is used in cgfexpand.
> +     Two options for fixing this:
> +     1) An second clenup pass after cfgexpand.

s/An second/A second/


OK with those changes.


Diego.



More information about the Gcc-patches mailing list