http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51669
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-27 22:18:06 UTC --- This is enough, really simple: int omp_get_max_threads(); template<typename _Tp> const _Tp& min(const _Tp&, const _Tp&); void s451_() { int i; #pragma omp parallel for num_threads(min(4, omp_get_max_threads())) for (i = 1; i < 33; ++i) ; }