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

--- Comment #6 from kargls at comcast dot net ---
(In reply to mjr19 from comment #5)
> But 10.1.5.2.4 says "once the interpretation of a numeric intrinsic
> operation is established, the processor may evaluate any mathematically
> equivalent expression, provided that the integrity of parentheses is not
> violated."
> 
> As cmplx(r)*z and cmplx(r*real(z),r*aimag(z)) are mathematically equivalent,
> is a Fortran compiler not permitted to make this optimisation (unless
> conforming to F90 or F95, for 10.1.5.2.4 was first introduced in F2003)?
> 
> Furthermore, Fortran does not define how complex multiplication is to be
> performed, so relying on the precise details result when multiplying signed
> zeros or NaNs may be unwise.

See comment #3.  Type conversion occurs.

If you want to get a possibly wrong answer fast, use either -Ofast or
-ffast-math.

Reply via email to