Showing results for 
Search instead for 
Did you mean: 
1 View

seg fault regression

There appears to be a seg fault regression introduced in Intel 2019 Fortran compiler, consider the code:

module testmod
use iso_c_binding
integer, parameter, public :: f_int = c_int64_t
type, bind(c), public :: NextValMType
 integer(f_int) :: ga_handle
end type NextValMType

  function nextvalm_init(n_counter) bind(c)
    type(NextValMType) :: nextvalm_init
    integer(f_int), intent(in), value :: n_counter
  end function
end module

program test
use testmod
type(NextValMType) :: nvm
integer :: i=5

This works as expected with gfortran, Intel 2017 and 2018, but not 2019:

> module purge && module load gcc/9.1.0 && gfortran -fdefault-integer-8 intel2019_bug.f90 && ./a.out                  
 i=                    5
 n_counter=                    5                              
> module purge && module load intel/2017.5.239 && ifort -i8 intel2019_bug.f90 && ./a.out                  
 i=                     5         
 n_counter=                     5
> module purge && module load intel/2018.3.222 && ifort -i8 intel2019_bug.f90 && ./a.out                  
 i=                     5                        
 n_counter=                     5
> module purge && module load intel/2019.1.144 && ifort -i8 intel2019_bug.f90 && ./a.out                  
 i=                     5
 n_counter=                     0
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source
a.out              00000000004047C3  Unknown               Unknown  Unknown
libpthread-2.19.s  00007F0B23920870  Unknown               Unknown  Unknown
a.out              00000000004038B7  Unknown               Unknown  Unknown
a.out              00000000004037A2  Unknown               Unknown  Unknown       00007F0B2358AB25  __libc_start_main     Unknown  Unknown
a.out              00000000004036A9  Unknown               Unknown  Unknown

The latest version I have available is Is this a known problem and has it been fixed in subsequent updates?

Many thanks

0 Kudos
2 Replies
Valued Contributor I
1 View

Confirmed. I note, however,

Confirmed. I note, however, that the beta version of ifort 2020, Version Pre-Release Beta Build 20190522, doesn't show this problem. So this problem has already been fixed, or they did some new implementation which made this bug gog away. You might want to check with the Intel Support. BTW. in your test program, it must read:

  integer(f_int) :: i=5


0 Kudos
Valued Contributor III
1 View

@Andy May,

@Andy May,

As advised, contacting Intel support is a good next step.

For whatever it's worth, the problem, as shown in the original post, is NOT reproducible with on Windows using the ifort command i.e., "ifort /i8".

0 Kudos