From patchwork Thu May 5 14:30:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 618979 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 3r0y4d239bz9snm for ; Fri, 6 May 2016 00:30:39 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=T/4rHaiE; 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=AcgOx+4l8wSDEw56 qyHRJGHVnihd10u5sElY6upiTwYxOJr8xhNgDQSACkUnGMJIS5g3icqcQqYBF2Mf XxlPsU+USCpZHZK9CMUQj9MLklHHHwll+1cHChv5lizqkwnnP+cbRXIghFIn6428 gm9Wys2P4SVFK6GpXkZ2LHXPfkw= 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=U8hUqtGizAOkqlj0I+sIXe 8e+PM=; b=T/4rHaiEJopHg+EQb25PwVhYoSxRqlXhpEbe9ONRguaqahovjr7tGy MwKGUxmUnbXOcgxWV1m7M9vbtPJvDSK5T6ooJUrOuXuvOKW/V69YrvASnrEkwern AntEDFOGXNjvKVswY9y4AzA+wA4A3yXdkt8Ypl5rqj3ddbqH2636M= Received: (qmail 36801 invoked by alias); 5 May 2016 14:30:23 -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 36786 invoked by uid 89); 5 May 2016 14:30:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=claims 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, 05 May 2016 14:30:12 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 37F7C9E6; Thu, 5 May 2016 16:30:09 +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 5djbx1EM7nMw; Thu, 5 May 2016 16:30:07 +0200 (CEST) Received: from fuego.CeBiTec.Uni-Bielefeld.DE (p5DCE2DA2.dip0.t-ipconnect.de [93.206.45.162]) (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 A9F6D9E5; Thu, 5 May 2016 16:30:06 +0200 (CEST) From: Rainer Orth To: Richard Biener Cc: Christophe Lyon , Jan Hubicka , "gcc-patches\@gcc.gnu.org" Subject: Re: Inline across -ffast-math boundary References: <20160421114548.GA22377@kam.mff.cuni.cz> <20160502170137.GB46758@kam.mff.cuni.cz> Date: Thu, 05 May 2016 16:30:05 +0200 In-Reply-To: (Richard Biener's message of "Tue, 3 May 2016 14:46:36 +0200 (CEST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Richard Biener writes: >> >> This new testcase does not pass on bare-metal configs (using newlib), >> >> because: >> >> warning: implicit declaration of function 'isnanf' >> >> [-Wimplicit-function-declaration] >> >> warning: incompatible implicit declaration of built-in function 'isnanf' >> >> >> >> I'm not sure what's the appropriate dg-require to avoid this? >> > >> > c99_runtime I guess. >> > >> Indeed, that what was used in a previous occurrence of a similar >> problem (PR 69227). >> >> I've attached the small (obvious?) patch to make the new inline-8.c >> test UNSUPPORTED >> without c99_runtime. >> >> OK? > > Ok. The testcase still FAILs on Solaris: FAIL: gcc.dg/ipa/inline-8.c (test for excess errors) Excess errors: /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/ipa/inline-8.c:12:10: warning: implicit declaration of function 'isnanf' [-Wimplicit-function-declaration] The isnanf(3C) manpage claims that isnanf() is declared in (which is true), but the prototype is also in under __EXTENSIONS__ && !_XOPEN_SOURCE. The function is not in C99 or XPG7, and instead of trying to do the equivalent of AC_USE_SYSTEM_EXTENSIONS, I've followed the lead of gcc.target/arm/pr59896.c and just declare it in the testcase. Tested with the appropriate runtest invocations on i386-pc-solaris2.12 and x86_64-pc-linux-gnu, installed on mainline. Rainer 2016-05-04 Rainer Orth * gcc.dg/ipa/inline-8.c (isnanf): Declare. # HG changeset patch # Parent 7654b342bb270f12f16abf76b78e235c2798832f Declare isnanf in gcc.dg/ipa/inline-8.c diff --git a/gcc/testsuite/gcc.dg/ipa/inline-8.c b/gcc/testsuite/gcc.dg/ipa/inline-8.c --- a/gcc/testsuite/gcc.dg/ipa/inline-8.c +++ b/gcc/testsuite/gcc.dg/ipa/inline-8.c @@ -5,6 +5,7 @@ /* { dg-options "-O2" } */ /* { dg-add-options c99_runtime } */ #include +extern int isnanf (float); /* Can't be inlined because isnanf will be optimized out. */ int cmp (float a)