]> git.ipfire.org Git - thirdparty/gcc.git/commit
dwarf2out: Emit DW_AT_location for global register vars during early dwarf [PR101905]
authorJakub Jelinek <jakub@redhat.com>
Mon, 23 Aug 2021 09:50:14 +0000 (11:50 +0200)
committerJakub Jelinek <jakub@redhat.com>
Mon, 23 Aug 2021 09:55:42 +0000 (11:55 +0200)
commit513c543bb5d97cc59ba393f2f0612324a789c50e
treee82be12cfc509360d49166b6af29165b862e7a38
parentf7134a12cd633e8ffdcee1af7e294e9ab60647c0
dwarf2out: Emit DW_AT_location for global register vars during early dwarf [PR101905]

The following patch emits DW_AT_location for global register variables
already during early dwarf, since usually late_global_decl hook isn't even
called for those, as nothing needs to be emitted for them.

2021-08-23  Jakub Jelinek  <jakub@redhat.com>

PR debug/101905
* dwarf2out.c (gen_variable_die): Add DW_AT_location for global
register variables already during early_dwarf if possible.

* gcc.dg/guality/pr101905.c: New test.

(cherry picked from commit b284053bb75661fc1bf13c275f3ba5364bb17608)
gcc/dwarf2out.c
gcc/testsuite/gcc.dg/guality/pr101905.c [new file with mode: 0644]