This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/34678] Optimization generates incorrect code with -frounding-math option (#pragma STDC FENV_ACCESS not implemented)
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Oct 2008 16:39:33 -0000
- Subject: [Bug middle-end/34678] Optimization generates incorrect code with -frounding-math option (#pragma STDC FENV_ACCESS not implemented)
- References: <bug-34678-5307@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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
<http://gcc.gnu.org/c99status.html>, 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