| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! PR fortran/30940 |
| 4 |
program test |
| 5 |
implicit none |
| 6 |
interface |
| 7 |
subroutine foobar(a) |
| 8 |
character(len=1),dimension(4) :: a |
| 9 |
end subroutine foobar |
| 10 |
subroutine arr(a) |
| 11 |
character(len=1),dimension(1,2,1,2) :: a |
| 12 |
end subroutine arr |
| 13 |
end interface |
| 14 |
|
| 15 |
call foobar( [ "bar" ]) ! { dg-error "contains too few elements" } |
| 16 |
call foobar( ["ba ","r33"]) |
| 17 |
call arr( [ "bar" ]) ! { dg-error "contains too few elements" } |
| 18 |
call arr( reshape(["b","a","r","3"], [2,2])) |
| 19 |
call arr( reshape(["b","a"], [1,2])) ! { dg-error "contains too few elements" } |
| 20 |
call arr( reshape(["b","a"], [2,1])) ! { dg-error "contains too few elements" } |
| 21 |
end program test |