Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/forall_18.f90 @ 128:fe568345ddd5
fix CbC-example
author | mir3636 |
---|---|
date | Wed, 11 Apr 2018 19:32:28 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
! { dg-do compile } ! PR fortran/69741 - improve error message for nonscalar FORALL index variables ! subroutine check integer :: ii(2), i real :: a(3,2) forall (ii(1)=1:3, i=1:2) ! { dg-error "scalar variable of type integer" } a(ii(1),i) = ii(1) * i end forall forall (j=1:3, ii(2)=1:2) ! { dg-error "scalar variable of type integer" } a(j,ii(2)) = j * ii(2) end forall end subroutine check