Issue 179425
Summary [Flang][Openmp] Flang rejects OpenMP allocate clause on DO and parallel DO.
Labels flang
Assignees
Reporter ShashwathiNavada
    According to [13.6.2](https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-6-0.pdf), allocate clause should be allowed in DO directive. But in Flang, the syntax,
```
    !$omp do private(CCC, val) allocate(omp_large_cap_mem_alloc:CCC, val)
 
    !$omp parallel do private(CCC, val) allocate(omp_high_bw_mem_alloc:CCC, val) shared(AAA,BBB,DDD)
 
```
Throws the below diagnostic.
```
error: ALLOCATE clause is not allowed on the DO directive
      !$omp do private(CCC, val) allocate(omp_large_cap_mem_alloc:CCC, val)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: ALLOCATE clause is not allowed on the PARALLEL DO directive
      !$omp parallel do private(CCC, val) allocate(omp_high_bw_mem_alloc:CCC, val) shared(AAA,BBB,DDD)
```

https://godbolt.org/z/MEbh7oY5f

Happy to submit PR to enable the support for allocate in both parallel do and do directives if the issue seems legit.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to