$ cat u.f90
implicit none
real, parameter :: r = transfer(0,0.)
real(kind=8), parameter :: rd = dble(b'00000000000000000000000000000000&
&01000000001010010101001111111101')
if (cmplx(b'00000000000000000000000000000000&
&01000000001010010101001111111101',0,8) /= rd) call abort
end
$ gfortran u.f90 && ./a.out
Aborted
That's on x86_64-linux, and the weird thing is: if you remove the useless
definition of r, it starts working again :) And yet valgrind doesn't have
anything to say. I'm mystified.
(PS: I found that one while investigating PR36186, but it's independent.)
--
Summary: Wrong simplification of BOZ constants
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36214