| 1 |
! { dg-do compile } |
| 2 |
! { dg-additional-options "-fcoarray=single" } |
| 3 |
! |
| 4 |
! PR fortran/106856 |
| 5 |
! |
| 6 |
! |
| 7 |
! |
| 8 |
subroutine foo(x,y) |
| 9 |
class(*), optional :: x, y |
| 10 |
optional :: x ! { dg-error "Duplicate OPTIONAL attribute" } |
| 11 |
target :: x |
| 12 |
allocatable :: x |
| 13 |
target :: x ! { dg-error "Duplicate TARGET attribute" } |
| 14 |
allocatable :: x ! { dg-error "Duplicate ALLOCATABLE attribute" } |
| 15 |
pointer :: y |
| 16 |
contiguous :: y |
| 17 |
pointer :: y ! { dg-error "Duplicate POINTER attribute" } |
| 18 |
contiguous :: y ! { dg-error "Duplicate CONTIGUOUS attribute" } |
| 19 |
codimension :: x[:] |
| 20 |
dimension :: x(:,:) |
| 21 |
dimension :: y(:,:,:) |
| 22 |
codimension :: x[:] ! { dg-error "Duplicate CODIMENSION attribute" } |
| 23 |
dimension :: y(:) ! { dg-error "Duplicate DIMENSION attribute" } |
| 24 |
end |