Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28456 Discussions

Fortran forrtl: severe (174): SIGSEGV, segmentation fault in derived type data

JIquan_P_
Beginner
268 Views

 "m.f90" :
  1 module typedef
  2 implicit none
  3 type::mytype
  4     integer::mn(2,2)
  5     complex(kind=8)::w
  6     integer,allocatable::sz(:)
  7 end type
  8 end module typedef
  9 subroutine mysub(mtp)
 10 use typedef
 11 implicit none
 12 type(mytype)::mtp(6)
 13 integer::lm
 14 complex(kind=8)::f0(6),f1(6)
 15 do lm=1,6
 16     write(*,*)"a",lm
 17     f0(lm)=mtp(lm).w
 18     f1(lm)=f0(lm)
 19 end do
 20 end subroutine
 21 program main
 22 use typedef
 23 implicit none
 24 type(mytype)::mtp(6)
 25 call mysub(mtp)
 26 end program

I compiled this program with "ifort m.f90" then run it "./a.out",  then error occured: 
forrtl: severe (174): SIGSEGV, segmentation fault occurred

If I compiled it with "ifort m.f90 -CB" then No error occured

If I changed the 4th line into "integer::mn(3,3)" or just delete it, then compiled it with "ifort m.f90" No error occured.

This problem puzzled my a lot, is something wrong with my program?

my compiler is ifort version 14.0.3 on Mac OS

 

0 Kudos
2 Replies
Steven_L_Intel1
Employee
268 Views

I am fairly certain that this error is caused by the same compiler bug as shown by your program in https://software.intel.com/en-us/forums/topic/542107 - it has the same characteristics. I will add this example to the other one.

0 Kudos
Steven_L_Intel1
Employee
268 Views

I expect this bug to be fixed in Update 3, scheduled for May.

0 Kudos
Reply