]> gcc.gnu.org Git - gcc.git/commit
DWARF: no location for non-definition DECLs with non-trivial DECL_VALUE_EXPR
authorPierre-Marie de Rodat <derodat@adacore.com>
Fri, 9 Feb 2018 14:02:37 +0000 (14:02 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Fri, 9 Feb 2018 14:02:37 +0000 (14:02 +0000)
commit7b5925a816f6548e4e49a7947ecedc612d260947
treeb3fb490ac6baef11283d7211c48c6779825d82cd
parent183187053d0222477cff678be5360597a57ccc6f
DWARF: no location for non-definition DECLs with non-trivial DECL_VALUE_EXPR

This patch restricts the set of cases in which we allow the generation of
location attributes for variables that are not defined in the current unit.
For such variables with complex DECL_VALUE_EXPR trees, generating a location
attribute can end up creating relocations to text symbols in the debug section
of LTO object files, which is not valid.

gcc/
PR lto/84213
* dwarf2out.c (is_trivial_indirect_ref): New function.
(dwarf2out_late_global_decl): Do not generate a location
attribute for variables that have a non-trivial DECL_VALUE_EXPR
and that are not defined in the current unit.

From-SVN: r257526
gcc/ChangeLog
gcc/dwarf2out.c
This page took 0.058537 seconds and 5 git commands to generate.