https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111017
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |11.4.0 Known to fail| |12.3.1, 13.2.1 Summary|[OpenMP] Wrong code with |[12/13/14 |non-rectangular loop nest |Regression][OpenMP] Wrong | |code with non-rectangular | |loop nest --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> --- Works with GCC 11, fails since GCC 12. --------- For 'if (0)', there is an off-by-one problem: e.g. for DIM=2, printing 'j' shows: -1 0 1 2 instead of the expected 0 1 2 3. With N=32 and if(1), I see for num_threads = 12 for thread 0: -12 -11 -10 -9 -8 -7 -6 -5 -4 Thus, the value is off by omp_get_num_threads(); For the other threads, I see values between -4198732 and -4198822.