- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This program, greatly reduced, gets an ICE if the -check shape option
(originally it was -check all) is used, and the length of func is the
expression len(str); but if it is a constant it compiles.
ifort -c mainice.f90 -check shape
exit
mainice.f90(1): catastrophic error: **Internal compiler error: internal abort**
Please report this error along with the circumstances in which it occurred in a Software Problem Report.
Note: File and line given may not be explicit cause of this error.
compilation aborted for mainice.f90 (code 1)
program main
implicit none
abstract interface
function func (str)
character(len=*), intent (in) :: str
!=======================================
character(len=len(str)) :: func ! <= this fails to compile
!character(len=52) :: func ! <= this compiles
!=======================================
end function func
end interface
procedure (func), pointer :: f_ptr => null()
f_ptr => upper7
!print *, f_ptr('AbCdEfGhIjKlMnOpQrStUvWxYz1234567890')
contains
pure function upper7(str) result(string)
character(*), intent(in) :: str
character(len(str)) :: string
string=str
end function upper7
end program main
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Once again, thank you of the nice reproducer. I filed a bug on this CMPLRIL0-35243.
You note one workaround in the reproducer. The other is to use ifx. ifx compiles it just fine.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Once again, thank you of the nice reproducer. I filed a bug on this CMPLRIL0-35243.
You note one workaround in the reproducer. The other is to use ifx. ifx compiles it just fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interesting. First time I had problems with ifort but not ifx that were not run-time. Does work fine with ifx. Slowly switching over ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I closed the bug report since you have a workaround for ifort AND ifx works ok.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page