cancel
Showing results for 
Search instead for 
Did you mean: 

Server Processors

denayer
Journeyman III

"Interface mismatch in procedure pointer assignment" with AMD flang version 14.0.6

Dear AMD community,

 

I'm trying to compile our Fortran code with the last stable AOCC version (AOCC_4.0.0-Build#434 2022_10_28). I got the following error: "F90-S-1008-Interface mismatch in procedure pointer assignment".

I wrote a short piece of code, similar to what we have in our code, and which generates the same error:

 

 

      program main
      implicit none

      abstract interface
      function limiter_funct(r) result(psi)
c---- arguments
      real(kind=8), intent(in) :: r
      real(kind=8)             :: psi
      end function limiter_funct
      end interface

c---- the pointer of abstract interface type
      procedure(limiter_funct), pointer :: p_psi => null()

      contains

c#######################################################################
      subroutine initTvdSchemes()

      p_psi => bcds

      end subroutine

c#######################################################################
      pure function bcds(r) result(psi)
      implicit none
      real(kind=8), intent(in) :: r
      real(kind=8)             :: psi

      psi = 1.d0

      return
      end function bcds

      end program

 

 

Can anybody tell me what is wrong here? Other compilers went through without any problem.

Regards,

Guillaume

0 Likes
1 Solution

Hello Guillaume,

The default parameter for Fortran standard is different for different compilers.  For AOCC above test program should compile successfully with below command.

flang test1.f90 -ffixed-form -std=f2008

 

View solution in original post

2 Replies

Hello Guillaume,

The default parameter for Fortran standard is different for different compilers.  For AOCC above test program should compile successfully with below command.

flang test1.f90 -ffixed-form -std=f2008

 

Thanks a lot! You saved my day/week! It works

0 Likes