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

ICE with submodules

OP1
New Contributor III
1,030 Views

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. 

5 Replies
Barbara_P_Intel
Employee
1,010 Views

@OP1 You do like to find the corner cases that break the compiler! I filed a bug report against ifort and ifx; the sample ICEs for both compilers. The bug ID is CMPLRLLVM-39069.



0 Kudos
OP1
New Contributor III
986 Views

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... 🤦‍

0 Kudos
Barbara_P_Intel
Employee
1,007 Views

P.S. When I "reply" I see all the good formatting stuff. Same when I start a new thread. Maybe it was a temporary failure...

0 Kudos
Barbara_P_Intel
Employee
781 Views

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)

 

 

0 Kudos
jimdempseyatthecove
Honored Contributor III
767 Views

>>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

0 Kudos
Reply