- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Intel Team,
I obtain an internal compiler error with ifort when using generic type bound procedures in an involved scenario. As far as I can judge, the code is standard conforming and other compilers (NAG, GNU) have no problem to process it. Below, the minimal working example, I could not simplify it any further without making the bug vanish.
I am using ifort (IFORT) 2021.7.1 20221019 on x86_64/Linux.
module testmod_basetypes
implicit none
type :: suite_base
contains
procedure :: add_test_array => suite_base_add_test_array
generic :: add_test => add_test_array
end type suite_base
type, extends(suite_base) :: serial_suite_base
end type serial_suite_base
type, extends(serial_suite_base) :: serial_suite
end type serial_suite
interface serial_suite
module procedure new_serial_suite
end interface serial_suite
contains
subroutine suite_base_add_test_array(this)
class(suite_base), intent(inout) :: this
end subroutine suite_base_add_test_array
function new_serial_suite() result(this)
type(serial_suite) :: this
end function new_serial_suite
end module testmod_basetypes
module testmod_handover
use testmod_basetypes, only : suite_base, serial_suite
implicit none
end module testmod_handover
module testmod_crashing
use testmod_handover, only : suite_base, serial_suite
implicit none
contains
subroutine test()
type(serial_suite) :: suite
call suite%add_test()
end subroutine test
end module testmod_crashing
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reporting this with such a nice reproducer! I reported it to the Fortran compiler team with bug id CMPLRLLVM-42051. I'll let you know when a fix is on the way!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Balint_Aradi, the ICE you reported is fixed in the 2024.2.0 release of the compilers. That is planned to be available 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