Add support for the following options: * -fopenmp * -fopenacc Update OpenMP and OpenACC semantics tests to use the new driver if it is built, otherwise use f18. OpenMP tests that include `use omp_lib` or run `test_symbols.sh` have not been updated as they require options `-intrinsic-module-directory` and `-funparse-with-symbols` which are currently not implemented in the new driver. Similarly OpenACC tests that run `test_symbols.sh` have not been updated. This patch also moves semanticsContext to CompilerInvocation and creates it in CompilerInvocation#setSemanticsOpts so that the semantics context can use Fortran::parser::Options#features. Summary of changes: - Move semanticsContext to CompilerInvocation.h - Update OpenMP and OpenACC semantics tests that do not rely on `-intrinsic-module-directory` and `-funparse-with-symbols` to use %flang Differential Revision: https://reviews.llvm.org/D96032
43 lines
870 B
Fortran
43 lines
870 B
Fortran
! RUN: %S/../test_errors.sh %s %t %flang -fopenacc
|
|
|
|
! Check OpenACC clause validity for the following construct and directive:
|
|
! 2.16.13 Wait
|
|
|
|
program openacc_wait_validity
|
|
|
|
implicit none
|
|
|
|
logical :: ifCondition = .TRUE.
|
|
|
|
!$acc wait
|
|
|
|
!$acc wait async
|
|
|
|
!$acc wait(1)
|
|
!$acc wait(1, 2)
|
|
|
|
!$acc wait(queues: 1)
|
|
!$acc wait(queues: 1, 2)
|
|
|
|
!$acc wait(devnum: 1: 3)
|
|
!$acc wait(devnum: 1: 3, 4)
|
|
|
|
!$acc wait(devnum: 1: queues: 3)
|
|
!$acc wait(devnum: 1: queues: 3, 4)
|
|
|
|
!$acc wait(1) if(.true.)
|
|
|
|
!ERROR: At most one IF clause can appear on the WAIT directive
|
|
!$acc wait(1) if(.true.) if(.false.)
|
|
|
|
!$acc wait(1) if(.true.) async
|
|
|
|
!$acc wait(1) if(ifCondition) async
|
|
|
|
!$acc wait(1) if(.true.) async(1)
|
|
|
|
!ERROR: At most one ASYNC clause can appear on the WAIT directive
|
|
!$acc wait(1) if(.true.) async(1) async
|
|
|
|
end program openacc_wait_validity
|