Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Another bug with ASSOCIATED?

OP1
New Contributor III
723 Views

This code illustrates another potential bug when CLASS, POINTER, and ASSOCIATED are mixed together. With the latest ifort and ifx the association status of CT changes after the call to S - I believe it should not.

PROGRAM P
IMPLICIT NONE

TYPE :: T
END TYPE T
CLASS(T), POINTER :: CT => NULL()

WRITE(*, *) 'Association status of CT: ', ASSOCIATED(CT)

CALL S(CT, NULL())
WRITE(*, *) 'Association status of CT: ', ASSOCIATED(CT)

CONTAINS
    SUBROUTINE S(C, D)
    IMPLICIT NONE
    CLASS(T), POINTER, INTENT(INOUT) :: C
    TYPE(T), POINTER, INTENT(IN) :: D
    C => D
    END SUBROUTINE S
END PROGRAM P

.

 

2 Replies
Devorah_H_Intel
Moderator
598 Views

I was able to test this issue internally. It has now been escalated to compiler engineering for a fix. Thank you for reporting this to us. 


0 Kudos
Devorah_H_Intel
Moderator
206 Views

This issue is fixed in the 2025.1 ifx.

0 Kudos
Reply