tianshilei1992 added a comment.

This patch causes wrong arguments in nested parallel regions. 
`openmp/libomptarget/test/offloading/bug49779.cpp` fails and after reverting 
this patch, it passed. You can easily find out the wrong pointer with a tiny 
change of the test case:

  void work(int *C) {
    printf("work: &C = %p\n", C);
  #pragma omp atomic
    ++(*C);
  }
  
  void use(int *C) {
    printf("use: &C = %p\n", C);
  #pragma omp parallel num_threads(2)
    work(C);
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102107/new/

https://reviews.llvm.org/D102107

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to