From patchwork Fri Jan 19 09:12:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 189454 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp885605dyb; Fri, 19 Jan 2024 01:14:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5BXCHzcwnewhDgYuaPceAgR0Ew/uD23cxiDYGKNF5MIeV76wxkhdsA++g+ldBa/Octj+x X-Received: by 2002:a05:620a:848:b0:783:458e:2458 with SMTP id u8-20020a05620a084800b00783458e2458mr1070282qku.113.1705655640691; Fri, 19 Jan 2024 01:14:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705655640; cv=pass; d=google.com; s=arc-20160816; b=wM65YZgSBqG0mtO6V+gJYrOZI8eCPLpiiYRcfhkwiogHRVqZgjksADKsrBMFZ1VqnJ z2KEShZHshMZbSaY3XVfLl6JDJEy9HDE29GBzpSVXUlnhdQToHZE6L7VW361nC2+SNyq n1IjsQbGtu33Ru3nNiAZb00pj+u02E6cKklmLcRsiASEAQjdIMMBQHHAkcWqmurCAivt krMukvLarNhC1trc7MRl6KOjNnW/vmP9MB4ufzncQepjHcLXfsRMqe4XwmczOA5TC+TN bh2Be9YB1DskLb3MWhpSc89eB8VISUMnZ07MrJO1u282LPbJN2hieKr/Cduj1N2BTZBf Ad0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:date:subject:cc:to:from:dkim-signature:arc-filter :dmarc-filter:delivered-to; bh=PyNeR2dlINuSnoedJsGzu+J2x58lF2KJqkKP0nWDjb8=; fh=wfshXw0ENuECYcDrC+EJyqY/7ie8Zlrua1+JCLpicyk=; b=fUW+PW7W99tCujMHqnvjW79LD/J9uWLYsCPZt4TprvLp8NJ5G9BsSuNCBcM34H5S0/ YhrMMV5Hffpvszaswy7YMBcCOi7rjosDorLxOjEzp2JLefpi7v0R3/J/VuQ0OBZTLnwN jv9rglHHA0g/Kh8bRMvjZzdJF24upPA4tyhmeN7zwsvoRQPrVynhNkCk7dCi4ZN67n+5 Cnmw03kKMN+WoEk4Z7d5rRI0Evz5SqknG1PClPHFjVRtSqKHzW71XqWLRpErhh6M4O0m rFlvi0MDDJ5eN585Qwf8b4uW1Xr7t5bAUl9PmNxDwqGv5JC1wwlr3N6U9rmr4an0KBFR dDRg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cebitec.uni-bielefeld.de header.s=20200306 header.b=XRdeJsC+; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id l22-20020a05620a0c1600b00781565bc683si15516527qki.203.2024.01.19.01.14.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 01:14:00 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@cebitec.uni-bielefeld.de header.s=20200306 header.b=XRdeJsC+; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 50F693858415 for ; Fri, 19 Jan 2024 09:14:00 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 64081385840A for ; Fri, 19 Jan 2024 09:12:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 64081385840A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 64081385840A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=129.70.160.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705655563; cv=none; b=ouUcKxGpLSxRQQvJrUwEudoArr5d7/VB1H8NshbDN++MzrR3r2yGK5gFXrSlgHDcc0foIclMHOXtrO/sveRhLlBw+lLEEhBmH0LBaWuLF0OKNjBe5b0RpnsHk907W33z42Hwsjfb6TI52FZrBG9rG/XmxawqABZRZRzLN2CSTyE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705655563; c=relaxed/simple; bh=gmgo46tAWTRUCWcR3skpemaZk5HUxFX8nbGURAyHfzQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=HfestSORw3D6U0zINAf5qi27RY5R+Lt80E0VrQFqqc7dy6tmEqHxvtKRixtWVYYUAQBsQTEFh+cNnP6nXGv93a8FfqHspuMH13IwRpwWO2J3KLfXCa+ikSHkaxPLPUuFav7p8cCHtBvQy8QtaR6fnOdikGGb4Ouknyw+GpZCWyQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 5E1EDCDA8B; Fri, 19 Jan 2024 10:12:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= cebitec.uni-bielefeld.de; h=content-type:content-type :mime-version:user-agent:message-id:date:date:subject:subject :from:from:received:received; s=20200306; t=1705655559; bh=gmgo4 6tAWTRUCWcR3skpemaZk5HUxFX8nbGURAyHfzQ=; b=XRdeJsC+zXY95LMYI4WFv M2mPd0KA8EFvUby5iGumGHOBXXyNQ+vGGoTIIO44lBjn0lLGTXkkGlbEj79LZf5c KtPm7f+8o8Pk5VkOoPa12h7oHwwzIH8uMUaqmQr9Nu4/6XVnQREgBD2sX1Ax1HVf tTMSF8WPHyN8G2DXx7v+8GcVMvfIVg3Ec5PLpLEuIXaul15eA6ioPz/h23aKJROw wR8c2pAn15htNmJF++1j5IjH2XrD3zresF5KGblzxqT5edKa+FcURxTdo39ObjFL PJu7Ti0R87331E6k9+yJWpvvYsa8kW3am1MlvHt3oR2+dfkn+RQdcgKOVVjgwXLb g== X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id DY-FLPRvznvn; Fri, 19 Jan 2024 10:12:39 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p5085469a.dip0.t-ipconnect.de [80.133.70.154]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 9799CCD913; Fri, 19 Jan 2024 10:12:39 +0100 (CET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Patrick Palka , Jonathan Wakely Subject: [PATCH] c++: Fix g++.dg/ext/attr-section2.C etc. with Solaris/SPARC as Date: Fri, 19 Jan 2024 10:12:39 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 X-Spam-Status: No, score=-3790.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788509568976217988 X-GMAIL-MSGID: 1788509568976217988 The new g++.dg/ext/attr-section2*.C tests FAIL on Solaris/SPARC with the native assembler: +FAIL: g++.dg/ext/attr-section2.C -std=c++14 scan-assembler .(section|csect)[ \\\\t]+.foo +FAIL: g++.dg/ext/attr-section2.C -std=c++17 scan-assembler .(section|csect)[ \\\\t]+.foo +FAIL: g++.dg/ext/attr-section2.C -std=c++20 scan-assembler .(section|csect)[ \\\\t]+.foo The problem is that the SPARC assembler requires the section name to be double-quoted, like .section ".foo%_Z3varIiE",#alloc,#write,#progbits This patch allows for that. At the same time, it quotes literal dots in the REs. Tested on sparc-sun-solaris2.11 (as and gas) and i386-pc-solaris2.11 (as and gas). Ok for trunk? Rainer # HG changeset patch # Parent 7d0c57f448dfceb02583a770e09fa7907720ba7e c++: Fix g++.dg/ext/attr-section2.C etc. with Solaris/SPARC as diff --git a/gcc/testsuite/g++.dg/ext/attr-section2.C b/gcc/testsuite/g++.dg/ext/attr-section2.C --- a/gcc/testsuite/g++.dg/ext/attr-section2.C +++ b/gcc/testsuite/g++.dg/ext/attr-section2.C @@ -6,4 +6,4 @@ template template int var; -// { dg-final { scan-assembler {.(section|csect)[ \t]+.foo} } } +// { dg-final { scan-assembler {\.(section|csect)[ \t]+"?\.foo} } } diff --git a/gcc/testsuite/g++.dg/ext/attr-section2a.C b/gcc/testsuite/g++.dg/ext/attr-section2a.C --- a/gcc/testsuite/g++.dg/ext/attr-section2a.C +++ b/gcc/testsuite/g++.dg/ext/attr-section2a.C @@ -11,4 +11,4 @@ int A::var = 42; template struct A; -// { dg-final { scan-assembler {.(section|csect)[ \t]+.foo} } } +// { dg-final { scan-assembler {\.(section|csect)[ \t]+"?\.foo} } } diff --git a/gcc/testsuite/g++.dg/ext/attr-section2b.C b/gcc/testsuite/g++.dg/ext/attr-section2b.C --- a/gcc/testsuite/g++.dg/ext/attr-section2b.C +++ b/gcc/testsuite/g++.dg/ext/attr-section2b.C @@ -9,4 +9,4 @@ int* fun() { template int* fun(); -// { dg-final { scan-assembler {.(section|csect)[ \t]+.foo} } } +// { dg-final { scan-assembler {\.(section|csect)[ \t]+"?\.foo} } }