[flang][openacc] Handle optional end directive in combined construct
authorValentin Clement <clementval@gmail.com>
Thu, 13 Aug 2020 18:04:43 +0000 (14:04 -0400)
committerclementval <clementval@gmail.com>
Thu, 13 Aug 2020 18:05:00 +0000 (14:05 -0400)
commit05169af5cea2c3b9aa0f38354d0e81ddf6b7a3d9
tree5efb8340114b2a6a150a6ab3aedc57fce7dc0d1c
parent8d58eb11f9dabacc37f1f5e2cc83149b24868180
[flang][openacc] Handle optional end directive in combined construct

OpenACC combined construct can have an optional end directive. This patch handle this
case in the parsing/unparsing with a canonicalization step. Unlike OmpEndLoopDirective,
this doesn't need a special treatment in the pre-fir tree as there is no clause attached to
a AccEndCombinedDirective.

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D84481
flang/include/flang/Parser/parse-tree.h
flang/lib/Parser/executable-parsers.cpp
flang/lib/Parser/openacc-parsers.cpp
flang/lib/Parser/program-parsers.cpp
flang/lib/Parser/type-parsers.h
flang/lib/Parser/unparse.cpp
flang/lib/Semantics/canonicalize-acc.cpp
flang/lib/Semantics/check-acc-structure.cpp
flang/test/Lower/pre-fir-tree05.f90
flang/test/Semantics/acc-canonicalization-validity.f90 [new file with mode: 0644]
flang/test/Semantics/acc-clause-validity.f90