On Tue, 19 Jan 2016, Jan Hubicka wrote:

> Hi,
> here is updated patch. It has same effect as the former version.
> 
> Bootstrapped/regtested x86_64-linux, OK?

But what about the comment?

         We track no
         information on whether given type is used or not, so we have
         to keep them even when not emitting debug information,
         otherwise we may end up remapping variables and their (local)
         types in different orders depending on whether debug
         information is being generated.  */

which suggests that the TYPE_DECLs somehow "order" remapping
of local types and that is somehow important (maybe for VLA
types which refer to locals). OTOH local vars are also
duplicated in order before copying stmts (which may introduce
differences because of seeing debug stmts or not refering to
decls/types).

Richard.

> Honza
> 
>       * tree-ssa-live.c (remove_unused_scope_block_p): Also remove
>       reudndant typedefs.
> Index: tree-ssa-live.c
> ===================================================================
> --- tree-ssa-live.c   (revision 232466)
> +++ tree-ssa-live.c   (working copy)
> @@ -470,7 +470,8 @@ remove_unused_scope_block_p (tree scope,
>        types in different orders depending on whether debug
>        information is being generated.  */
>  
> -      else if (TREE_CODE (*t) == TYPE_DECL
> +      else if ((TREE_CODE (*t) == TYPE_DECL
> +             && !DECL_IGNORED_P (*t) && !is_redundant_typedef (*t))
>              || debug_info_level == DINFO_LEVEL_NORMAL
>              || debug_info_level == DINFO_LEVEL_VERBOSE)
>       ;
> 
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 
21284 (AG Nuernberg)

Reply via email to