aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-06 09:48:25 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-06 09:48:25 +0000
commit5a798e1eba6ce5905dbe0ea6ed7a3dbf76f3eaf5 (patch)
tree62e57c43c934bf6fc62a2d1c907d67e74a7f07db /gcc
parentda748ee51ae995e8f94d3cdcc7187dea08c662ac (diff)
PR debug/39387
* dwarf2out.c (dwarf2out_imported_module_or_decl_1): For IMPORTED_DECL take locus from its DECL_SOURCE_LOCATION instead of input_location. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144666 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/dwarf2out.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d2bb30fcafe..8809bb70f17 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/39387
+ * dwarf2out.c (dwarf2out_imported_module_or_decl_1): For IMPORTED_DECL
+ take locus from its DECL_SOURCE_LOCATION instead of input_location.
+
2009-03-05 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.c (bfin_discover_loop): When retrying fails, mark
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 848926b6383..22852fa9487 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -15490,7 +15490,10 @@ dwarf2out_imported_module_or_decl_1 (tree decl,
lexical_block_die,
lexical_block);
- xloc = expand_location (input_location);
+ if (TREE_CODE (decl) == IMPORTED_DECL)
+ xloc = expand_location (DECL_SOURCE_LOCATION (decl));
+ else
+ xloc = expand_location (input_location);
add_AT_file (imported_die, DW_AT_decl_file, lookup_filename (xloc.file));
add_AT_unsigned (imported_die, DW_AT_decl_line, xloc.line);
if (name)