From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3250 invoked by alias); 16 Oct 2011 18:38:57 -0000 Received: (qmail 3242 invoked by uid 22791); 16 Oct 2011 18:38:56 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 16 Oct 2011 18:38:42 +0000 Received: from sunsite.mff.cuni.cz (localhost [127.0.0.1]) by sunsite.mff.cuni.cz (8.14.5/8.14.5) with ESMTP id p9GIccQB022515; Sun, 16 Oct 2011 20:38:38 +0200 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.14.5/8.14.5/Submit) id p9GIcbZc022514; Sun, 16 Oct 2011 20:38:37 +0200 Date: Mon, 17 Oct 2011 04:08:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: gcc@gcc.gnu.org Subject: Re: asm in inline function invalidating function attributes? Message-ID: <20111016183837.GW27949@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00243.txt.bz2 On Sat, Oct 15, 2011 at 05:52:03PM -0400, Ulrich Drepper wrote: > I think gcc should allow the programmer to tell it something about a > function return value even if the function is inlined and the compiler > can see all the code. Consider the code below. If this is about e.g. 2011-09-14 Ulrich Drepper * sysdeps/x86_64/fpu/bits/mathinline.h (__MATH_INLINE): Use __extern_always_inline. Define lrint{f,} and llrint{f,} for 64-bit and in some situations for 32-bit. then I'd say these inlines are the wrong direction, gcc (tried 4.6/trunk only) has lrint{,f,l} builtin, and for -ffast-math it will optimize it into cvtsd2siq etc. (both for -m64 and for -m32 -msse2 -mfmath=sse). It will be handled as const, and furthermore gcc will constant fold it (lrint (7.5) will be resolved at compile time). Jakub