re PR debug/39474 (DW_AT_location missing for unused variables even at -O0)
PR debug/39474 * tree-ssa-live.c (remove_unused_locals): Don't remove local unused non-artificial variables when not optimizing. From-SVN: r144914
This commit is contained in:
parent
47512a6e9d
commit
df5deb18f1
@ -3,6 +3,10 @@
|
|||||||
* dwarf2out.c (dwarf2out_imported_module_or_decl_1): Allow
|
* dwarf2out.c (dwarf2out_imported_module_or_decl_1): Allow
|
||||||
non-NAMESPACE_DECL IMPORTED_DECL_ASSOCIATED_DECL.
|
non-NAMESPACE_DECL IMPORTED_DECL_ASSOCIATED_DECL.
|
||||||
|
|
||||||
|
PR debug/39474
|
||||||
|
* tree-ssa-live.c (remove_unused_locals): Don't remove local
|
||||||
|
unused non-artificial variables when not optimizing.
|
||||||
|
|
||||||
PR debug/39471
|
PR debug/39471
|
||||||
* dwarf2out.c (dwarf2out_imported_module_or_decl_1): Emit
|
* dwarf2out.c (dwarf2out_imported_module_or_decl_1): Emit
|
||||||
DW_TAG_imported_module even if decl is IMPORTED_DECL with
|
DW_TAG_imported_module even if decl is IMPORTED_DECL with
|
||||||
|
@ -740,7 +740,8 @@ remove_unused_locals (void)
|
|||||||
|
|
||||||
if (TREE_CODE (var) != FUNCTION_DECL
|
if (TREE_CODE (var) != FUNCTION_DECL
|
||||||
&& (!(ann = var_ann (var))
|
&& (!(ann = var_ann (var))
|
||||||
|| !ann->used))
|
|| !ann->used)
|
||||||
|
&& (optimize || DECL_ARTIFICIAL (var)))
|
||||||
{
|
{
|
||||||
if (is_global_var (var))
|
if (is_global_var (var))
|
||||||
{
|
{
|
||||||
@ -781,8 +782,7 @@ remove_unused_locals (void)
|
|||||||
|
|
||||||
if (TREE_CODE (var) == VAR_DECL
|
if (TREE_CODE (var) == VAR_DECL
|
||||||
&& is_global_var (var)
|
&& is_global_var (var)
|
||||||
&& bitmap_bit_p (global_unused_vars, DECL_UID (var))
|
&& bitmap_bit_p (global_unused_vars, DECL_UID (var)))
|
||||||
&& (optimize || DECL_ARTIFICIAL (var)))
|
|
||||||
*cell = TREE_CHAIN (*cell);
|
*cell = TREE_CHAIN (*cell);
|
||||||
else
|
else
|
||||||
cell = &TREE_CHAIN (*cell);
|
cell = &TREE_CHAIN (*cell);
|
||||||
|
Loading…
Reference in New Issue
Block a user