This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] PATCH -- correct underflowing of complex types.
On Sun, Jun 20, 2004 at 08:38:18PM +0200, Tobias Schl?ter wrote:
> Steve Kargl wrote:
> >
> >I don't have commit access. Can you commit the fix?
>
> I just checked it in. This looks like one could create a testcase, does
> something like this trigger an error before your patch?
>
> complex, parameter :: c = (3.,3.) - (SQRT(9.),SQRT(9.))
>
> if (c.ne.(0.,0.)) call abort()
> end
>
I haven't bootstrapped and tested this change because it
seemed obvious. The code I changed is a cut-n-paste
bug from an earlier patch I submitted. The G77 test suite
or NIST suite includes something similar to
program b
implicit none
real x
complex y
x = abs(sqrt(9.125)**2 - 9.125)
y = cabs(cexp((-2.5, 1.375))) - exp(5.0 / (-2.0))
print *, 'x = ', x
print *, 'y = ', y
end program b
The above program didn't test the code path I just changed,
which is why I missed the cut-n-paste bug.
--
Steve