Bug 39387 - [4.4 Regression] Wrong DW_AT_decl_line on DW_TAG_imported* for using directives in C+ functions
Summary: [4.4 Regression] Wrong DW_AT_decl_line on DW_TAG_imported* for using directiv...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: 4.4.0
Assignee: Jakub Jelinek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-05 21:22 UTC by Jakub Jelinek
Modified: 2009-03-06 10:31 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-03-05 21:25:12


Attachments
gcc44-pr39387.patch (411 bytes, patch)
2009-03-05 21:25 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2009-03-05 21:22:42 UTC
For
namespace A
{
  int i;
}

void
f ()
{
  using namespace A;
  i++;
}

with -g -dA g++ 4.3 used correct
.byte   0x9     # DW_AT_decl_line
for DW_TAG_imported*, but 4.4 uses
.byte   0xb     # DW_AT_decl_line
(which is the end of the function, not the location of the using namespace directive).
Comment 1 Jakub Jelinek 2009-03-05 21:25:54 UTC
Created attachment 17401 [details]
gcc44-pr39387.patch

Patch I'm going to bootstrap/regtest.
Comment 2 Jakub Jelinek 2009-03-06 09:48:39 UTC
Subject: Bug 39387

Author: jakub
Date: Fri Mar  6 09:48:25 2009
New Revision: 144666

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144666
Log:
	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.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c

Comment 3 Jakub Jelinek 2009-03-06 10:31:02 UTC
Fixed.