From patchwork Tue May 21 16:38:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 1102928 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-501375-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="f5h66mpD"; 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 457hKc2jmGz9s55 for ; Wed, 22 May 2019 02:38:43 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:mime-version:subject :message-id:date:to; q=dns; s=default; b=C1afi6SA22OTnmfAf98Khpr 2gak2wImzYy8vAoq/11f2VM1qmgCNURt8dIRoEd11Po++kASv5j3AKmAz2z+P2zk ZU++44h8dDGZ4+WmN7ZVQDG36W/IHgyjaT8AKylfSNJXIB64YoppjJ/tLpWDzrt1 1oDjAHGKgbtJvCw3Hbi4= 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 :content-type:content-transfer-encoding:mime-version:subject :message-id:date:to; s=default; bh=rKFbUz8K5dTQNYYx1qGoy5P6NTw=; b= f5h66mpD5vY9mAwY9EPtZohwVJL5M7zule32/fkDFVIAhjC3u8LY/OMWtMf2BaEw GA8/RlAJ2zf55KFsuKFQwAdAOuZwhNlKTm5sq3uT6/pWNW1bwjyCLymYf8vI9Lgy diW8TlJWao1GLm6U+DfWyktHkKouVzsdyNNRMfYr3ys= Received: (qmail 124844 invoked by alias); 21 May 2019 16:38:36 -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 124836 invoked by uid 89); 21 May 2019 16:38:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_COUK, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=*-*-darwin*, **darwin*, placed, explain X-HELO: smtp2.wavenetuk.net Received: from smtp.wavenetuk.net (HELO smtp2.wavenetuk.net) (195.26.37.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 May 2019 16:38:35 +0000 Received: from euterpe-sie.home (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by smtp2.wavenetuk.net (Postfix) with ESMTPA id D0CDC6001D7 for ; Tue, 21 May 2019 17:38:31 +0100 (BST) From: Iain Sandoe Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [PATCH, Darwin, testsuite] Fix PR 63891. Message-Id: Date: Tue, 21 May 2019 17:38:29 +0100 To: GCC-patches This is a testcase failing because one part of the codegen is (correctly) generating the scan-asm-not signature. Fixed by altering the build options. tested on x86_64-darwin16, applied to mainline, Iain gcc/testsuite/ 2019-05-21 Iain Sandoe PR target/63891 * gcc.dg/darwin-weakimport-3.c: Adjust options and explain the reasons. 2019-05-21 Uroš Bizjak * gcc.target/i386/vect-signbitf.c: New test. diff --git a/gcc/testsuite/gcc.dg/darwin-weakimport-3.c b/gcc/testsuite/gcc.dg/darwin-weakimport-3.c index 77ab980..a15b5b0 100644 --- a/gcc/testsuite/gcc.dg/darwin-weakimport-3.c +++ b/gcc/testsuite/gcc.dg/darwin-weakimport-3.c @@ -1,5 +1,20 @@ /* { dg-do compile { target *-*-darwin* } } */ -/* { dg-options "-fno-asynchronous-unwind-tables" } */ + +/* Here we want to test if "foo" gets placed into a coalesced + section (it should not). + + However, for i386, and PIC code we have a "get_pc thunk" that + is (correctly) placed in a coalesced section when using an older + linker - also unwind tables are emitted into coalesced. + + With modern linkers this is moot, since even weak symbols + are emitted into the regular sections. + + To avoid the unwind tables -fno-asynchronous-unwind-tables. + To ensure that we emit code for an older linker -mtarget-linker + To avoid the get_pc thunk optimise at least O1. */ + +/* { dg-options "-fno-asynchronous-unwind-tables -O1 -mtarget-linker 85.2" } */ /* { dg-require-weak "" } */ /* { dg-final { scan-assembler-not "coalesced" } } */