1! { dg-do compile } 2! { dg-options "-fcoarray=single" } 3! 4! PR fortran/48820 5! 6! Assumed-rank tests 7subroutine foo(X) 8 integer :: x(..) 9 codimension :: x[*] ! { dg-error "The assumed-rank array 'x' at .1. shall not have a codimension" } 10end 11 12subroutine foo2(X) 13 integer, dimension(..) :: x[*] ! { dg-error "The assumed-rank array at .1. shall not have a codimension" } 14end 15 16subroutine foo3(X) 17 integer, codimension[*] :: x(..) ! { dg-error "The assumed-rank array at .1. shall not have a codimension" } 18end 19 20subroutine foo4(X) 21 integer, codimension[*], dimension(..) :: x ! { dg-error "The assumed-rank array at .1. shall not have a codimension" } 22end 23 24subroutine bar(X) 25 integer :: x[*] 26 dimension :: x(..) ! { dg-error "The assumed-rank array 'x' at .1. shall not have a codimension" } 27end 28 29subroutine foobar(X) 30 integer :: x 31 codimension :: x[*] 32 dimension :: x(..) ! { dg-error "The assumed-rank array 'x' at .1. shall not have a codimension" } 33end 34 35subroutine barfoo(X) 36 integer :: x 37 dimension :: x(..) 38 codimension :: x[*] ! { dg-error "The assumed-rank array 'x' at .1. shall not have a codimension" } 39end 40 41subroutine orig(X) ! { dg-error "may not have the VALUE or CODIMENSION attribute" } 42 integer :: x(..)[*] 43end 44 45subroutine val1(X) 46 integer, value :: x(..) ! { dg-error "VALUE attribute conflicts with DIMENSION attribute" } 47end 48 49subroutine val2(X) 50 integer, value :: x 51 dimension :: x(..) ! { dg-error "VALUE attribute conflicts with DIMENSION attribute" } 52end 53