- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This code fails to compile with the latest ifort 2021.6.0 and ifx 2022.1.0 compilers.
Note that if the definition of the procedure pointer is in the parent module, the code compiles just fine.
Sigh...
MODULE M
IMPLICIT NONE (TYPE, EXTERNAL)
! Declaring P_ACTUAL here works.
!PROCEDURE(P), POINTER :: P_ACTUAL
INTERFACE
MODULE SUBROUTINE P
END SUBROUTINE P
END INTERFACE
END MODULE M
SUBMODULE (M) SM
IMPLICIT NONE (TYPE, EXTERNAL)
! Declaring P_ACTUAL here fails.
PROCEDURE(P), POINTER :: P_ACTUAL
END SUBMODULE SM
SUBMODULE (M : SM) P
IMPLICIT NONE (TYPE, EXTERNAL)
CONTAINS
MODULE SUBROUTINE P
IMPLICIT NONE (TYPE, EXTERNAL)
IF (ASSOCIATED(P_ACTUAL)) THEN
END IF
END SUBROUTINE P
END SUBMODULE P
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't get an ICE with this reproducer with either ifx or ifort.
Can you please send the version number you get when you add the compiler option "-what"?
$ ifort -what -c icy.f90
Intel(R) Fortran 2021.6.0-1299
icy.f90(22): error #6404: This name does not have a type, and must have an explicit type. [P_ACTUAL]
IF (ASSOCIATED(P_ACTUAL)) THEN
-------------------^
icy.f90(22): error #6106: Not a valid argument for ASSOCIATE or SELECT TYPE. [ASSOCIATED]
IF (ASSOCIATED(P_ACTUAL)) THEN
-------------------^
compilation aborted for icy.f90 (code 1)
$ ifx -what -c icy.f90
Intel(R) Fortran 22.0-1296
icy.f90(22): error #6404: This name does not have a type, and must have an explicit type. [P_ACTUAL]
IF (ASSOCIATED(P_ACTUAL)) THEN
-------------------^
icy.f90(22): error #6106: Not a valid argument for ASSOCIATE or SELECT TYPE. [ASSOCIATED]
IF (ASSOCIATED(P_ACTUAL)) THEN
-------------------^
compilation aborted for icy.f90 (code 1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Barbara - the code indeed does not produce an ICE. But it should still compile without any errors, and that's not the case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah! You had me thinking ICE after the earlier issue. THANKS!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I filed a bug report for you, CMPLRLLVM-37576.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The reproducer now compiles without error with the latest Fortran compilers, ifort 2021.7.0 and ifx 2022.2.0. Both are part of the oneAPI HPC 2022.3 Toolkit that was released earlier this month.
Give the new compilers a try!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page