This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/50675] master and single OpenMP constructs broken


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]