flang icon indicating copy to clipboard operation
flang copied to clipboard

int64 type not properly recognised in equivalence causing error

Open 2sn opened this issue 5 years ago • 1 comments

I am using f18 version 11.0.0 from Fedora 34 rawhide (run on Fedora 33)

with the definitions

      INTEGER, PARAMETER :: int64 = SELECTED_INT_KIND(16)
      INTEGER, PARAMETER :: real64 = SELECTED_REAL_KIND(15)
      integer(kind=int32), parameter :: noparmz = 128
      real(kind=real64), dimension(noparmz) ::  odum
      integer(kind=int64), dimension(noparmz) ::  iodum
      equivalence (odum,iodum)

I get the error message

(...): error: Equivalence set cannot contain 'odum' that is numeric sequence type and 'iodum' that is not
         equivalence (iodum,odum)
                            ^^^^

same statement works fine in gfortran, Intel, PGI.

2sn avatar Oct 31 '20 01:10 2sn

The numerical value for int64 is 8, as it should be.

2sn avatar Oct 31 '20 01:10 2sn