gcc/testsuite/gfortran.dg/data_bounds_2.f90
raw| 1 | ! { dg-do compile } |
| 2 | ! { dg-options "-std=f2018" } |
| 3 | ! PR fortran/35095 - Improve bounds checking for DATA with implied-do |
| 4 | |
| 5 | program chkdata |
| 6 | character(len=2), dimension(2,2) :: str |
| 7 | data (str(i,1),i=1,3) / 'A','B','C' / ! { dg-error "above array upper bound" } |
| 8 | data (str(j,2),j=0,2) / 'A','B','C' / ! { dg-error "below array lower bound" } |
| 9 | end program chkdata |