]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR debug/39387 (Wrong DW_AT_decl_line on DW_TAG_imported* for using directives...
authorJakub Jelinek <jakub@redhat.com>
Fri, 6 Mar 2009 09:48:25 +0000 (10:48 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 6 Mar 2009 09:48:25 +0000 (10:48 +0100)
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.

From-SVN: r144666

gcc/ChangeLog
gcc/dwarf2out.c

index d2bb30fcafe0107563ae298dbd7f438ac0b5c8dd..8809bb70f17c2edfb00420a58e07797741658fde 100644 (file)
@@ -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
index 848926b6383178dfa42eaccd4ace3e8198baf353..22852fa9487963ee8df474cffdf36b41818bc8fb 100644 (file)
@@ -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)