Mail Archives: pgcc/1999/03/15/08:53:13
Hi,
Please note that there seems to be a bug in g77 boolean functions :
--------------------------------------------------------------------------
integer*4 ibol,ibol1,ipas,ipas1
ibol = '87654321'x
print'(z8)',ibol
ibol1 = 'ffffffff'x
print'(z8)',ibol1
ipas=iand(ibol,ibol1)
print'(z8)',ipas
ipas1=ishft(ipas,-8)
print'(z8)',ipas1
stop
end
--------------------------------------------------------------------------
Wrong output from "g77 -g" { g77 version pgcc-2.91.60 19981201
(egcs-1.1.1 release) (from FSF-g77 version 0.5.24-19980804) } :
--------------------------------------------------------------------------
87654321
FFFFFFFF
21
0
--------------------------------------------------------------------------
In both cases ( iand, ishft ) only the least significant BYTE is taken into
account ( instead of the whole integer ).
Correct output from "fort77" :
--------------------------------------------------------------------------
87654321
FFFFFFFF
87654321
876543
--------------------------------------------------------------------------
Best regards,
Jacek.
P.S. Please answer directly to me, I'm not on your list. Thanks in
advance, Jacek.
- Raw text -