This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/50675] master and single OpenMP constructs broken
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 09 Oct 2011 13:41:54 +0000
- Subject: [Bug c/50675] master and single OpenMP constructs broken
- Auto-submitted: auto-generated
- References: <bug-50675-4@http.gcc.gnu.org/bugzilla/>
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.