http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50675
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-09 13:41:54 UTC --- User error. The i variable is shared in your testcase, thus different threads may encounter #pragma omp single different number of times, which is invalid. Just use #pragma omp parallel private (i) or declare i inside of the #pragma omp parallel block instead.