This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/24313] complex sqrt function does not return principal value
- 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: 11 Oct 2005 19:56:08 -0000
- Subject: [Bug libfortran/24313] complex sqrt function does not return principal value
- References: <bug-24313-10567@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from kargl at gcc dot gnu dot org 2005-10-11 19:56 -------
This is definitely a gcc bug.
gfortran -fdump-tree-original csqrt.f
yields (with removal of IO crap and shorting of long constants)
MAIN__ ()
{
complex4 y;
complex4 x;
x = __complex__ (0.0, -1.0e+0);
y = __builtin_csqrtf (x);
x = __complex__ (1.17549435082228750796873653722224e-38, -1.0e+0);
y = __builtin_csqrtf (x);
x = __complex__ (-1.175494350822287507968736537222e-38, -1.0e+0);
y = __builtin_csqrtf (x);
}
Note the use of __builtin_csqrtf().
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|WORKSFORME |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24313