[Bug fortran/40318] Complex division by zero in gfortran returns wrong results

ghazi at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Jun 1 18:15:00 GMT 2009



------- Comment #10 from ghazi at gcc dot gnu dot org  2009-06-01 18:14 -------
(In reply to comment #9)
> If MPC returns inf or (inf + i inf) and the MPC developers do not consider
> this to be a bug in their library, then gfortran will need to handle the
> division by zero during constant folding as a special case.

I believe the goals for MPC are to follow C99 rules for special cases.  Thus
the return value of (inf + i inf) is intentional for MPC and not a bug in their
thinking.

I entirely agree that the compile-time and runtime results should be identical.
 If it is your intention to preserve the existing runtime behavior, then we
should do the same in the fortran folder and special case this if/when
converting complex division to use MPC.

Does this mean this PR should be closed as "invalid" ?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40318



More information about the Gcc-bugs mailing list