diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-06-22 06:41:09 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-06-22 06:41:09 +0000 |
commit | a300e4591c24487929d384141c3294793e37e93a (patch) | |
tree | 5ec3fdfb6ee6190965fcf815e9b89611e6eed89d /gcc | |
parent | 61806a93f3572dae7f2283d12207fc4f6a737a0f (diff) | |
download | gcc-a300e4591c24487929d384141c3294793e37e93a.zip gcc-a300e4591c24487929d384141c3294793e37e93a.tar.gz gcc-a300e4591c24487929d384141c3294793e37e93a.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/lto15.adb | 11 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/lto15.ads | 11 | ||||
-rw-r--r-- | gcc/tree-ssa-live.c | 7 |
5 files changed, 34 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ae0db9..8326b55 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 48f5f4e..fe32345 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/gnat.dg/lto15.adb b/gcc/testsuite/gnat.dg/lto15.adb new file mode 100644 index 0000000..b1bc251 --- /dev/null +++ b/gcc/testsuite/gnat.dg/lto15.adb @@ -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; diff --git a/gcc/testsuite/gnat.dg/lto15.ads b/gcc/testsuite/gnat.dg/lto15.ads new file mode 100644 index 0000000..297ea0c --- /dev/null +++ b/gcc/testsuite/gnat.dg/lto15.ads @@ -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; diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index 2520206..8f504f0 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -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; |