Patchwork PR debug/45024

login
register
mail settings
Submitter H.J. Lu
Date July 25, 2010, 2:55 p.m.
Message ID <AANLkTikyqJteC_YQv7FunaWOLpF2pu1v-asS58n3Jmv6@mail.gmail.com>
Download mbox | patch
Permalink /patch/59874/
State New
Headers show

Comments

H.J. Lu - July 25, 2010, 2:55 p.m.
On Sun, Jul 25, 2010 at 7:38 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Jul 22, 2010 at 2:44 AM, Dodji Seketeli <dodji@redhat.com> wrote:
>> Hello,
>>
>> Consider this testcase:
>> struct S {
>>  template<typename Z> struct T { };
>> };
>>
>> S::T<int> tval;
>>
>> In this PR, the DIE of S::T<int> is not a child of the DIE of S. Rather
>> it's a child of the compilation unit DIE.
>>
>> That patch below addresses that issue.
>>
>> Fully bootstrapped and tested against trunk on x86_64-unknown-linux-gnu.
>>
>> OK to commit to trunk?
>>
>>    gcc/ChangeLog:
>>        PR debug/45024
>>        * dwarf2out.c (scope_die_for): Don't fall back to the compilation
>>        unit DIE if we can find the scope DIE.
>>
>>    gcc/testsuite/ChangeLog:
>>        PR debug/45024
>>        * g++.dg/debug/dwarf2/nested-2.C: New test case.
>>
>
> This caused:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45068

I checked in this patch as an obvious fix.

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 162510)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@ 
+2010-07-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR testsuite/45068
+	* g++.dg/debug/dwarf2/nested-2.C: Support "//" as comments.
+
 2010-07-24  Richard Guenther  <rguenther@suse.de>

 	PR lto/43788
Index: g++.dg/debug/dwarf2/nested-2.C
===================================================================
--- g++.dg/debug/dwarf2/nested-2.C	(revision 162510)
+++ g++.dg/debug/dwarf2/nested-2.C	(working copy)
@@ -32,6 +32,6 @@ 

 Hence the slightly odd regexp:

-  { dg-final { scan-assembler
"\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"S\\\\0\"\[
\t\]+#\[ \t\]+DW_AT_name\[\n\r\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"T<int>\\\\0\"\[
\t\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_template_type_param\\)\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*#\[