This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Fix PR middle-end/30789, complex math folding via MPC
On Fri, 14 Aug 2009, Joseph S. Myers wrote:
> On Fri, 14 Aug 2009, Kaveh R. GHAZI wrote:
>
> > The Annex G special cases only occur in cases where NaN is returned. Since
> > GCC's MPC infrastructure already backs out when encountering NaN values,
> > using MPC here means folding doesn't occur and the correct Annex G values
> > are calculated by libgcc at runtime.
>
> These cases still need to work in static initializers, so you may need to
That is,
* Arithmetic constant expressions involving complex numbers have to be
folded in static initializers, including when the result involves
overflow, underflow, exact infinities or NaNs; failing to fold is never OK
there.
* The same special cases apply in static initializers as elsewhere.
--
Joseph S. Myers
joseph@codesourcery.com