PR #101009 exposed a semantic check issue with OPTIONAL dummy arguments. Another issue occurred when using %{re,im,len,kind}, as these also need to be skipped when handling variables with implicitly defined DSAs. These issues were found by Fujitsu testsuite.
10 lines
271 B
Fortran
10 lines
271 B
Fortran
! RUN: %flang_fc1 -fopenmp -fsyntax-only %s
|
|
|
|
! Check that using 'present' inside 'parallel' doesn't cause syntax errors.
|
|
subroutine test_present(opt)
|
|
integer, optional :: opt
|
|
!$omp parallel
|
|
if (present(opt)) print *, "present"
|
|
!$omp end parallel
|
|
end subroutine
|