On Tue, Mar 31, 2015 at 02:21:23PM +0200, Kai Tietz wrote:
>     addressable used static QI file thread-local-var-1-lbv.c line 28
> col 5 align  8 context <translation_unit_decl 0xffd19ab0 D.3888>
> attributes <tree_list 0xffcd9030> initial <block 0xfff806c8>
>     result <result_decl 0xffd19a60 D.3886 type <integer_type 0xffdd0360 int>
>         ignored SI file thread-local-var-1-lbv.c line 28 col 5 size
> <integer_cst  0xffef0558 32> unit size <integer_cst 0xffef0570 4>
>         align 32 context <function_decl 0xffce4900 mpx_test>> chain
> <type_decl 0xffd05880 D.3315>>
> 
> Fair point, so patch is:
> 
> Index: tree-emutls.c
> ===================================================================
> --- tree-emutls.c       (Revision 221789)
> +++ tree-emutls.c       (Arbeitskopie)
> @@ -633,6 +633,9 @@ lower_emutls_function_body (struct cgraph_node *no
>    struct lower_emutls_data d;
>    bool any_edge_inserts = false;
> 
> +  if (!DECL_STRUCT_FUNCTION (node->decl))
> +    return;
> +
>    push_cfun (DECL_STRUCT_FUNCTION (node->decl));
> 
>    d.cfun_node = node;

E.g. ipa_pta_execute uses instead of the node->lowered guard
  FOR_EACH_DEFINED_FUNCTION (node)
    {
      varinfo_t vi;
      /* Nodes without a body are not interesting.  Especially do not
         visit clones at this point for now - we get duplicate decls
         there for inline clones at least.  */
      if (!node->has_gimple_body_p () || node->global.inlined_to)
        continue;
      node->get_body ();
Wonder why emutls is different, whether it is really desirable to adjust
already inlined functions, or functions without body and whether the
functions don't need to be read for LTO.
So I think you want Honza or Richi to look at this.

        Jakub

Reply via email to