https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96837
Bug ID: 96837 Summary: A false if clause in "omp parallel" seriously affects the performance Product: gcc Version: 9.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp Assignee: unassigned at gcc dot gnu.org Reporter: olaf.krzikalla at dlr dot de CC: jakub at gcc dot gnu.org Target Milestone: --- Created attachment 49148 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49148&action=edit omp_if_minimal.cpp Run the attached example without further command line arguments. Possible output: Time without false parallel if: 0.0496271 Time with false parallel if: 2.27622 The performance of the second measured call to reduce (below the "omp parallel if") seems to be affected by the "omp parallel if", altough "argc > 1" resolves to false. Applies at least to version 7.x and 9.2. Side note: the intel openmp runtime does not have this issue (no recompiling necessary).