Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Two new ICEs

OP1
New Contributor III
492 Views

These ICEs were obtained with IVF 17 Update 4 on a 64-bit Windows machine.

For the first ICE, the issue disappears if line 15 is uncommented and line 18 is commented (that is, the opposite of the condition in which the ICE occurs):

MODULE M
    TYPE T
        CONTAINS
            PROCEDURE :: P => T_P
    END TYPE T
    INTERFACE
        MODULE FUNCTION T_P(S) RESULT(R)
            REAL :: R
            CLASS(T),INTENT(IN) :: S
        END FUNCTION T_P
    END INTERFACE
END MODULE M

MODULE N
    !USE M
    INTERFACE
        MODULE SUBROUTINE F(A)
            USE M
            TYPE(T),INTENT(IN),OPTIONAL :: A
        END SUBROUTINE F
    END INTERFACE
END MODULE N

For the second ICE, the issue disappears if lines 7 & 8 are uncommented, and lines 9 & 10 are commented (that is, the opposite of the condition in which the ICE occurs):

MODULE M
    TYPE T
        CONTAINS
            PROCEDURE :: P => T_P
    END TYPE T
    INTERFACE
        !MODULE FUNCTION T_P(S)
        !    REAL :: T_P
        MODULE FUNCTION T_P(S) RESULT(R)
            REAL :: R
            CLASS(T),INTENT(IN) :: S
        END FUNCTION T_P
    END INTERFACE
END MODULE M

MODULE N
    INTERFACE
        MODULE SUBROUTINE F(A)
            USE M
            TYPE(T),INTENT(IN),OPTIONAL :: A
        END SUBROUTINE F
    END INTERFACE
END MODULE N

I would like to know if these errors are still present in higher versions (either 17, 18 or 19). This will help me justify upgrading our current compilers.
Thanks!

 

0 Kudos
2 Replies
IanH
Honored Contributor III
492 Views

The two example stretches of code have identical semantics. 

I still see the problem with ifort 19.0.  Have you reported it?

0 Kudos
OP1
New Contributor III
492 Views

Thanks for confirming that this issue is still there with 19.0.

0 Kudos
Reply