From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16006 invoked by alias); 16 Oct 2008 16:40:55 -0000 Received: (qmail 15202 invoked by alias); 16 Oct 2008 16:39:33 -0000 Date: Thu, 16 Oct 2008 16:40:00 -0000 Message-ID: <20081016163933.15201.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/34678] Optimization generates incorrect code with -frounding-math option (#pragma STDC FENV_ACCESS not implemented) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "joseph at codesourcery dot com" 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-10/txt/msg01109.txt.bz2 ------- Comment #15 from joseph at codesourcery dot com 2008-10-16 16:39 ------- Subject: Re: Optimization generates incorrect code with -frounding-math option (#pragma STDC FENV_ACCESS not implemented) On Thu, 16 Oct 2008, vincent at vinc17 dot org wrote: > The compiler should generate correct code by default, and options like Sure, it generates correct code for the supported features, and , which is linked from the manual, documents the state of support for the features: standard pragmas are documented as Missing and IEC 60559 support as Broken, with the explanation: * IEC 60559 is IEEE 754 floating point. This works if and only if the hardware is perfectly compliant, but GCC does not define __STDC_IEC_559__ or implement the associated standard pragmas; nor do some options such as -frounding-math to enable the pragmas globally work in all cases (for example, required exceptions may not be generated) and contracting expressions (e.g., using fused multiply-add) is not restricted to source-language expressions as required by C99. So you are using features documented not to be fully implemented and whether they will work is unpredictable. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34678