aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-live.c
diff options
context:
space:
mode:
authorhubicka <>2008-09-06 16:10:00 +0000
committerhubicka <>2008-09-06 16:10:00 +0000
commitc1de0ed7b06986e7eb77655fec38c355b5982fbb (patch)
tree3bfbb5a00dd14576ae24698df640f819605cdc0d /gcc/tree-ssa-live.c
parent65ff08cef7b002b796c56c98f3d48a751125c563 (diff)
PR tree-optimization/14703
* tree-ssa-live.c (remove_unused_scope_block_p): Remove ignored declarations. * passes.c (init_optimization_passes): Recompute inline parameters. * g++.dg/tree-ssa-pr14703.C: New testcase.
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r--gcc/tree-ssa-live.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index fa3834d21c5..859c0c7427d 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -489,6 +489,13 @@ remove_unused_scope_block_p (tree scope)
if (TREE_CODE (*t) == FUNCTION_DECL)
unused = false;
+ /* Remove everything we don't generate debug info for. */
+ else if (DECL_IGNORED_P (*t))
+ {
+ *t = TREE_CHAIN (*t);
+ next = t;
+ }
+
/* When we are outputting debug info, we usually want to output
info about optimized-out variables in the scope blocks.
Exception are the scope blocks not containing any instructions