flang icon indicating copy to clipboard operation
flang copied to clipboard

integer(kind=int64) not recognised as 'sequence type'

Open 2sn opened this issue 4 years ago • 0 comments

I get an error message

f18 -ff2c -finit-local-zero -c -v -march=native -O3 -fno-strict-overflow -I /home/alex/kepler/llvm /home/alex/kepler/source/kepdef.f

/home/alex/kepler/source/kepcom:2337:18: error: Equivalence set cannot contain 'odum' that is numeric sequence type and 'iodum' that is not
       &     (odum,iodum)

where the relevant code is

      INTEGER, PARAMETER :: int64 = SELECTED_INT_KIND(16)
      INTEGER, PARAMETER :: real64 = SELECTED_REAL_KIND(15)

      real(kind=real64), dimension(noparmz) ::
     &     odum

      common /oparmdat/
     &     odum

      integer(kind=int64), dimension(noparmz) ::
     &     iodum
      equivalence
     &     (odum,iodum)

When I use

      integer(kind=4), dimension(noparmz) ::
     &     iodum

it compiles (but, obviously, the code does not work).

So, something may be going wrong with some internal parameters of the compiler.

2sn avatar Apr 03 '21 13:04 2sn