Patchwork Fix PR54811

login
register
mail settings
Submitter Richard Guenther
Date Oct. 5, 2012, 11:42 a.m.
Message ID <alpine.LNX.2.00.1210051341570.4063@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/189458/
State New
Headers show

Comments

Richard Guenther - Oct. 5, 2012, 11:42 a.m.
This fixes PR54811 for me - still Ada LTO bootstrap fails for me
with cgraph verification ICEs.

LTO bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2012-10-05  Richard Guenther  <rguenther@suse.de>

	PR middle-end/54811
	* tree-ssa-live.c (clear_unused_block_pointer_1): Look at
	DECL_DEBUG_EXPR again.
Eric Botcazou - Oct. 5, 2012, 9:32 p.m.
> This fixes PR54811 for me - still Ada LTO bootstrap fails for me
> with cgraph verification ICEs.

Thanks for the fix!  Yes, I also get the cgraph verification ICEs now, but 
that's kind of a progress if you ask me. :-)  I'll look into them once the 
dust has settled on Jan's recent changes in that area.

Patch

Index: gcc/tree-ssa-live.c
===================================================================
--- gcc/tree-ssa-live.c	(revision 192114)
+++ gcc/tree-ssa-live.c	(working copy)
@@ -621,6 +621,11 @@  clear_unused_block_pointer_1 (tree *tp,
   if (EXPR_P (*tp) && TREE_BLOCK (*tp)
       && !TREE_USED (TREE_BLOCK (*tp)))
     TREE_SET_BLOCK (*tp, NULL);
+  if (TREE_CODE (*tp) == VAR_DECL && DECL_DEBUG_EXPR_IS_FROM (*tp))
+    {
+      tree debug_expr = DECL_DEBUG_EXPR (*tp);
+      walk_tree (&debug_expr, clear_unused_block_pointer_1, NULL, NULL);
+    }
   return NULL_TREE;
 }