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