From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19325 invoked by alias); 14 Feb 2008 22:03:37 -0000 Received: (qmail 19180 invoked by uid 48); 14 Feb 2008 22:02:49 -0000 Date: Thu, 14 Feb 2008 22:03:00 -0000 Subject: [Bug tree-optimization/35202] New: [4.1/4.2/4.3 Regression] exp->expf transformation incorrect with -fmath-errno X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jsm28 at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg01583.txt.bz2 GCC converts calls such as (float)exp((double)f), where f is a float, into calls to the corresponding mathematical functions for float, such as expf. However, if the result overflows the range of float but not that of double, the conversion is unsafe with -fmath-errno (on by default on most targets): errno may be set by the call to the float function but not by the call to the double function, so the compiler may be wrongly causing errno to be set for such arguments. This problem applies to all of the functions where the result for some float argument overflows the range of float but not double. (This is a regression from the compiler versions without this optimization.) -- Summary: [4.1/4.2/4.3 Regression] exp->expf transformation incorrect with -fmath-errno Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jsm28 at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35202