[PATCH] PR debug/45024
H.J. Lu
hjl.tools@gmail.com
Sun Jul 25 14:55:00 GMT 2010
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.
--
H.J.
--
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\]*#\[
\t\]+end of children of DIE\[^\n\r\]*\[\n\r\]+\[^\n\r\]*end of
children of DIE\[^\n\r\]*" } }
+ { 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\]*\(#|//\)\[
\t\]+end of children of DIE\[^\n\r\]*\[\n\r\]+\[^\n\r\]*end of
children of DIE\[^\n\r\]*" } }
*/
More information about the Gcc-patches
mailing list