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

            Bug ID: 125626
           Summary: OpenMP: Add front-end diagnostics for unused iterator
                    variables
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: diagnostic, openmp
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sandra at gcc dot gnu.org
                CC: burnus at gcc dot gnu.org
  Target Milestone: ---

We formerly had some code in the gimplifier that emitted a warning about OpenMP
iterator variables that were not used.  It was removed in commit
gcc-17-1387-g32bbd8849a5 because it resulted in a lot of false positives as
well as confusing messages about internal variables added by the front ends
(e.g., Fortran array descriptors), or expansion of deep mapping or user-defined
mappers.

It would be nice to have some warnings about code that is likely incorrect, but
the diagnostic needs to be issued by the respective front ends; the gimplifier
is too late.

In addition to the commit message for the patch mentioned above, Tobias's
review comment on it raised some additional issues.

https://gcc.gnu.org/pipermail/gcc-patches/2026-June/719436.html

Reply via email to