- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've come across an internal compiler error with ifort 19.0.1.144 with some code that defines assignment for a parameterised derived type. I've stripped the project code down to this minimal example:
module types
implicit none
type :: test_type(n)
integer, len :: n ! Length of array of independent variables
integer :: t(n)
end type test_type
interface assignment(=)
module procedure assign_from_self
end interface assignment(=)
contains
subroutine assign_from_self(this, other)
type(test_type(n=*)), intent(out) :: this
type(test_type(n=this%n)), intent(in) :: other
this%t = other%t
end subroutine assign_from_self
end module types
program ifort_bug
use types
implicit none
call test_subroutine(3)
contains
subroutine test_subroutine(n)
integer, intent(in) :: n
type(test_type(n=n)) :: x
end subroutine test_subroutine
end program ifort_bug
If I try to compile this (saved as ifort_bug.f90), I get the following error:
$ ifort ifort_bug.f90 -o ifort_bug.x
ifort_bug.f90(1): catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it oc
curred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
compilation aborted for ifort_bug.f90 (code 1)
I know parameterised derived types have limited support and there are many known issues (recentish examples here and here) . In fact, the offending block in our program is probably going to be removed because it's causing problems in other compilers too. But I figure it's still worth raising in the hope that it'll be fixed someday!
I use ifort via an institutional license and I'm not sure how to access the Online Support Centre.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Warrick ,
Thank you for your post, yep defined assignment and defined operators are among the other aspects with parameterized derived types that cause the Intel Fortran compiler to trip over, an internal compiler error (ICE) being an especially pernicious manifestation of the underlying issues with the implementation (or faults thereof) of this feature in the compiler.
I hope someone from Intel team will take note of your post and file a compiler bug report on your behalf.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, with the use only, the assignment is not needed and the ICE therefor is gone. My fault.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I filed a bug, ID is CMPLRIL0-23475 for the original code and ICE
This affects 19.0.x 19.1.x and 2021.1-beta
We have been fixing a number of things in PDTs so this fits in with that effort. Thank you for bringing this to the Forum
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! I presume there's nothing further to do on my side.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page