- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Take a look at the code below. The latest ifort (2021.13.0) and ifx (2024.2.0) do not behave consistently (and I believe that ifort may be correct here):
PROGRAM P
IMPLICIT NONE
TYPE :: T_T1
END TYPE T_T1
TYPE(T_T1), POINTER :: P1_TYPE => NULL()
CLASS(T_T1), POINTER :: P1_CLASS => NULL()
P1_CLASS => P1_TYPE
WRITE(*, *) ASSOCIATED(P1_CLASS) ! Latest ifx returns T (incorrect)
! Latest ifort returns F (correct)
END PROGRAM P
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For whatever it's worth, I find the program response using IFORT to conform to the standard. The response using IFX does not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@OP1 @FortranFan agreed, this is a bug. I will open a bug report with the slightly modified example:
PROGRAM P
IMPLICIT NONE
TYPE :: T_T1
END TYPE T_T1
TYPE(T_T1), POINTER :: P1_TYPE => NULL()
CLASS(T_T1), POINTER :: P1_CLASS => NULL()
P1_CLASS => P1_TYPE
WRITE(*, *) 'P1_CLASS => P1_TYPE !after this assigment we see...'
WRITE(*, *) 'P1_TYPE pointer associated status is: ',ASSOCIATED(P1_TYPE)
WRITE(*, *) 'P1_CLASS pointer associated status is: ',ASSOCIATED(P1_CLASS)
! Latest ifx returns T (incorrect)
! Latest ifort returns F (correct)
END PROGRAM P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bug ID is CMPLRLLVM-59976
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
we checking in a fix for this in our dev branch, so we will see this fix in the 2025.1.0 Update in March 2025 timeframe.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page