Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
2 Views

Problem with coarrays of derived types with allocatable components

Hello,The release notes ofFortran Composer XE 2011 Update 6 suggest that coarrays of derived types with allocatable components are allowed (therelease notes ofprevious version listed 'Coarrays of derived type where the type contains an ultimate component that isALLOCATABLE or POINTER'under 'Coarray Known Issues').
Yet, this still seems to be a problem in my Update 6 version.
For example:
[bash]program test implicit none type :: new_type integer :: a(2) integer,allocatable :: b(:) end type new_type type(new_type) :: t

  • integer :: k,tmp(2) allocate(t%b(2)) t%a = [1:2]+2*(this_image()-1) t%b = [1:2]+2*(this_image()-1) sync all if (this_image().eq.1) then do k=1,num_images() print *, 'img: ', k tmp = t%a print *, ' a: ', tmp end do do k=1,num_images() print *, 'img: ', k tmp = t%b print *, ' b: ', tmp end do end if end program test[/bash] The first loop executes without any problems, but problem terminates with 'segmentation fault' on line 27 ('tmp = t%b') when the number of images is greater than 1.I copied the arrays 't%a' and 't%b' to 'tmp' before printing because of the known issues with writing anarray slice (or entire array) of a coarray referencing another image.I'm new to coarrays, but I believe the above example compiled with Update 6 should work.
    Thanks,Sebastian Liska
  • 0 Kudos
    3 Replies
    Highlighted
    2 Views

    Problem with coarrays of derived types with allocatable compone

    Thanks - we'll take a look at this.
    Retired 12/31/2016
    0 Kudos
    Highlighted
    2 Views

    Problem with coarrays of derived types with allocatable compone

    We have another open issue with a similar look - the issue ID is DPD200173725. I have added your test case to that - thanks.
    Retired 12/31/2016
    0 Kudos
    Highlighted
    2 Views

    This problem is fixed in the

    This problem is fixed in the current compiler version.

    Retired 12/31/2016
    0 Kudos