From patchwork Sun Jul 25 14:55:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 59874 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id D5BF5B6F04 for ; Mon, 26 Jul 2010 00:55:24 +1000 (EST) Received: (qmail 4780 invoked by alias); 25 Jul 2010 14:55:23 -0000 Received: (qmail 4767 invoked by uid 22791); 25 Jul 2010 14:55:22 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-vw0-f47.google.com (HELO mail-vw0-f47.google.com) (209.85.212.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 25 Jul 2010 14:55:17 +0000 Received: by vws13 with SMTP id 13so1827311vws.20 for ; Sun, 25 Jul 2010 07:55:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.62.201 with SMTP id y9mr3313992vch.220.1280069713911; Sun, 25 Jul 2010 07:55:13 -0700 (PDT) Received: by 10.220.194.134 with HTTP; Sun, 25 Jul 2010 07:55:13 -0700 (PDT) In-Reply-To: References: Date: Sun, 25 Jul 2010 07:55:13 -0700 Message-ID: Subject: Re: [PATCH] PR debug/45024 From: "H.J. Lu" To: Dodji Seketeli Cc: GCC Patches , Jason Merrill X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Sun, Jul 25, 2010 at 7:38 AM, H.J. Lu wrote: > On Thu, Jul 22, 2010 at 2:44 AM, Dodji Seketeli wrote: >> Hello, >> >> Consider this testcase: >> struct S { >>  template struct T { }; >> }; >> >> S::T tval; >> >> In this PR, the DIE of S::T 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. Index: ChangeLog =================================================================== --- ChangeLog (revision 162510) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2010-07-25 H.J. Lu + + PR testsuite/45068 + * g++.dg/debug/dwarf2/nested-2.C: Support "//" as comments. + 2010-07-24 Richard Guenther 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\\\\0\"\[ \t\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_template_type_param\\)\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*#\[