Issue 103986
Summary [Flang,OpenMP] optional arguments not working inside OpenMP
Labels flang
Assignees
Reporter lukasm91
    This code:

```
subroutine s(opt_arg)
implicit none
integer, optional, intent(in) :: opt_arg
integer :: i, ni

ni = 100

!$omp parallel do
do i = 1, ni
  if (present(opt_arg)) then
  endif
enddo
!$omp end parallel do
end subroutine
```

is not working and gives:

```
error: Semantic errors in /app/example.f90
/app/example.f90:10:15: error: Argument of PRESENT() must be the name of a whole OPTIONAL dummy argument
 if (present(opt_arg)) then
                ^^^^^^^
```
when compiled with -fopenmp


https://godbolt.org/z/e6GfcjWcb
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to