[flang-commits] [flang] [Flang][OpenMp]Add testcase for threadprivate with blank common block (PR #74969)
via flang-commits
flang-commits at lists.llvm.org
Sun Dec 17 20:24:54 PST 2023
https://github.com/harishch4 updated https://github.com/llvm/llvm-project/pull/74969
>From fcdeea67fc62729d0f5a6269483042f222505ec7 Mon Sep 17 00:00:00 2001
From: Harish Chambeti <harishcse44 at gmail.com>
Date: Sun, 10 Dec 2023 11:03:10 +0530
Subject: [PATCH 1/2] [Flang][OpenMP] Add testcase for threadprivate with blank
common block
---
.../Parser/OpenMP/threadprivate-blank-common-block.f90 | 9 +++++++++
1 file changed, 9 insertions(+)
create mode 100644 flang/test/Parser/OpenMP/threadprivate-blank-common-block.f90
diff --git a/flang/test/Parser/OpenMP/threadprivate-blank-common-block.f90 b/flang/test/Parser/OpenMP/threadprivate-blank-common-block.f90
new file mode 100644
index 00000000000000..b1ca96f5053c20
--- /dev/null
+++ b/flang/test/Parser/OpenMP/threadprivate-blank-common-block.f90
@@ -0,0 +1,9 @@
+! RUN: not %flang_fc1 -fsyntax-only %s -fopenmp 2>&1 | FileCheck %s
+! From Standard: A blank common block cannot appear in a threadprivate directive.
+
+program main
+ integer :: a
+ common//a
+ !CHECK: error: expected one of '$@ABCDEFGHIJKLMNOPQRSTUVWXYZ_'
+ !$omp threadprivate(//)
+ end
\ No newline at end of file
>From 6ee48227c91c12e057c9870e5845e517488a7b4e Mon Sep 17 00:00:00 2001
From: harishch4 <harishcse44 at gmail.com>
Date: Mon, 18 Dec 2023 09:54:46 +0530
Subject: [PATCH 2/2] Update threadprivate-blank-common-block.f90
---
flang/test/Parser/OpenMP/threadprivate-blank-common-block.f90 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flang/test/Parser/OpenMP/threadprivate-blank-common-block.f90 b/flang/test/Parser/OpenMP/threadprivate-blank-common-block.f90
index b1ca96f5053c20..6317258e6ec8d5 100644
--- a/flang/test/Parser/OpenMP/threadprivate-blank-common-block.f90
+++ b/flang/test/Parser/OpenMP/threadprivate-blank-common-block.f90
@@ -6,4 +6,4 @@ program main
common//a
!CHECK: error: expected one of '$@ABCDEFGHIJKLMNOPQRSTUVWXYZ_'
!$omp threadprivate(//)
- end
\ No newline at end of file
+ end
More information about the flang-commits
mailing list