This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/61119] gcc miscompiles code using cexp when using --fast-math
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 May 2014 22:53:40 +0000
- Subject: [Bug middle-end/61119] gcc miscompiles code using cexp when using --fast-math
- Auto-submitted: auto-generated
- References: <bug-61119-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61119
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c |middle-end
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like the gimplification is not handling SAVE_EXPR correctly:
complex double val = COMPLEX_EXPR <SAVE_EXPR <__builtin_exp ((double) fun
())> * REALPART_EXPR <SAVE_EXPR <__builtin_cexpi (fun ();, 0.0)>>, SAVE_EXPR
<__builtin_exp ((double) fun ())> * IMAGPART_EXPR <SAVE_EXPR <__builtin_cexpi
(fun ();, 0.0)>>>;