Re: gfortran read of hex values
- From: Walter Spector <w6ws_xthisoutx@xxxxxxxxxxxxx>
- Date: Sat, 15 Dec 2007 08:32:33 -0800
James Van Buskirk wrote:
"Walter Spector" <w6ws_xthisoutx@xxxxxxxxxxxxx> wrote in message news:13m7nvpq3e7hrd7@xxxxxxxxxxxxxxxxxxxxx
That is pretty abusive. Even after changing the square brackets
back to (/ /), only 1 of the 5 compilers I tried would compile it.
Darn, I didn't realize that ifort passes MIL-STD 1753 intrinsics
with mixed KINDs by default. Here is a fix; see if more compilers
like it:
That helps a bit. Yes, ifort compiled and ran both versions. On
the second version:
IRIX f90 (MIPSpro 7.4.4m) does not like the REAL (1, KIND (pi)).
I think, by F95, it has a right to object. (Result of REAL is not
an INTEGER or CHARACTER.) So fixing the initialization
of pi to read the following, works:
integer, parameter :: one = 1.0
integer, parameter :: pi = transfer (ishft (HFu1,16)+HFl1, one)
G95 compiled the (unmodified) second version, but gave a runtime
error when doing the decode in the main program. It doesn't like
using hex conversion into a REAL variable. (Again, I think that
by F95, the RTL has a right to complain.) It works by changing
the main program to:
integer :: ipi1
real :: pi1
equivalence (ipi1, pi1)
...
read(cpi,'(z8)') pi1
Salford loses track of I and whines that it isn't a parameter.
(Simpler cases of using I in an array constructor work OK though.)
And finally gfortran loses track of things when doing the initialization
of ARR1 - which then cascades into errors when initializing HFu1 and HFl1.
Bottom line is that if you fix the two non-Standardisms (by f95), the
success rate goes up to 3 of 5. Salford and gfortran have bugs to fix.
W.
.
- Follow-Ups:
- Re: gfortran read of hex values
- From: James Van Buskirk
- Re: gfortran read of hex values
- From: Walter Spector
- Re: gfortran read of hex values
- References:
- gfortran read of hex values
- From: trizzzat
- Re: gfortran read of hex values
- From: Tobias Burnus
- Re: gfortran read of hex values
- From: Richard Maine
- Re: gfortran read of hex values
- From: trizzzat
- Re: gfortran read of hex values
- From: James Van Buskirk
- Re: gfortran read of hex values
- From: FX
- Re: gfortran read of hex values
- From: James Van Buskirk
- Re: gfortran read of hex values
- From: Walter Spector
- Re: gfortran read of hex values
- From: James Van Buskirk
- gfortran read of hex values
- Prev by Date: Re: "actual argument keyword name"
- Next by Date: Re: "actual argument keyword name"
- Previous by thread: Re: gfortran read of hex values
- Next by thread: Re: gfortran read of hex values
- Index(es):
Relevant Pages
|