- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following code appears to be standard-conforming but does not compile with Intel ifort 2021.5:
module mod
interface unique
module function findUnique(Array) result(unique)
character(*), intent(in), contiguous :: array(:)
character(len(array)) , allocatable :: unique(:)
end function
end interface
end module mod
submodule (mod) smod
contains
module procedure findUnique
end procedure
end submodule smod
end
The code can be readily tested online here to reproduce the ICE message.
Gfortran 11 can compile the same code. Note that the problem appears to be entirely due to the specification of the length-type parameter of the allocatable output. For example, the following code works just fine,
module mod
interface unique
module function findUnique(Array) result(unique)
character(*), intent(in), contiguous :: array(:)
character(:) , allocatable :: unique(:)
end function
end interface
end module mod
submodule (mod) smod
contains
module procedure findUnique
end procedure
end submodule smod
end
Specifying the interface in both the submdule and the module also resolves the ICE, if I remember correctly. But interface-duplication is an ugly least-wanted solution for an ICE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The stack trace on this is almost identical to your previously reported issue https://community.intel.com/t5/Intel-Fortran-Compiler/INTERNAL-COMPILER-ERROR-allocatable-and-contiguous-arguments-in/td-p/1354727 so I have added it to the existing bug report CMPLRIL0-34555. We'll make sure both your examples work when this bug is addressed.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a Fedora 35 system with gfortran. Yes, looks like a bug. I'll write it up. Thank you for this simple bug reproducer!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The stack trace on this is almost identical to your previously reported issue https://community.intel.com/t5/Intel-Fortran-Compiler/INTERNAL-COMPILER-ERROR-allocatable-and-contiguous-arguments-in/td-p/1354727 so I have added it to the existing bug report CMPLRIL0-34555. We'll make sure both your examples work when this bug is addressed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was wrong, these cases are triggering 2 bugs in the front end. the first, your first issue, the developer has identified and has a pending fix for that one. This new one is ever so slightly different. Very close code paths but different. She's working on this 2nd case now.
We did miss code freeze for the next update release for both of these. So the Update that releases next, in the next month or so, will not have the fixes. I will keep you posted on when to expect two fixes.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fantastic, Thank you very much for the rapid responses and updates.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page