From patchwork Wed Sep 19 01:37:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 184902 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 D24042C0094 for ; Wed, 19 Sep 2012 11:37:59 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1348623481; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Received:Date:Message-Id:From:To:CC: In-reply-to:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=P+g41YeWS7QZfVgLy84mwN450SM=; b=bzIdi3aUfeJbe9O Ttn83vHyC9+EjCjkGLj1m+FFZSMHaezOHATHgmV8/kUoe6SxQ2CTZYQeGdx9kdO3 W7PEYCeeMoo0ow6URtsIXA8fIjfLYBtfM49siXMHBhC1XbEm9FLM1qmOKRUbhgNm ZlGxbABU3LMQi5IcId6RPVaFSc+E= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Received:Received:Date:Message-Id:From:To:CC:In-reply-to:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=JjWHWWso6DQ99HmCgAZHB0vLRKfLejC0fNbabEIBsNEwqEjbmvH2xN67n258+8 HPGfQB/WJNZO215Qr8T3vZ5iRTZJYkcbKVSxe4YvLYwOoJrLLdslM4afYwkqUNAw owePw0TyGw+1fT87gXkJdp3TNQfvSPedQzl01jFMSph8w=; Received: (qmail 28349 invoked by alias); 19 Sep 2012 01:37:56 -0000 Received: (qmail 28341 invoked by uid 22791); 19 Sep 2012 01:37:55 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED, RCVD_IN_HOSTKARMA_NO, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ra.se.axis.com (HELO ra.se.axis.com) (195.60.68.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Sep 2012 01:37:42 +0000 Received: from localhost (localhost [127.0.0.1]) by ra.se.axis.com (Postfix) with ESMTP id 1E75D182F52; Wed, 19 Sep 2012 03:37:40 +0200 (CEST) Received: from ra.se.axis.com ([127.0.0.1]) by localhost (ra.se.axis.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 2tQq5ORL2hig; Wed, 19 Sep 2012 03:37:38 +0200 (CEST) Received: from seth.se.axis.com (seth.se.axis.com [10.0.2.172]) by ra.se.axis.com (Postfix) with ESMTP id 74B6D182F48; Wed, 19 Sep 2012 03:37:38 +0200 (CEST) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by seth.se.axis.com (Postfix) with ESMTP id 687043E0EB; Wed, 19 Sep 2012 03:37:38 +0200 (CEST) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id q8J1bcd0025304; Wed, 19 Sep 2012 03:37:38 +0200 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id q8J1bbWu025300; Wed, 19 Sep 2012 03:37:37 +0200 Date: Wed, 19 Sep 2012 03:37:37 +0200 Message-Id: <201209190137.q8J1bbWu025300@ignucius.se.axis.com> From: Hans-Peter Nilsson To: dave.anglin@nrc-cnrc.gc.ca CC: gcc-patches@gcc.gnu.org In-reply-to: <20120916171318.GB27493@hiauly1.hia.nrc.ca> (message from John David Anglin on Sun, 16 Sep 2012 19:13:19 +0200) Subject: Re: [committed] Fix g++.dg/debug/dwarf2/nested-3.C to handle hppa assembler comment MIME-Version: 1.0 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 > From: John David Anglin > Date: Sun, 16 Sep 2012 19:13:19 +0200 > This adjusts the regexp to work on hppa. Tested on hppa2.0w-hp-hpux11.11 > and hppa64-hp-hpux11.11. Committed to trunk. > 2012-09-16 John David Anglin > > PR debug/54460 > * g++.dg/debug/dwarf2/nested-3.C: Add hppa assembler comment character > to scary regexp. (Changing "\[^#/!|@\]*\[#/!|@\]" into "\[^#;/!|@\]*\[#;/!|@\]") The pa/pa.h ASM_COMMENT_START is ";". This caused a regression for cris-elf which is apparently one of the few targets to use the *default* value of ";#" for ASM_COMMENT_START. A very portable sequence, by the way, too bad almost all other targets define their own. FWIW, the port most of you'd want to look up has "#". I committed the following, adding a + after the set of matched comment characters to match any repetition and combination of them. The sibling test-case, nested-2.C, had a similar flaw. * g++.dg/debug/dwarf2/nested-3.C: Match a sequence of asm-comment characters instead of a single one. * g++.dg/debug/dwarf2/nested-2.C: Similar. brgds, H-P --- g++.dg/debug/dwarf2/nested-3.C (revision 191314) +++ g++.dg/debug/dwarf2/nested-3.C (working copy) @@ -59,4 +59,4 @@ // // Hence the scary regexp: // -// { dg-final { scan-assembler "\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\) DW_TAG_namespace\\)\[\n\r\]+\[^\n\r\]*\"thread\[\^\n\r]+\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\) DW_TAG_class_type\\)(\[\n\r\]+\[^\n\r\]*)+\"Executor\[^\n\r\]+\[\n\r\]+\[^\n\r\]*DW_AT_declaration\[\n\r\]+\[^\n\r\]*DW_AT_signature\[^#;/!|@\]*\[#;/!|@\] \[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_subprogram\\)\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*\"CurrentExecutor\[^\n\r\]+\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*end of children of DIE 0x\\3\[\n\r]+\[^\n\r\]*end of children of DIE 0x\\1\[\n\r]+" } } +// { dg-final { scan-assembler "\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\) DW_TAG_namespace\\)\[\n\r\]+\[^\n\r\]*\"thread\[\^\n\r]+\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\) DW_TAG_class_type\\)(\[\n\r\]+\[^\n\r\]*)+\"Executor\[^\n\r\]+\[\n\r\]+\[^\n\r\]*DW_AT_declaration\[\n\r\]+\[^\n\r\]*DW_AT_signature\[^#;/!|@\]*\[#;/!|@\]+ \[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_subprogram\\)\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*\"CurrentExecutor\[^\n\r\]+\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*end of children of DIE 0x\\3\[\n\r]+\[^\n\r\]*end of children of DIE 0x\\1\[\n\r]+" } } --- g++.dg/debug/dwarf2/nested-2.C (revision 191455) +++ g++.dg/debug/dwarf2/nested-2.C (working copy) @@ -32,6 +32,6 @@ We want to express that the DIE of S::T< 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\]*\(\[@|#;!\]|//?\)\[ \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\\\\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\]*" } } */