[Bug middle-end/84891] -fno-signed-zeros leads to optimization which should be possible only if also -ffinite-math-only is on

sgk at troutmask dot apl.washington.edu gcc-bugzilla@gcc.gnu.org
Mon Mar 19 15:22:00 GMT 2018


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

--- Comment #7 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Mon, Mar 19, 2018 at 08:01:17AM -0700, Steve Kargl wrote:
> > I can't find anything in the Fortran2008 standard specifying how
> > arithmetic on intrinsic complex types work.  CCing two Fortran maintainers
> > to see whether Fortran requires us to do any changes here.

I forgot about what I believe are default setting.

'-fcx-fortran-rules'
     Complex multiplication and division follow Fortran rules.  Range
     reduction is done as part of complex division, but there is no
     checking whether the result of a complex multiplication or division
     is 'NaN + I*NaN', with an attempt to rescue the situation in that
     case.

I also believe that 

'-fcx-limited-range'
     When enabled, this option states that a range reduction step is not
     needed when performing complex division.  Also, there is no
     checking whether the result of a complex multiplication or division
     is 'NaN + I*NaN', with an attempt to rescue the situation in that
     case.  The default is '-fno-cx-limited-range', but is enabled by
     '-ffast-math'.

is active, but I can't find where either is set.


More information about the Gcc-bugs mailing list