This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34345] gfortran compiles SLATEC library, but the executable fails
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Dec 2007 12:55:07 -0000
- Subject: [Bug fortran/34345] gfortran compiles SLATEC library, but the executable fails
- References: <bug-34345-15478@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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