Diagnostic 8000: There is a conflict between local interface block and external interface block.

The Intel Fortran compiler error message:

error #8000: There is a conflict between local interface block and external interface block.

is issued under the following conditions:

  • A source file contains an INTERFACE block for an external Fortran procedure
  • The interface does not match the declared interface of the actual external procedure
  • The application is compiled with the "check routine interfaces" diagnostic option (/warn:interface on Windows*, -warn interface on Linux* or Mac OS* X)
An example source that would give this error is:

program test

interface
subroutine sub(x)
integer x
end subroutine sub
end interface

call sub(3)

end

subroutine sub(x)
real x ! Does not match integer
print *, x
end
In this case, as in many others, error 8000 would be accompanied by error 6633 about the type mismatch on the call.

The recommended solution is to put the called procedure in a module (and then USE the module), or to make it a contained procedure - either one will define an explicit interface without the need for a separate, error-prone INTERFACE block.
The following article describes a compiler defect that can cause this diagnostic to be issued incorrectly:
For more complete information about compiler optimizations, see our Optimization Notice.

1 comment

Top

is this intentional, that this error 8000 comes without error 6633 at this sample here?

      PROGRAM StopSign
      USE MSFLIB
      IMPLICIT NONE

      INTERFACE
      SUBROUTINE OCTAGON_W( ictrl, wxymiddle, dradius )
      USE MSFLIB
      IMPLICIT NONE
      INTEGER( KIND = 2 ) :: ictrl
      TYPE( wxycoord ), INTENT( IN ) :: wxymiddle
      REAL( KIND = 8 ) :: dradius
      END SUBROUTINE OCTAGON_W
      END INTERFACE

      ! ....

      TYPE( wxycoord ) :: wxymiddle

      wxymiddle.wx = 1.25D002
      wxymiddle.wy = 1.25D002

      CALL OCTAGON_W( $GFILLINTERIOR, wxymiddle, 7.7D001 )

      ! ...

      END PROGRAM StopSign

    

      SUBROUTINE OCTAGON_W( ictrl, wxymiddle, dradius )
      USE MSFLIB
      IMPLICIT NONE

      INTEGER( KIND = 2 ) :: ictrl
      TYPE( wxycoord ), INTENT( IN ) :: wxymiddle
      REAL( KIND = 8 ) :: dradius

      REAL( KIND = 8 ) :: M$PI

      REAL( KIND = 8 ) :: dangle
      INTEGER( KIND = 4 ) :: istatus
      INTEGER :: iter

      TYPE( wxycoord ) :: pts( 8 )
    
      PARAMETER ( M$PI = 3.14159265358979323846D000 )

      dangle = 2.25D001 * M$PI / 1.8D002

      DO iter = 1, 8
      pts( iter ).wx = wxymiddle.wx + dradius * DCOS( dangle )
      pts( iter ).wy = wxymiddle.wy + dradius * DSIN( dangle )
      dangle = dangle + M$PI / 4.0D000
      END DO

      istatus = POLYGON_W( ictrl, pts, INT2( 8 ) )

      END SUBROUTINE OCTAGON_W

 

Add a Comment

Have a technical question? Visit our forums. Have site or software product issues? Contact support.