summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-live.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r--gcc/tree-ssa-live.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index 28a829caedf..5731964e457 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -740,7 +740,8 @@ remove_unused_locals (void)
if (TREE_CODE (var) != FUNCTION_DECL
&& (!(ann = var_ann (var))
- || !ann->used))
+ || !ann->used)
+ && (optimize || DECL_ARTIFICIAL (var)))
{
if (is_global_var (var))
{
@@ -781,8 +782,7 @@ remove_unused_locals (void)
if (TREE_CODE (var) == VAR_DECL
&& is_global_var (var)
- && bitmap_bit_p (global_unused_vars, DECL_UID (var))
- && (optimize || DECL_ARTIFICIAL (var)))
+ && bitmap_bit_p (global_unused_vars, DECL_UID (var)))
*cell = TREE_CHAIN (*cell);
else
cell = &TREE_CHAIN (*cell);