[Openmp-commits] [openmp] [OpenMP] Ignore teams ICV setters in restricted contexts (PR #194428)

Deepak Eachempati via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 8 13:06:58 PDT 2026


dreachem wrote:

> Hi @dreachem, could you see if this is something you agree with?

This approach seems reasonable. However, does the guard also catch this case?

```c
int main()
{
   omp_set_num_teams(5);
   assert(omp_get_max_teams() == 5);
   #pragma omp target if(0)
   { // new implicit parallel region due to target construct
      omp_set_num_teams(12); 
   }
   assert(omp_get_max_teams() == 5); // should still be 5

   return 0;
}
```



https://github.com/llvm/llvm-project/pull/194428


More information about the Openmp-commits mailing list