From patchwork Wed Jan 31 22:19:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 868090 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-472426-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="dJ+NwefM"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zWyNs5dRJz9ryr for ; Thu, 1 Feb 2018 09:20:12 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=O6yeySf4ce0O+qMvo7Ms/+jvyQx5YGXqn4Z69XS0+HScGyuZ+4fTJ EhwzH12Hy3SMw96RTAxucFnTquacMoPZT68u0wgUtdAccIAt58br+mc/gKIDBr7m kjnc3exGGSpELQQfS/pYk+rXfuEVfL5e6QnKVCoyT1Js4yZ4JCny1c= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=AyP4mhrwrS7EMKSzopWnopjwIwc=; b=dJ+NwefMBX5k0oZXa4t8 ibnVjiAA2vCnmShYV1sSNFTkXJ1jYYE/dFXPLLudnEVnVZ9iCZhtexOqDiA6ZImW ubu696tQzDjfkYFkeVQNP0X9T5PAQbnLrnMb3L7nEpObIHjDz0IUAsv2fPTyVusE YyGKWD3HCPPqeahztHm/Jco= 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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:19:34 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes 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 # 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 {};