Ping. The Linaro CI has kindly pointed me to two test regressions that I had missed. I have adjust the test expectations in the updated patch which I have attached. Frederik On 28.02.24 8:32 PM, Frederik Harwath wrote: > Hi, > > this patch implements a warning about (some simple cases of direct) > modifications of iteration variables in OpenMP loops which are > forbidden according to the OpenMP specification. I think this can be > helpful, especially for new OpenMP users. I have implemented this > after I observed some confusion concerning this topic recently. > The check is implemented during gimplification. It reuses the > "loop_iter_var" vector in the "gimplify_omp_ctx" which was previously > only used for "doacross" handling to identify the loop iteration > variables during the gimplification of MODIFY_EXPRs in omp_for bodies. > I have only added a common C/C++ test because I don't see any special > C++ constructs for which a warning *should* be emitted and Fortran > rejects modifications of iteration variables in do loops in general. > > I have run "make check" on x86_64-linux-gnu and not observed any > regressions. > > Is it ok to commit this? > > Best regards, > Frederik