g77 boolean functions problems
Jacek M. Holeczek (holeczek@us.edu.pl)
Tue, 16 Mar 1999 11:00:49 +0100 (MET)
Hi,
It's not strictly a root problem, but ...
I use pgcc-1.1.1 and I think there is a problem with it's g77 compiler.
It's not clear if it is a problem of the pgcc, or the egcs-1.1.1 itself
In case it is a common problem of egcs-1.1.1 and pgcs-1.1.1, I think I
will need to downgrade to egcs-1.0.2 ( as comes with RH5.2 ). In this case
- are there any contraindications from the root team ?
I could also try the egcs-1.1b rpms - but does anyone has any good/bad
experience with this version ?
I would like to ask someone who has the "pure" egcs-1.1.1 ( and maybe
egcs-1.1b ) installed to test the following 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) } ( could you
please also send me the output from "g77 -v", as shown here ) :
--------------------------------------------------------------------------
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" ( and egcs-1.0.2 ) :
--------------------------------------------------------------------------
87654321
FFFFFFFF
87654321
876543
--------------------------------------------------------------------------
Thanks in advance,
Best regards,
Jacek.