[llvm-bugs] [Bug 51781] New: parallel region appears not to execute

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 7 06:42:36 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51781

            Bug ID: 51781
           Summary: parallel region appears not to execute
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Clang Compiler Support
          Assignee: tianshilei1992 at gmail.com
          Reporter: jdenny.ornl at gmail.com
                CC: a.bataev at hotmail.com, george_rokos at hotmail.com,
                    jdoerfert at anl.gov, llvm-bugs at lists.llvm.org

I see the following bug at 95299019e35b (main from yesterday, 9/7).  git bisect
reveals it first appeared at a70ef3f568cb (a revert from Shilei on 7/15).  I am
testing while offloading from x86_64 to nvptx64.

```
$ cat test.c
include <stdio.h>
int main() {
  int x = 0, y = 1;
  #pragma omp target teams num_teams(1) map(tofrom:x, y)
  {
    x = 5;
    #pragma omp parallel num_threads(1)
    y = 6;
  }
  printf("%d, %d\n", x, y);
  return 0;
}
$ clang -fopenmp -fopenmp-targets=nvptx64 test.c
$ ./a.out
5, 1
```

I expect the output to be "5, 6".  It seems the parallel region does not
execute.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210907/b76b1e2f/attachment.html>


More information about the llvm-bugs mailing list