https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126333

--- Comment #5 from Harald Anlauf <anlauf at gcc dot gnu.org> ---
And another one which is too small to deserve a separate PR:

% cat pr126333-z2.f90
subroutine foo ()
  logical :: mask(10)
  integer :: i
  mask = .true.
  do i = 1, size (mask)
     do while (mask(i))
        mask(i) = .false.
     end do
  end do
end

% gfc-17 -Wall pr126333-z2.f90 -c
pr126333-z2.f90:7:18:

    7 |         mask(i) = .false.
      |                  1
Warning: Variable »mask« defined at (1) but never used
[-Wunused-but-set-variable=]

Reply via email to