NVFORTRAN-F-0000-Internal compiler error. interf:new_symbol, symbol not found

Hi,

I got this error on the example below.

NVFORTRAN-F-0000-Internal compiler error. interf:new_symbol, symbol not found     625  (mod_test@smd_test.F90: 3)
NVFORTRAN/x86-64 Linux 21.7-0: compilation aborted

nvfortran -g -c mod_1.F90
nvfortran -g -c mod_1@smd_1.F90
nvfortran -g -c mod_2.F90
nvfortran -g -c mod_2@smd_2.F90
nvfortran -g -c mod_test.F90
nvfortran -g -c mod_test@smd_test.F90

mod_1.F90:

MODULE MOD_1

    IMPLICIT NONE

    INTERFACE PRC
        MODULE PROCEDURE :: PRC_1
    END INTERFACE PRC

    INTERFACE
        MODULE FUNCTION PRC_1(INPUT) RESULT(OUTPUT)
            IMPLICIT NONE
            REAL, INTENT(IN) :: INPUT
            REAL             :: OUTPUT
        END FUNCTION PRC_1
    END INTERFACE

END MODULE MOD_1

mod_1@smd_1.F90:

SUBMODULE(MOD_1) SMD_1

    IMPLICIT NONE

CONTAINS

    MODULE FUNCTION PRC_1(INPUT) RESULT(OUTPUT)
        IMPLICIT NONE
        REAL, INTENT(IN) :: INPUT
        REAL             :: OUTPUT
        OUTPUT = INPUT
    END FUNCTION PRC_1

END SUBMODULE SMD_1

mod_2.F90:

MODULE MOD_2

    IMPLICIT NONE

    INTERFACE PRC
        MODULE PROCEDURE :: PRC_2
    END INTERFACE PRC

    INTERFACE
        MODULE FUNCTION PRC_2(INPUT) RESULT(OUTPUT)
            IMPLICIT NONE
            REAL, INTENT(IN) :: INPUT
            REAL             :: OUTPUT
        END FUNCTION PRC_2
    END INTERFACE

END MODULE MOD_2

mod_2@smd_2.F90:

SUBMODULE(MOD_2) SMD_2

    IMPLICIT NONE

CONTAINS

    MODULE FUNCTION PRC_2(INPUT) RESULT(OUTPUT)
        IMPLICIT NONE
        REAL, INTENT(IN) :: INPUT
        REAL             :: OUTPUT
        OUTPUT = INPUT
    END FUNCTION PRC_2

END SUBMODULE SMD_2

mod_test.F90

MODULE MOD_TEST

    USE MOD_1
    USE MOD_2

    IMPLICIT NONE

    INTERFACE
        MODULE FUNCTION PRC_TEST(INPUT) RESULT(OUTPUT)
            IMPLICIT NONE
            REAL, INTENT(IN) :: INPUT
            REAL             :: OUTPUT
        END FUNCTION PRC_TEST

    END INTERFACE

END MODULE MOD_TEST

mod_test@smd_test.F90

SUBMODULE(MOD_TEST) SMD_TEST

    IMPLICIT NONE

CONTAINS

    MODULE FUNCTION PRC_TEST(INPUT) RESULT(OUTPUT)
        IMPLICIT NONE
        REAL, INTENT(IN) :: INPUT
        REAL             :: OUTPUT
        OUTPUT = INPUT
    END FUNCTION PRC_TEST

END SUBMODULE SMD_TEST

The problem disappears

  • if MOD_1 and MOD_2 are not used in MOD_TEST or
  • if the use statements in MOD_TEST are moved inside the MODULE FUNCTION PRC_TEST or
  • if generic interfaces PRC in MOD_1 and MOD_2 don’t have the same name.

Thanks AliG. I’ve filed a problem report, TPR #30461, and sent it to engineering for review.

-Mat

1 Like

Thanks Mat.