https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96255
--- Comment #31 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- (In reply to anlauf from comment #30) > This is not OK, as there should be no warning. > > + subroutine test_unused_new_iterator() > + implicit none > + integer :: iter_count > + > + iter_count = 0 > + do concurrent (integer :: n = 1:4) > + iter_count = iter_count + 1 > + end do > + > + if (iter_count /= 4) stop 10 > + end subroutine test_unused_new_iterator > > This is problematic: you should either declare a reduction operation, which > is already tested elsewhere, or just drop this part. > --- snip --- Good catch! One must assume that the loop can execute in parallel and in any order so there is no guarantee in the future this part of the test will come out equal to four. I have deleted that portion and will proceed.
