3 ! Test the fix for pr71883, in which an ICE would follow the error.
5 ! Contributed by Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de>
8 character(3), allocatable
:: z(:,:)
10 z(2,1) = z(12) ! { dg-error "Rank mismatch in array reference" }
11 z(21) = z(1,2) ! { dg-error "Rank mismatch in array reference" }
14 character(3), allocatable
:: z(:,:)
16 z(2,1) = z(-1) ! { dg-error "Rank mismatch in array reference" }
17 z(2,1) = z(99) ! { dg-error "Rank mismatch in array reference" }
18 z(2,1) = z(huge(0)) ! { dg-error "Rank mismatch in array reference" }
19 z(2,1) = z(-huge(0)) ! { dg-error "Rank mismatch in array reference" }
20 z(-1) = z(2,1) ! { dg-error "Rank mismatch in array reference" }
21 z(99) = z(2,1) ! { dg-error "Rank mismatch in array reference" }
22 z(huge(0)) = z(2,1) ! { dg-error "Rank mismatch in array reference" }
23 z(-huge(0)) = z(2,1) ! { dg-error "Rank mismatch in array reference" }
27 character(:), allocatable
:: z(:,:)
29 z(2,1) = z(-1) ! { dg-error "Rank mismatch in array reference" }
30 z(2,1) = z(99) ! { dg-error "Rank mismatch in array reference" }
31 z(2,1) = z(huge(0)) ! { dg-error "Rank mismatch in array reference" }
32 z(2,1) = z(-huge(0)) ! { dg-error "Rank mismatch in array reference" }
33 z(-1) = z(2,1) ! { dg-error "Rank mismatch in array reference" }
34 z(99) = z(2,1) ! { dg-error "Rank mismatch in array reference" }
35 z(huge(0)) = z(2,1) ! { dg-error "Rank mismatch in array reference" }
36 z(-huge(0)) = z(2,1) ! { dg-error "Rank mismatch in array reference" }