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 126.96.36.199 Build 20171018
It starts not compiling from
- Intel(R) 64, Version 188.8.131.52 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.
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
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?