re PR debug/37738 (Fortran DW_TAG_common_block has incorrect placement/scope)
authorJakub Jelinek <jakub@redhat.com>
Tue, 7 Oct 2008 18:14:16 +0000 (20:14 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 7 Oct 2008 18:14:16 +0000 (20:14 +0200)
commita107f086365bc6adb37c6d81f029af3d7fc73c52
treed2b642b69257245ff64290121a8a59eab3c7db5c
parent008efc41a8d7449083d7c5a1856b6020b04e9bff
re PR debug/37738 (Fortran DW_TAG_common_block has incorrect placement/scope)

PR debug/37738
* dwarf2out.c (common_block_die_table): New variable.
(common_block_die_table_hash, common_block_die_table_eq): New
functions.
(gen_variable_die): Look up a DW_TAG_common_block die for a particular
COMMON block in the current scope rather than globally.  Optimize
DW_OP_addr SYMBOL_REF DW_OP_plus_uconst off into
DW_OP_addr SYMBOL_REF+off.

* gfortran.dg/debug/pr37738.f: New test.

From-SVN: r140944
gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/debug/pr37738.f [new file with mode: 0644]