tree-ssa-live.c (remove_unused_scope_block_p): Remove again DECL_IGNORED_P non-reg vars even if they are used.

* tree-ssa-live.c (remove_unused_scope_block_p): Remove again
	DECL_IGNORED_P non-reg vars even if they are used.

From-SVN: r188872
This commit is contained in:
Eric Botcazou 2012-06-22 06:41:09 +00:00
parent 61806a93f3
commit a300e4591c
5 changed files with 34 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2012-06-22 Eric Botcazou <ebotcazou@adacore.com>
* tree-ssa-live.c (remove_unused_scope_block_p): Remove again
DECL_IGNORED_P non-reg vars even if they are used.
2012-06-21 Alexandre Oliva <aoliva@redhat.com>
PR debug/53671
@ -48,7 +53,7 @@
x_cur_stmt_list field of the restored language function.
2012-06-21 Sterling Augustine <saugustine@google.com>
Cary Coutant <ccoutant@google.com>
Cary Coutant <ccoutant@google.com>
* dwarf2out.c (is_cu_die, is_namespace_die, is_class_die,
add_AT_pubnames, add_enumerator_pubname, want_pubnames): New functions.

View File

@ -1,3 +1,7 @@
2012-06-22 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/lto15.ad[sb]: New test.
2012-06-21 Meador Inge <meadori@codesourcery.com>
PR c/53702

View File

@ -0,0 +1,11 @@
-- { dg-do compile }
-- { dg-options "-O -flto -g" }
package body Lto15 is
function Proc (Data : Arr) return R is
begin
return (Data'Length, Data);
end;
end Lto15;

View File

@ -0,0 +1,11 @@
package Lto15 is
type Arr is array (Positive range <>) of Integer;
type R(Size : Positive) is record
Data : Arr (1 .. Size);
end record;
function Proc (Data : Arr) return R;
end Lto15;

View File

@ -458,11 +458,8 @@ remove_unused_scope_block_p (tree scope, bitmap global_unused_vars)
else if (TREE_CODE (*t) == VAR_DECL && DECL_HAS_VALUE_EXPR_P (*t))
unused = false;
/* Remove everything we don't generate debug info for.
Don't remove larger vars though, because BLOCK_VARS are
used also during expansion to determine which variables
might share stack space. */
else if (DECL_IGNORED_P (*t) && is_gimple_reg (*t))
/* Remove everything we don't generate debug info for. */
else if (DECL_IGNORED_P (*t))
{
*t = DECL_CHAIN (*t);
next = t;