This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36214] Wrong simplification of BOZ constants
- 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: 10 Sep 2008 15:42:48 -0000
- Subject: [Bug fortran/36214] Wrong simplification of BOZ constants
- References: <bug-36214-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from kargl at gcc dot gnu dot org 2008-09-10 15:42 -------
Daniel,
I looked at this briefly last week. Here's another test case that might be
easier to trace.
implicit none
real(4) r
real(8) rd
complex(8) z
rd =
dble(b'0000000000000000000000000000000001000000001010010101001111111101')
z =
cmplx(b'0000000000000000000000000000000001000000001010010101001111111101',0,8)
r = 0.
if (z /= rd) call abort
end
Of course, bugzilla has wrapped the long lines.
-fdump-parse-tree gives
ASSIGN MAIN__:rd 5.31837115e-315_8
ASSIGN MAIN__:z (complex 5.3183711317956924e-315_8 0_8)
ASSIGN MAIN__:r 0
IF (/= MAIN__:z __convert_r8_c8[[((MAIN__:rd))]])
CALL _gfortran_abort ()
ENDIF
I suspect that the conversion of the boz to the rd value is
done with a kind=4 conversion rather than kind=8, but I haven't
been able to substantial my suspicions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36214