gcc/testsuite/gfortran.dg/coarray_args_1.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-fcoarray=single" } |
| 3 | ! |
| 4 | ! Argument checking |
| 5 | ! |
| 6 | implicit none |
| 7 | type t |
| 8 | integer :: i |
| 9 | integer,allocatable :: j |
| 10 | end type t |
| 11 | |
| 12 | type(t), save :: x[*] |
| 13 | |
| 14 | call sub1(x%i) |
| 15 | call sub1(x[1]%i) ! { dg-error "must be a coarray" } |
| 16 | contains |
| 17 | subroutine sub1(y) |
| 18 | integer :: y[*] |
| 19 | end subroutine sub1 |
| 20 | end |