From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Content-Type: multipart/mixed; boundary="=-=-=" 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 List-Id: --=-=-= Content-Type: text/plain 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 -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2024-01-18 Rainer Orth gcc/testsuite: * g++.dg/ext/attr-section2.C (scan-assembler): Quote dots. Allow for double-quoted section name. * g++.dg/ext/attr-section2a.C: Likewise. * g++.dg/ext/attr-section2b.C: Likewise. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sol2sparc-testsuite-attr-section2-as.patch # 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} } } --=-=-=--