From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54154 invoked by alias); 31 Jan 2018 22:20:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 54124 invoked by uid 89); 31 Jan 2018 22:20:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-19.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=adjusted X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Jan 2018 22:20:02 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 7B21F16A for ; Wed, 31 Jan 2018 23:19:39 +0100 (CET) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id PGQly8E-0h8I for ; Wed, 31 Jan 2018 23:19:36 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4FDDBE2C.dip0.t-ipconnect.de [79.221.190.44]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 8EDE0169 for ; Wed, 31 Jan 2018 23:19:36 +0100 (CET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Subject: [testsuite] Fix comdat_group check with Solaris as Date: Wed, 31 Jan 2018 23:07:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg02497.txt.bz2 --=-=-= Content-Type: text/plain Content-length: 2351 While refining the COMDAT group on Solaris 10 patch https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02257.html I noticed that the comdat_group effective-target keyword didn't work when using Solaris as. No wonder, actually, given the different syntaxes used: * with sparc as .group _Z3foov,".text._Z3foov%_Z3foov",#comdat * with x86 as: .group _Z3foov,.text._Z3foov%_Z3foov,#comdat * with gas (sparc and x86): .section .text._Z3foov,"axG",@progbits,_Z3foov,comdat The following patch fixes this. Bootstrapped without regressions on i386-pc-solaris2.11 and sparc-sun-solaris2.11 (as and gas each). The only existing uses change as expected: * With as: g++.dg/tm/pr47573.C UNSUPPORTED -> PASS g++.dg/ipa/pr64612.C scans now PASS * With gas: no change At the same time, I've adjusted g++.dg/debug/dwarf2/nested-4.C as follows: before, the scan-assembler-times "debug_types" 2 test was xfailed on *-*-solaris2.1[1-9]* && !gas. The reason is as follows: * With Solaris as, COMDAT group syntax is differs, so we have .section .debug_types%wt.4e05dcd4da926741,"",@progbits .group wt.4e05dcd4da926741,.debug_types%wt.4e05dcd4da926741,#comdat .section .debug_types%wt.b606c86c38313abe,"",@progbits .group wt.b606c86c38313abe,.debug_types%wt.b606c86c38313abe,#comdat .section .debug_types%wt.b606c86c38313abe,"",@progbits .section .debug_types%wt.4e05dcd4da926741,"",@progbits * With gas or as, but no comdat, we have .section .debug_types,"",@progbits .section .debug_types,"",@progbits * With gas and comdat, we have .section .debug_types,"G",@progbits,wt.4e05dcd4da926741,comdat .section .debug_types,"G",@progbits,wt.b606c86c38313abe,comdat So we need to xfail in the as/comdat case, as this patch does. Installed on mainline. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2018-01-28 Rainer Orth gcc/testsuite: * lib/target-supports.exp (check_effective_target_comdat_group): Allow for Solaris as comdat syntax. * g++.dg/debug/dwarf2/nested-4.C: Xfail scan-assembler-times on Solaris with comdat_group support and as. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=testsuite-comdat_group-solaris-as.patch Content-length: 1368 # HG changeset patch # Parent 1125e724541b493d75e4a215f8426cb530d7f623 Fix comdat_group check with Solaris as diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -8985,7 +8985,7 @@ proc check_effective_target_tls_get_addr # Return 1 if the target uses comdat groups. proc check_effective_target_comdat_group {} { - return [check_no_messages_and_pattern comdat_group "\.section\[^\n\r]*,comdat" assembly { + return [check_no_messages_and_pattern comdat_group "\.section\[^\n\r]*,comdat|\.group\[^\n\r]*,#comdat" assembly { // C++ inline int foo () { return 1; } int (*fn) () = foo; diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C --- a/gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C +++ b/gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C @@ -1,6 +1,6 @@ // PR debug/53235 // { dg-options "-gdwarf-4 -fdebug-types-section" } -// { dg-final { scan-assembler-times "debug_types" 2 { xfail { powerpc-ibm-aix* || { *-*-darwin* || { *-*-solaris2.1[1-9]* && { ! gas } } } } } } } +// { dg-final { scan-assembler-times "debug_types" 2 { xfail { powerpc-ibm-aix* || { *-*-darwin* || { *-*-solaris2.* && { comdat_group && { ! gas } } } } } } } } namespace E { class O {}; --=-=-=--