https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122082

--- Comment #9 from Harald van Dijk <harald at gigawatt dot nl> ---
(In reply to kargls from comment #8)
> Now, if you had correctly written code with parenthesis, you get
> 
> % ./z
> Assertion failed: ((FE_OVERFLOW|FE_INEXACT) == flags), function main, file
> a.c, line 25.
> Abort (core dumped)
> 
> which means you'll never see the issue with imaginary part.

True but this is the same issue. flags gets set to
(FE_OVERFLOW|FE_INEXACT|FE_INVALID), causing this assertion to fail. The
intermediate operation that is causing FE_INVALID to be set is the same one
that causes the imaginary part to be set to NAN, and avoiding that intermediate
operation would make both assertions pass at the same time.

Reply via email to