summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/implied_do_1.f90
blob: d837e8f9f03cd37e40a035d24d9e06a6be8f8744 (plain)
1
2
3
4
5
6
7
8
9
10
11
! { dg-do run }
! PR fortran/29458 - spurious warning for implied do-loop counter

  integer :: n, i
  i = 10
  n = 5
  n = SUM((/(i,i=1,n)/))

  ! 'i' must not be changed
  IF (i /= 10) CALL abort()
END