From patchwork Thu Sep 29 08:23:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 676550 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3sl6zv1GLyz9s8x for ; Thu, 29 Sep 2016 18:24:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=hjTCbNbt; dkim-atps=neutral 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:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=YCHSOzf847bAADwT J2yRjAY/GaliF2H6pGZUnWnZG8Ja3CxisIf6kq6+4ghaU82HV/UGBIpPddIbODJ0 asJ6exzZ0+Ct7Ey81o4yDB0f4b4Fu2+wErB6G/YPV3KRY4V4gJeVrmdLLzp9Oxs1 SLAOmLn33CMtc6x+/y3R6hUBcok= 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:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=9regrmP5j6TH1Q6+U7vTCi IqkqE=; b=hjTCbNbtt/2KaDbKj9zoHSP0ppuNK2AjvlNYtAFKZxOZrj13caY7YT ohDtpv18Y/Gg7crB62kn4M1bUmtb4xKEywe4TgkpRHyexWhaNaYRo+gF+2cBhJ79 HYs0ZsSjIIZy3DrWXol1JjmaUCLagi3H4F/oVmGfF4BaCrOruh730= Received: (qmail 9421 invoked by alias); 29 Sep 2016 08:24:00 -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 7813 invoked by uid 89); 29 Sep 2016 08:23:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.7 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*Ad:U*jh, ia32 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; Thu, 29 Sep 2016 08:23:49 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 46873675; Thu, 29 Sep 2016 10:23:46 +0200 (CEST) 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 HSBcpzTztZwo; Thu, 29 Sep 2016 10:23:43 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id C8B6B674; Thu, 29 Sep 2016 10:23:43 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id u8T8NgiY004458; Thu, 29 Sep 2016 10:23:42 +0200 (MEST) From: Rainer Orth To: Martin =?iso-8859-15?Q?Li=A8ka?= Cc: Jakub Jelinek , David Edelsohn , Nathan Sidwell , GCC Patches , Jan Hubicka , Andreas Schwab , Richard Biener Subject: Re: [PATCH] Detect whether target can use -fprofile-update=atomic References: <04a05835-4666-4d7d-c1a9-d4bcc4ea924a@suse.cz> <19c4a81d-6ecd-8c6e-b641-e257c1959baf@suse.cz> <43f60306-d6d6-47e4-758c-a806f661d6a0@acm.org> <07cadca7-913a-acad-2f49-482b19e97a72@suse.cz> <20160906125136.GG14857@tucnak.redhat.com> <20160906133145.GH14857@tucnak.redhat.com> Date: Thu, 29 Sep 2016 10:23:42 +0200 In-Reply-To: ("Martin =?iso-8859-15?Q?Li=A8ka=22's?= message of "Tue, 6 Sep 2016 15:45:09 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Hi Martin, > 2016-09-06 Martin Liska > > * gcc.dg/profile-update-warning.c: New test. [...] > diff --git a/gcc/testsuite/gcc.dg/profile-update-warning.c b/gcc/testsuite/gcc.dg/profile-update-warning.c > new file mode 100644 > index 0000000..0614fad > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/profile-update-warning.c > @@ -0,0 +1,7 @@ > +/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */ > +/* { dg-options "-fprofile-update=atomic -fprofile-generate -march=i386 -m32" } */ > + > +int main(int argc, char *argv[]) > +{ > + return 0; > +} /* { dg-warning "target does not support atomic profile update, single mode is selected" } */ this test FAILs on 32-bit-default x86 configurations like i386-pc-solaris2.* and i686-pc-linux-gnu for the 64-bit multilib: FAIL: gcc.dg/profile-update-warning.c (test for warnings, line 7) FAIL: gcc.dg/profile-update-warning.c (test for excess errors) Excess errors: cc1: error: CPU you selected does not support x86-64 instruction set cc1: error: CPU you selected does not support x86-64 instruction set What happens here is that -m64 is added after -march=i386 -m32, causing the error above. This doesn't happen for 64-bit-default targets: in the 64-bit case there's just the -m32 from the testcase, for the 32-bit multilib just another -m32 is added, so the 32-bit case ist tested twice. Fixed like this, tested on i386-pc-solaris2.12 and x86_64-pc-linux-gnu, installed. Rainer 2016-09-28 Rainer Orth * gcc.dg/profile-update-warning.c: Restrict to ia32. (dg-options): Remove -m32. # HG changeset patch # Parent b421ce4362a3675d9fc4aa98f23e3bfc85b5c4c6 Fix 64-bit gcc.dg/profile-update-warning.c diff --git a/gcc/testsuite/gcc.dg/profile-update-warning.c b/gcc/testsuite/gcc.dg/profile-update-warning.c --- a/gcc/testsuite/gcc.dg/profile-update-warning.c +++ b/gcc/testsuite/gcc.dg/profile-update-warning.c @@ -1,5 +1,5 @@ -/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */ -/* { dg-options "-fprofile-update=atomic -fprofile-generate -march=i386 -m32" } */ +/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ +/* { dg-options "-fprofile-update=atomic -fprofile-generate -march=i386" } */ int main(int argc, char *argv[]) {