This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Kind of constants in generic intrinsics


Hi,

maybe this has been previously discussed but the following program

PROGRAM p
   INTEGER(KIND=4) :: A
   INTEGER(KIND=8) :: B

   A = NOT(0)
   B = NOT(0)
   PRINT *, A, B

   B = NOT(0_8)
   PRINT *, A, B
END PROGRAM p

prints in gfortran

          -1           4294967295
          -1                   -1

while in other compilers (I'm not saying they are correct) print

          -1                   -1
          -1                   -1

I'm not sure if gfortran behaviour is the expected one in Fortran 95,
isn't it ?

Thank you,

--
Roger Ferrer Ibáñez


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]