- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following invalid code crashes current ifort/ifx:
module M1
use, intrinsic :: ISO_C_BINDING, only: C_PTR
use, intrinsic :: ISO_C_BINDING, only: X_PTR => C_FUNPTR
implicit none
end module
module M2
use M1, only: X_PTR => C_PTR ! C_PTR
implicit none
end module
module M3
use M1, only: C_PTR => X_PTR ! C_FUNPTR
use M2, only: C_PTR => X_PTR ! C_PTR
implicit none
type(c_ptr) :: ptr
end module
I get e.g. with ifx:
% ifx ifort-use-clash.f90
ifort-use-clash.f90(13): error #6496: There is more than one use-name for a local-name. [C_PTR]
use M1, only: C_PTR => X_PTR ! C_FUNPTR
----------------^
ifort-use-clash.f90(17): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance.
end module
^
ifort-use-clash.f90(17): catastrophic error: Internal Compiler Error: Ref module: ffe_cl.c
compilation aborted for ifort-use-clash.f90 (code 1)
Found while debugging a different issue...
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting this. The compilers shouldn't ICE even if there is a coding error. I filed CMPLRLLVM-47099 to address it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This ICE is gone when I compiled with a preview of the 2024.2 compiler release. Watch for it in mid-2024!

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