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

Possible issue with ifx 2025.2.0 for deferred/overriding procedures

OP1
New Contributor III
1,620 Views

In the following code, the abstract derived type T features a procedure binding TP for a deferred procedure T_P which has the RECURSIVE attribute.

TT is a concrete extension of T which associates the TP binding with the type-bound procedure TT_P which has the NON_RECURSIVE attribute.

The compiler does not emit an error for this discrepancy (it does if you try the pair of mismatched attributes PURE/IMPURE). Is this a compiler bug?

MODULE M
IMPLICIT NONE

TYPE, ABSTRACT :: T
    CONTAINS
        PROCEDURE(T_P), DEFERRED, PRIVATE :: TP
END TYPE T

ABSTRACT INTERFACE
    RECURSIVE SUBROUTINE T_P(SELF)
    IMPORT, ALL
    IMPLICIT NONE
    CLASS(T), INTENT(IN) :: SELF
    END SUBROUTINE T_P
END INTERFACE

TYPE, EXTENDS(T) :: TT
    CONTAINS
        PROCEDURE, PUBLIC :: TP => TT_P
END TYPE TT

CONTAINS

    NON_RECURSIVE SUBROUTINE TT_P(SELF)
    IMPLICIT NONE
    CLASS(TT), INTENT(IN) :: SELF
    END SUBROUTINE TT_P

END MODULE M

 

0 Kudos
1 Reply
Ron_Green
Moderator
1,325 Views

It is a bug. Bug ID is CMPLRLLVM-69417


0 Kudos
Reply