This is with ifort classic 2021.6.0 - the compiler fails to detect that the submodules of M have the same name, gets confused, and throws an ICE.
MODULE M
INTERFACE
MODULE FUNCTION F
END FUNCTION F
END INTERFACE
END MODULE M
SUBMODULE (M) S
END SUBMODULE S
SUBMODULE (M:S) S
END SUBMODULE S
As an aside... where did most of the formatting options for posts go? I only see a basic set of options: B (bold), I (italic), lists, numbered lists, link and photos.
連結已複製
I don't do it on purpose, ha ha!
Huge code = more opportunities to make mistakes... such as, giving two submodules (of a common module) the same name... 🤦
The ICE is melted with ifx 2023.1.0 and ifort 2021.9.0 that are included in the oneAPI HPC Toolkit 2023.1 that was released earlier this month.
$ ifx m.f90
m.f90(9): error #6407: This symbolic name is not an intrinsic function name or an intrinsic subroutine name. [M@S]
SUBMODULE (M:S) S
----------------^
m.f90(10): error #6785: This name does not match the unit name. [S]
END SUBMODULE S
--------------^
compilation aborted for m.f90 (code 1)
$ ifort m.f90
m.f90(9): error #6407: This symbolic name is not an intrinsic function name or an intrinsic subroutine name. [M@S]
SUBMODULE (M:S) S
----------------^
m.f90(10): error #6785: This name does not match the unit name. [S]
END SUBMODULE S
--------------^
compilation aborted for m.f90 (code 1)
>>where did most of the formatting options for posts go?
Click on the ... at the end of the tool bar.
Then click on the </> for the formatting options per markup
PROGAM ThisIsAProgram
Jim Dempsey