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

--- Comment #22 from anlauf at gcc dot gnu.org ---
Compiling the new testcase with -Wall I get the following warnings:

do_concurrent_typespec_1.f90:102:37:

  102 |     do concurrent (integer :: i = 1:2, m = 1:2)
      |                                     1
Warning: Unused variable '_i' declared at (1) [-Wunused-variable]
do_concurrent_typespec_1.f90:81:45:

   81 |     do concurrent (integer(kind=2) :: k = 1:4)
      |                                             1
Warning: Unused variable '_k' declared at (1) [-Wunused-variable]
do_concurrent_typespec_1.f90:61:37:

   61 |     do concurrent (integer :: i = 1:3)
      |                                     1
Warning: Unused variable '_i' declared at (1) [-Wunused-variable]


First, the name emitted is confusing, and the warning is wrong.
We could mark the loop variable as used.

Reply via email to