gcc/testsuite/gfortran.dg/coarray/alloc_comp_4.f90
raw| 1 | ! { dg-do run } |
| 2 | |
| 3 | ! Contributed by Damian Rouson |
| 4 | |
| 5 | program main |
| 6 | |
| 7 | implicit none |
| 8 | |
| 9 | type mytype |
| 10 | integer, allocatable :: indices(:) |
| 11 | end type |
| 12 | |
| 13 | type(mytype), save :: object[*] |
| 14 | integer :: me |
| 15 | |
| 16 | me=this_image() |
| 17 | allocate(object%indices(me)) |
| 18 | object%indices = 42 |
| 19 | |
| 20 | if ( any( object[me]%indices(:) /= 42 ) ) STOP 1 |
| 21 | end program |