diff options
author | Peter Klausler <pklausler@nvidia.com> | 2023-05-17 06:44:56 -0700 |
---|---|---|
committer | Peter Klausler <pklausler@nvidia.com> | 2023-05-18 11:04:30 -0700 |
commit | cbc5d42fcedace0b9dcfa2e2a91d41e3ce84908c (patch) | |
tree | 930ed29ccc0ea0185227dc25e059e713555b519c /flang/test/Parser | |
parent | 8fe9718dd5f27168fc282c6420bfae0eb7ee6819 (diff) | |
download | llvm-cbc5d42fcedace0b9dcfa2e2a91d41e3ce84908c.zip llvm-cbc5d42fcedace0b9dcfa2e2a91d41e3ce84908c.tar.gz llvm-cbc5d42fcedace0b9dcfa2e2a91d41e3ce84908c.tar.bz2 |
[flang] Allow compiler directives in macros
Modify the prescanner to allow compiler directives to appear in
macro expansions, and adjust the parser to accept a semicolon
as a directive terminator.
Differential Revision: https://reviews.llvm.org/D150780
Diffstat (limited to 'flang/test/Parser')
-rw-r--r-- | flang/test/Parser/compiler-directives.f90 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/flang/test/Parser/compiler-directives.f90 b/flang/test/Parser/compiler-directives.f90 index 1e6c67d..88cfd09 100644 --- a/flang/test/Parser/compiler-directives.f90 +++ b/flang/test/Parser/compiler-directives.f90 @@ -2,6 +2,12 @@ ! Test that compiler directives can appear in various places. +#define PROC(KIND) \ + interface; integer(KIND) function foo(a); \ + integer(KIND), intent(in) :: a; \ + !dir$ ignore_tkr a; \ + end; end interface + !dir$ integer module m !dir$ integer @@ -11,6 +17,7 @@ module m !dir$ integer !dir$ integer=64 !dir$ integer = 64 + PROC(4) !dir$ optimize:1 !dir$ optimize : 1 !dir$ loop count (10000) |