> Hi,
>
> I'm experiencing difficulties in implementing
> 64 bit integers (INTEGER*8, KIND=8) types within F90.
> The problems occur with the PORTLAND GROUP pgf90
> compiler under LINUX, but not with the SGI f90 compiler.
> I have found at least two instances of what appears to be
> improper compiler behavior.
>
> My question: is this a compiler bug, or is it a F90
> implimentational error? If it is a compiler bug, does
> anyone have a workaround?
>
> !----------------------------------------------
> Here is the first instance:
>
> PROGRAM BreakPGF90
> INTEGER(KIND=8) :: I,K,Two
> Two=2_8
> DO K=0,63
> I=Two**K
> WRITE(*,*)K,' I = ',I
> ENDDO
> END PROGRAM
>
> With pgf90, I get 0's after k=31, but with SGI
> f90 I'm ok up to K=63.
>
> Under PGF90, I get what appears to be INTEGER*4:
>
> 30 I = 1073741824
> 31 I = -2147483648
> 32 I = 0
Did you check whether it was an output problem?
What happens if you assign the result to a REAL variable?
What happens if you compute Two**K/2048, when K >= 31?
> Thanks, Matt
>
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> Matt Challacombe
> Los Alamos National Laboratory http://www.t12.lanl.gov/~mchalla/
> Theoretical Division email: [log in to unmask]
> Group T-12, Mail Stop B268 phone: (505) 665-5905
> Los Alamos, New Mexico 87545 fax: (505) 665-3909
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|