- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all.
I found that the following simple code produces an internal abort in the more recent intel fortran compilers.
Using the compilers I have at hand, it compiles fine up to
- Intel(R) 64, Version 18.0.1.163 Build 20171018
It starts not compiling from
- Intel(R) 64, Version 19.0.3.199 Build 20190206
up to the latest
- Intel(R) 64, Version 2021.3.0 Build 20210609_000000
Here is the code:
module mymodule
type pop
real(8) , allocatable :: comp_1 (:)
character(8), allocatable :: comp_2 (:, :)
end type pop
type(pop) :: aa
end module mymodule
program main
use mymodule
call sub1()
call sub2()
end program main
subroutine sub2()
use mymodule
print *
print *, allocated(aa%comp_1 ), aa%comp_1
print *, allocated(aa%comp_2 ), aa%comp_2
print *
end
subroutine sub1()
use mymodule
allocate( aa%comp_1 ( 2 ) , source = 1.d0)
allocate( aa%comp_2 ( 2 , 2 ) , source = 'b ')
end
Note that it also compiles fine with GNU Fortran (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2).
Did I miss some compiling option, possibly become mandatory in the latest intel fortran compiler version?
Otherwise it looks like a regression error.
EDIT
However, I found that the error does not happen if I do a two-steps-job, first using the "-c" option to compile-only, and then invoking the compiler using the object file as the input.
This way, I finally get an executable apparently working fine:
$ ./a.out
T 1.00000000000000 1.00000000000000
T b b b b
Thanks!
GM
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I filed a bug report on this, CMPLRIL0-34024.
It compiles OK with ifort -O0 and with ifx at all opt levels.
I'll let you know its progress to a fix.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good News! This Internal compiler error is fixed in the Fortran compiler 2021.4.0 that was released last week.
Can you try the new compiler and let me know how it works for you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@e745200 I haven't heard from you that the fix is confirmed. I'll no longer be following this thread and closing the associated case.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page