------- Comment #8 from jakub at gcc dot gnu dot org  2009-03-06 17:24 -------
I think it is the new:
3384      if (TREE_STATIC (var) && !TREE_ASM_WRITTEN (var))
3385        {
3386          if (var_ann (var) && referenced_var_check_and_insert (var))
3387            cfun->local_decls = tree_cons (NULL_TREE, var,
3388          cfun->local_decls);
3389        }
that causes this.  Compared to add_referenced_var this doesn't do the:
      /* Scan DECL_INITIAL for pointer variables as they may contain
         address arithmetic referencing the address of other
         variables.
         Even non-constant initializers need to be walked, because
         IPA passes might prove that their are invariant later on.  */
      if (DECL_INITIAL (var)
          /* Initializers of external variables are not useful to the
             optimizers.  */
          && !DECL_EXTERNAL (var))
        walk_tree (&DECL_INITIAL (var), find_vars_r, NULL, 0);
part.  So, either tree-inline.c needs to do the same, or it can't use
referenced_vars bit as a test whether it has been queued already onto
local_decls or not.  Honza?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39360

Reply via email to