This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/40675] Support -fnosign-zero for SIGN intrinsic for Fortran 77 compatibility
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jul 2009 16:56:11 -0000
- Subject: [Bug fortran/40675] Support -fnosign-zero for SIGN intrinsic for Fortran 77 compatibility
- References: <bug-40675-3783@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from kargl at gcc dot gnu dot org 2009-07-08 16:56 -------
(In reply to comment #11)
> Created an attachment (id=18158)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18158&action=view) [edit]
> Patch - lightly tested
>
> Attached patch fixes the problem [independent of
> "-f(no-)signed-zeros"/-ffast-math].
>
> The crucial option is "-fno-sign-zero" (which shall not be confused with
> -f(no-)signed-zeros):
>
> $ gfortran -O3 -fno-sign-zero ahfj.f90 && ./a.out
> With val = 0.0000000 test = 0.0000000
> pass
>
I've tested the patch and the -ftree-dump-original output
looks correct. I've also attached two testcase for the
testsuite. I do note that this option is activated by
-std=legacy. Perhaps, it should be.
Patch is okay.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40675