summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/coarray/alloc_comp_4.f90
blob: 2ee8ff0253d6188a11d5f64fa64dbf6190a5efc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
! { dg-do run }

! Contributed by Damian Rouson

program main

  implicit none

  type mytype
    integer, allocatable :: indices(:)
  end type

  type(mytype), save :: object[*]
  integer :: me

  me=this_image()
  allocate(object%indices(me))
  object%indices = 42

  if ( any( object[me]%indices(:) /= 42 ) ) STOP 1
end program