[Bug fortran/34345] gfortran compiles SLATEC library, but the executable fails

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Dec 5 12:55:00 GMT 2007



------- Comment #1 from burnus at gcc dot gnu dot org  2007-12-05 12:55 -------
I think the problem is the interpretation of:

      DATA DMACH(1) / Z'0010000000000000' /

as DMACH is REAL. The Fortran standard only allows BOZ in DATA for integers.
Fortran 2003 also allows, e.g.,
     real :: r = REAL(Z'00000000')
where REAL() is mandatory.

The problem for you program is that gfortran interprets Z'0010000000000000' as
bit-pattern for an integer and converts the integer *then* to a REAL.

Other compilers regard that BOZ as bitpattern of the REAL variable. This bug is
probably a duplicate of either of PR 34342, PR 18026 or PR 29471.


-- 


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



More information about the Gcc-bugs mailing list