http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50675
Bug #: 50675 Summary: master and single OpenMP constructs broken Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: markflorisso...@gmail.com single and master do not work properly in loops. They are either not executed as often as they should, or the program deadlocks entirely: #include <stdio.h> int main(int argc, char **argv) { int i; #pragma omp parallel { for (i = 0; i < 10; i++) { #pragma omp single puts("hello"); } } return 0; } This program deadlocks in gcc 4.4 and 4.6, whereas in 4.2 is is only executed 4 times (which is the number of cores on my machine). The same goes for the master construct.