Fortran segmentation fault when deallocating a coarray component of a derived type (bug?)

61 Views Asked by At

I get a segfault when trying to deallocate a coarray component of a derived type. This happens after I assign one instance of the type to another. The minimal example is as follows:

program mytest

   implicit none
   type notmytype
      real, allocatable :: coarr(:)[:]
   end type notmytype

   type(notmytype) :: nmt, nmt2

   allocate(nmt%coarr(10)[*])

   nmt2 = nmt
   deallocate(nmt2%coarr)

end program mytest

I compile this with: ifort -coarray -coarray-num-images=16 test.f90 -o test.exe

I can successfully query size(nmt2%coarr) before the deallocate statement. Any thoughts? Is this a bug? The ifort version is: ifort (IFORT) 19.0.3.199 20190206

0

There are 0 best solutions below