From owner-freebsd-current@FreeBSD.ORG Tue Apr 3 14:08:31 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9BD51065670 for ; Tue, 3 Apr 2012 14:08:31 +0000 (UTC) (envelope-from tmueller@sysgo.com) Received: from mail1.sysgo.com (mail1.sysgo.com [176.9.26.183]) by mx1.freebsd.org (Postfix) with ESMTP id 847078FC12 for ; Tue, 3 Apr 2012 14:08:31 +0000 (UTC) Received: from lantia.sysgo.com (unknown [172.22.2.7]) by mail1.sysgo.com (Postfix) with ESMTP id 6CD2046170; Tue, 3 Apr 2012 15:58:33 +0200 (CEST) Received: by lantia.sysgo.com (Postfix, from userid 113) id 494872662F2; Tue, 3 Apr 2012 15:58:33 +0200 (CEST) Received: from tmu.ulm.sysgo.com (tmu.ulm.sysgo.com [172.30.3.10]) by lantia.sysgo.com (Postfix) with ESMTP id D8D9A2662F0; Tue, 3 Apr 2012 15:58:32 +0200 (CEST) Date: Tue, 3 Apr 2012 15:58:33 +0200 From: Thomas Mueller To: Andrey Simonenko Message-ID: <20120403155833.2f084c75@tmu.ulm.sysgo.com> In-Reply-To: <20120403112111.GA39616@pm513-1.comsys.ntu-kpi.kiev.ua> References: <20120403112111.GA39616@pm513-1.comsys.ntu-kpi.kiev.ua> Organization: SYSGO AG X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 03 Apr 2012 15:12:49 +0000 Cc: freebsd-current@freebsd.org Subject: Re: -ffast-math in Ports and wrong generated code X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2012 14:08:31 -0000 On Tue, 3 Apr 2012 14:21:11 +0300, Andrey Simonenko wrote: > At least finite() function call was eliminated from the result Assembler > code when -ffast-math option is used, tested on 9.0-STABLE and 10.0-CURRENT. The documentation for -ffast-math once (GCC 3.x?) contained -ffast-math Might allow some programs designed to not be too dependent on IEEE behavior for floating-point to run faster, or die trying. which seems like what you're observing. -ffast-math includes -ffinite-math-only which assumes that floating-point arguments and results are never NaNs or +-Infs. Compiling your code with "-ffast-math -fno-finite-math-only" should restore the call to finite(). -- Thomas Mueller