[flang-commits] [flang] b826d55 - [NFC] Move flang OpenMP semantic tests under one single directory
via flang-commits
flang-commits at lists.llvm.org
Fri Jun 10 19:48:06 PDT 2022
Author: PeixinQiao
Date: 2022-06-11T10:46:42+08:00
New Revision: b826d551fcd2eb0c4f13fd57471bd3142d26d3ba
URL: https://github.com/llvm/llvm-project/commit/b826d551fcd2eb0c4f13fd57471bd3142d26d3ba
DIFF: https://github.com/llvm/llvm-project/commit/b826d551fcd2eb0c4f13fd57471bd3142d26d3ba.diff
LOG: [NFC] Move flang OpenMP semantic tests under one single directory
To be consistent with OpenACC and will find the tests in one single
directory for OpenMP.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D127529
Added:
flang/test/Semantics/OpenMP/omp-allocate-directive.f90
flang/test/Semantics/OpenMP/omp-allocate01.f90
flang/test/Semantics/OpenMP/omp-allocate02.f90
flang/test/Semantics/OpenMP/omp-allocate03.f90
flang/test/Semantics/OpenMP/omp-allocate04.f90
flang/test/Semantics/OpenMP/omp-allocate05.f90
flang/test/Semantics/OpenMP/omp-allocate06.f90
flang/test/Semantics/OpenMP/omp-allocate07.f90
flang/test/Semantics/OpenMP/omp-allocate08.f90
flang/test/Semantics/OpenMP/omp-atomic.f90
flang/test/Semantics/OpenMP/omp-atomic01.f90
flang/test/Semantics/OpenMP/omp-atomic02.f90
flang/test/Semantics/OpenMP/omp-atomic03.f90
flang/test/Semantics/OpenMP/omp-atomic04.f90
flang/test/Semantics/OpenMP/omp-atomic05.f90
flang/test/Semantics/OpenMP/omp-clause-validity01.f90
flang/test/Semantics/OpenMP/omp-combined-constructs.f90
flang/test/Semantics/OpenMP/omp-copyin01.f90
flang/test/Semantics/OpenMP/omp-copyin02.f90
flang/test/Semantics/OpenMP/omp-copyin03.f90
flang/test/Semantics/OpenMP/omp-copyin04.f90
flang/test/Semantics/OpenMP/omp-copyin05.f90
flang/test/Semantics/OpenMP/omp-copyprivate01.f90
flang/test/Semantics/OpenMP/omp-copyprivate02.f90
flang/test/Semantics/OpenMP/omp-copyprivate03.f90
flang/test/Semantics/OpenMP/omp-declarative-directive.f90
flang/test/Semantics/OpenMP/omp-declare-target01.f90
flang/test/Semantics/OpenMP/omp-declare-target02.f90
flang/test/Semantics/OpenMP/omp-declare-target03.f90
flang/test/Semantics/OpenMP/omp-declare-target04.f90
flang/test/Semantics/OpenMP/omp-declare-target05.f90
flang/test/Semantics/OpenMP/omp-default.f90
flang/test/Semantics/OpenMP/omp-default02.f90
flang/test/Semantics/OpenMP/omp-depend01.f90
flang/test/Semantics/OpenMP/omp-depend02.f90
flang/test/Semantics/OpenMP/omp-depend03.f90
flang/test/Semantics/OpenMP/omp-device-constructs.f90
flang/test/Semantics/OpenMP/omp-do-collapse-positivecases.f90
flang/test/Semantics/OpenMP/omp-do-collapse.f90
flang/test/Semantics/OpenMP/omp-do-cycle.f90
flang/test/Semantics/OpenMP/omp-do-ordered-positivecases.f90
flang/test/Semantics/OpenMP/omp-do-ordered.f90
flang/test/Semantics/OpenMP/omp-do-schedule01.f90
flang/test/Semantics/OpenMP/omp-do-schedule02.f90
flang/test/Semantics/OpenMP/omp-do-schedule03.f90
flang/test/Semantics/OpenMP/omp-do-schedule04.f90
flang/test/Semantics/OpenMP/omp-do01-positivecase.f90
flang/test/Semantics/OpenMP/omp-do01.f90
flang/test/Semantics/OpenMP/omp-do02.f90
flang/test/Semantics/OpenMP/omp-do03.f90
flang/test/Semantics/OpenMP/omp-do04-positivecase.f90
flang/test/Semantics/OpenMP/omp-do04.f90
flang/test/Semantics/OpenMP/omp-do05-positivecase.f90
flang/test/Semantics/OpenMP/omp-do05.f90
flang/test/Semantics/OpenMP/omp-do06-positivecases.f90
flang/test/Semantics/OpenMP/omp-do06.f90
flang/test/Semantics/OpenMP/omp-do07.f90
flang/test/Semantics/OpenMP/omp-do08.f90
flang/test/Semantics/OpenMP/omp-do09.f90
flang/test/Semantics/OpenMP/omp-do10.f90
flang/test/Semantics/OpenMP/omp-do11.f90
flang/test/Semantics/OpenMP/omp-do12.f90
flang/test/Semantics/OpenMP/omp-do13.f90
flang/test/Semantics/OpenMP/omp-do14.f90
flang/test/Semantics/OpenMP/omp-do15.f90
flang/test/Semantics/OpenMP/omp-do16.f90
flang/test/Semantics/OpenMP/omp-do17.f90
flang/test/Semantics/OpenMP/omp-do18.f90
flang/test/Semantics/OpenMP/omp-do19.f90
flang/test/Semantics/OpenMP/omp-firstprivate01.f90
flang/test/Semantics/OpenMP/omp-flush01.f90
flang/test/Semantics/OpenMP/omp-flush02.f90
flang/test/Semantics/OpenMP/omp-invalid-branch.f90
flang/test/Semantics/OpenMP/omp-lastprivate01.f90
flang/test/Semantics/OpenMP/omp-lastprivate02.f90
flang/test/Semantics/OpenMP/omp-linear-iter.f90
flang/test/Semantics/OpenMP/omp-loop-association.f90
flang/test/Semantics/OpenMP/omp-loop-simd01.f90
flang/test/Semantics/OpenMP/omp-modfile-threadprivate.f90
flang/test/Semantics/OpenMP/omp-nested-barrier.f90
flang/test/Semantics/OpenMP/omp-nested-cancel.f90
flang/test/Semantics/OpenMP/omp-nested-cancellation-point.f90
flang/test/Semantics/OpenMP/omp-nested-distribute.f90
flang/test/Semantics/OpenMP/omp-nested-master.f90
flang/test/Semantics/OpenMP/omp-nested-simd.f90
flang/test/Semantics/OpenMP/omp-nested-target.f90
flang/test/Semantics/OpenMP/omp-nested-teams.f90
flang/test/Semantics/OpenMP/omp-nested01.f90
flang/test/Semantics/OpenMP/omp-no-dowhile-in-parallel.f90
flang/test/Semantics/OpenMP/omp-nontemporal.f90
flang/test/Semantics/OpenMP/omp-ordered-simd.f90
flang/test/Semantics/OpenMP/omp-ordered01.f90
flang/test/Semantics/OpenMP/omp-ordered02.f90
flang/test/Semantics/OpenMP/omp-ordered03.f90
flang/test/Semantics/OpenMP/omp-parallel-private01.f90
flang/test/Semantics/OpenMP/omp-parallel-private02.f90
flang/test/Semantics/OpenMP/omp-parallel-private03.f90
flang/test/Semantics/OpenMP/omp-parallel-private04.f90
flang/test/Semantics/OpenMP/omp-parallel-sections01.f90
flang/test/Semantics/OpenMP/omp-parallel-shared01.f90
flang/test/Semantics/OpenMP/omp-parallel-shared02.f90
flang/test/Semantics/OpenMP/omp-parallel-shared03.f90
flang/test/Semantics/OpenMP/omp-parallel-shared04.f90
flang/test/Semantics/OpenMP/omp-parallel01.f90
flang/test/Semantics/OpenMP/omp-parallel02.f90
flang/test/Semantics/OpenMP/omp-private-is-pointer-check.f90
flang/test/Semantics/OpenMP/omp-private01.f90
flang/test/Semantics/OpenMP/omp-private02.f90
flang/test/Semantics/OpenMP/omp-reduction01.f90
flang/test/Semantics/OpenMP/omp-reduction02.f90
flang/test/Semantics/OpenMP/omp-reduction03.f90
flang/test/Semantics/OpenMP/omp-reduction04.f90
flang/test/Semantics/OpenMP/omp-reduction05.f90
flang/test/Semantics/OpenMP/omp-reduction06.f90
flang/test/Semantics/OpenMP/omp-reduction07.f90
flang/test/Semantics/OpenMP/omp-reduction08.f90
flang/test/Semantics/OpenMP/omp-reduction09.f90
flang/test/Semantics/OpenMP/omp-reduction10.f90
flang/test/Semantics/OpenMP/omp-resolve01.f90
flang/test/Semantics/OpenMP/omp-resolve02.f90
flang/test/Semantics/OpenMP/omp-resolve03.f90
flang/test/Semantics/OpenMP/omp-resolve04.f90
flang/test/Semantics/OpenMP/omp-resolve05.f90
flang/test/Semantics/OpenMP/omp-resolve06.f90
flang/test/Semantics/OpenMP/omp-sections01.f90
flang/test/Semantics/OpenMP/omp-sections02.f90
flang/test/Semantics/OpenMP/omp-sections03.f90
flang/test/Semantics/OpenMP/omp-simd-aligned.f90
flang/test/Semantics/OpenMP/omp-simd-nontemporal.f90
flang/test/Semantics/OpenMP/omp-simd01.f90
flang/test/Semantics/OpenMP/omp-simd02.f90
flang/test/Semantics/OpenMP/omp-simd03.f90
flang/test/Semantics/OpenMP/omp-single01.f90
flang/test/Semantics/OpenMP/omp-single02.f90
flang/test/Semantics/OpenMP/omp-symbol01.f90
flang/test/Semantics/OpenMP/omp-symbol02.f90
flang/test/Semantics/OpenMP/omp-symbol03.f90
flang/test/Semantics/OpenMP/omp-symbol04.f90
flang/test/Semantics/OpenMP/omp-symbol05.f90
flang/test/Semantics/OpenMP/omp-symbol06.f90
flang/test/Semantics/OpenMP/omp-symbol07.f90
flang/test/Semantics/OpenMP/omp-symbol08.f90
flang/test/Semantics/OpenMP/omp-sync-critical01.f90
flang/test/Semantics/OpenMP/omp-sync-critical02.f90
flang/test/Semantics/OpenMP/omp-task01.f90
flang/test/Semantics/OpenMP/omp-taskgroup01.f90
flang/test/Semantics/OpenMP/omp-taskloop-simd01.f90
flang/test/Semantics/OpenMP/omp-taskloop01.f90
flang/test/Semantics/OpenMP/omp-taskloop02.f90
flang/test/Semantics/OpenMP/omp-taskloop03.f90
flang/test/Semantics/OpenMP/omp-threadprivate01.f90
flang/test/Semantics/OpenMP/omp-threadprivate02.f90
flang/test/Semantics/OpenMP/omp-threadprivate03.f90
flang/test/Semantics/OpenMP/omp-threadprivate04.f90
flang/test/Semantics/OpenMP/omp-threadprivate05.f90
flang/test/Semantics/OpenMP/omp-workshare01.f90
flang/test/Semantics/OpenMP/omp-workshare02.f90
flang/test/Semantics/OpenMP/omp-workshare03.f90
flang/test/Semantics/OpenMP/omp-workshare04.f90
flang/test/Semantics/OpenMP/omp-workshare05.f90
Modified:
flang/test/Semantics/canondo05.f90
flang/test/Semantics/canondo06.f90
flang/test/Semantics/modfile47.f90
Removed:
flang/test/Semantics/canondo18.f90
flang/test/Semantics/canondo19.f90
flang/test/Semantics/modfile49.f90
flang/test/Semantics/omp-allocate-directive.f90
flang/test/Semantics/omp-allocate01.f90
flang/test/Semantics/omp-allocate02.f90
flang/test/Semantics/omp-allocate03.f90
flang/test/Semantics/omp-allocate04.f90
flang/test/Semantics/omp-allocate05.f90
flang/test/Semantics/omp-allocate06.f90
flang/test/Semantics/omp-allocate07.f90
flang/test/Semantics/omp-allocate08.f90
flang/test/Semantics/omp-atomic.f90
flang/test/Semantics/omp-atomic01.f90
flang/test/Semantics/omp-atomic02.f90
flang/test/Semantics/omp-atomic03.f90
flang/test/Semantics/omp-atomic04.f90
flang/test/Semantics/omp-atomic05.f90
flang/test/Semantics/omp-clause-validity01.f90
flang/test/Semantics/omp-combined-constructs.f90
flang/test/Semantics/omp-copyin01.f90
flang/test/Semantics/omp-copyin02.f90
flang/test/Semantics/omp-copyin03.f90
flang/test/Semantics/omp-copyin04.f90
flang/test/Semantics/omp-copyin05.f90
flang/test/Semantics/omp-copyprivate01.f90
flang/test/Semantics/omp-copyprivate02.f90
flang/test/Semantics/omp-copyprivate03.f90
flang/test/Semantics/omp-declarative-directive.f90
flang/test/Semantics/omp-declare-target01.f90
flang/test/Semantics/omp-declare-target02.f90
flang/test/Semantics/omp-declare-target03.f90
flang/test/Semantics/omp-declare-target04.f90
flang/test/Semantics/omp-declare-target05.f90
flang/test/Semantics/omp-default.f90
flang/test/Semantics/omp-default02.f90
flang/test/Semantics/omp-depend01.f90
flang/test/Semantics/omp-depend02.f90
flang/test/Semantics/omp-depend03.f90
flang/test/Semantics/omp-device-constructs.f90
flang/test/Semantics/omp-do-collapse-positivecases.f90
flang/test/Semantics/omp-do-collapse.f90
flang/test/Semantics/omp-do-cycle.f90
flang/test/Semantics/omp-do-ordered-positivecases.f90
flang/test/Semantics/omp-do-ordered.f90
flang/test/Semantics/omp-do-schedule01.f90
flang/test/Semantics/omp-do-schedule02.f90
flang/test/Semantics/omp-do-schedule03.f90
flang/test/Semantics/omp-do-schedule04.f90
flang/test/Semantics/omp-do01-positivecase.f90
flang/test/Semantics/omp-do01.f90
flang/test/Semantics/omp-do02.f90
flang/test/Semantics/omp-do03.f90
flang/test/Semantics/omp-do04-positivecase.f90
flang/test/Semantics/omp-do04.f90
flang/test/Semantics/omp-do05-positivecase.f90
flang/test/Semantics/omp-do05.f90
flang/test/Semantics/omp-do06-positivecases.f90
flang/test/Semantics/omp-do06.f90
flang/test/Semantics/omp-do07.f90
flang/test/Semantics/omp-do08.f90
flang/test/Semantics/omp-do09.f90
flang/test/Semantics/omp-do10.f90
flang/test/Semantics/omp-do11.f90
flang/test/Semantics/omp-do12.f90
flang/test/Semantics/omp-do13.f90
flang/test/Semantics/omp-do14.f90
flang/test/Semantics/omp-do15.f90
flang/test/Semantics/omp-do16.f90
flang/test/Semantics/omp-do17.f90
flang/test/Semantics/omp-firstprivate01.f90
flang/test/Semantics/omp-flush01.f90
flang/test/Semantics/omp-flush02.f90
flang/test/Semantics/omp-invalid-branch.f90
flang/test/Semantics/omp-lastprivate01.f90
flang/test/Semantics/omp-lastprivate02.f90
flang/test/Semantics/omp-linear-iter.f90
flang/test/Semantics/omp-loop-association.f90
flang/test/Semantics/omp-loop-simd01.f90
flang/test/Semantics/omp-nested-barrier.f90
flang/test/Semantics/omp-nested-cancel.f90
flang/test/Semantics/omp-nested-cancellation-point.f90
flang/test/Semantics/omp-nested-distribute.f90
flang/test/Semantics/omp-nested-master.f90
flang/test/Semantics/omp-nested-simd.f90
flang/test/Semantics/omp-nested-target.f90
flang/test/Semantics/omp-nested-teams.f90
flang/test/Semantics/omp-nested01.f90
flang/test/Semantics/omp-no-dowhile-in-parallel.f90
flang/test/Semantics/omp-nontemporal.f90
flang/test/Semantics/omp-ordered-simd.f90
flang/test/Semantics/omp-ordered01.f90
flang/test/Semantics/omp-ordered02.f90
flang/test/Semantics/omp-ordered03.f90
flang/test/Semantics/omp-parallel-private01.f90
flang/test/Semantics/omp-parallel-private02.f90
flang/test/Semantics/omp-parallel-private03.f90
flang/test/Semantics/omp-parallel-private04.f90
flang/test/Semantics/omp-parallel-sections01.f90
flang/test/Semantics/omp-parallel-shared01.f90
flang/test/Semantics/omp-parallel-shared02.f90
flang/test/Semantics/omp-parallel-shared03.f90
flang/test/Semantics/omp-parallel-shared04.f90
flang/test/Semantics/omp-parallel01.f90
flang/test/Semantics/omp-parallel02.f90
flang/test/Semantics/omp-private-is-pointer-check.f90
flang/test/Semantics/omp-private01.f90
flang/test/Semantics/omp-private02.f90
flang/test/Semantics/omp-reduction01.f90
flang/test/Semantics/omp-reduction02.f90
flang/test/Semantics/omp-reduction03.f90
flang/test/Semantics/omp-reduction04.f90
flang/test/Semantics/omp-reduction05.f90
flang/test/Semantics/omp-reduction06.f90
flang/test/Semantics/omp-reduction07.f90
flang/test/Semantics/omp-reduction08.f90
flang/test/Semantics/omp-reduction09.f90
flang/test/Semantics/omp-reduction10.f90
flang/test/Semantics/omp-resolve01.f90
flang/test/Semantics/omp-resolve02.f90
flang/test/Semantics/omp-resolve03.f90
flang/test/Semantics/omp-resolve04.f90
flang/test/Semantics/omp-resolve05.f90
flang/test/Semantics/omp-resolve06.f90
flang/test/Semantics/omp-sections01.f90
flang/test/Semantics/omp-sections02.f90
flang/test/Semantics/omp-sections03.f90
flang/test/Semantics/omp-simd-aligned.f90
flang/test/Semantics/omp-simd-nontemporal.f90
flang/test/Semantics/omp-simd01.f90
flang/test/Semantics/omp-simd02.f90
flang/test/Semantics/omp-simd03.f90
flang/test/Semantics/omp-single01.f90
flang/test/Semantics/omp-single02.f90
flang/test/Semantics/omp-symbol01.f90
flang/test/Semantics/omp-symbol02.f90
flang/test/Semantics/omp-symbol03.f90
flang/test/Semantics/omp-symbol04.f90
flang/test/Semantics/omp-symbol05.f90
flang/test/Semantics/omp-symbol06.f90
flang/test/Semantics/omp-symbol07.f90
flang/test/Semantics/omp-symbol08.f90
flang/test/Semantics/omp-sync-critical01.f90
flang/test/Semantics/omp-sync-critical02.f90
flang/test/Semantics/omp-task01.f90
flang/test/Semantics/omp-taskgroup01.f90
flang/test/Semantics/omp-taskloop-simd01.f90
flang/test/Semantics/omp-taskloop01.f90
flang/test/Semantics/omp-taskloop02.f90
flang/test/Semantics/omp-taskloop03.f90
flang/test/Semantics/omp-threadprivate01.f90
flang/test/Semantics/omp-threadprivate02.f90
flang/test/Semantics/omp-threadprivate03.f90
flang/test/Semantics/omp-threadprivate04.f90
flang/test/Semantics/omp-threadprivate05.f90
flang/test/Semantics/omp-workshare01.f90
flang/test/Semantics/omp-workshare02.f90
flang/test/Semantics/omp-workshare03.f90
flang/test/Semantics/omp-workshare04.f90
flang/test/Semantics/omp-workshare05.f90
################################################################################
diff --git a/flang/test/Semantics/omp-allocate-directive.f90 b/flang/test/Semantics/OpenMP/omp-allocate-directive.f90
similarity index 91%
rename from flang/test/Semantics/omp-allocate-directive.f90
rename to flang/test/Semantics/OpenMP/omp-allocate-directive.f90
index 00c0f6baacf54..5204e4aceae76 100644
--- a/flang/test/Semantics/omp-allocate-directive.f90
+++ b/flang/test/Semantics/OpenMP/omp-allocate-directive.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! Check OpenMP Allocate directive
use omp_lib
diff --git a/flang/test/Semantics/omp-allocate01.f90 b/flang/test/Semantics/OpenMP/omp-allocate01.f90
similarity index 92%
rename from flang/test/Semantics/omp-allocate01.f90
rename to flang/test/Semantics/OpenMP/omp-allocate01.f90
index 74f87887578d5..92a7c23ff2765 100644
--- a/flang/test/Semantics/omp-allocate01.f90
+++ b/flang/test/Semantics/OpenMP/omp-allocate01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.0
! 2.11.3 allocate Directive
! The allocate directive must appear in the same scope as the declarations of
diff --git a/flang/test/Semantics/omp-allocate02.f90 b/flang/test/Semantics/OpenMP/omp-allocate02.f90
similarity index 92%
rename from flang/test/Semantics/omp-allocate02.f90
rename to flang/test/Semantics/OpenMP/omp-allocate02.f90
index ba3957f7b96ba..a5c4f3f6c1896 100644
--- a/flang/test/Semantics/omp-allocate02.f90
+++ b/flang/test/Semantics/OpenMP/omp-allocate02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.0
! 2.11.3 allocate Directive
! At most one allocator clause can appear on the allocate directive.
diff --git a/flang/test/Semantics/omp-allocate03.f90 b/flang/test/Semantics/OpenMP/omp-allocate03.f90
similarity index 92%
rename from flang/test/Semantics/omp-allocate03.f90
rename to flang/test/Semantics/OpenMP/omp-allocate03.f90
index d1e9686668565..320a9c9ea4122 100644
--- a/flang/test/Semantics/omp-allocate03.f90
+++ b/flang/test/Semantics/OpenMP/omp-allocate03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.0
! 2.11.3 allocate Directive
! A variable that is part of another variable (as an array or
diff --git a/flang/test/Semantics/omp-allocate04.f90 b/flang/test/Semantics/OpenMP/omp-allocate04.f90
similarity index 85%
rename from flang/test/Semantics/omp-allocate04.f90
rename to flang/test/Semantics/OpenMP/omp-allocate04.f90
index d5d97305756ed..405781be4c2d2 100644
--- a/flang/test/Semantics/omp-allocate04.f90
+++ b/flang/test/Semantics/OpenMP/omp-allocate04.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.0
! 2.11.3 allocate Directive
! Only the allocator clause is allowed on the allocate directive
diff --git a/flang/test/Semantics/omp-allocate05.f90 b/flang/test/Semantics/OpenMP/omp-allocate05.f90
similarity index 92%
rename from flang/test/Semantics/omp-allocate05.f90
rename to flang/test/Semantics/OpenMP/omp-allocate05.f90
index 89cf83dbe521f..04bcf9119e0f8 100644
--- a/flang/test/Semantics/omp-allocate05.f90
+++ b/flang/test/Semantics/OpenMP/omp-allocate05.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.0
! 2.11.3 allocate Directive
! allocate directives that appear in a target region must specify an allocator
diff --git a/flang/test/Semantics/omp-allocate06.f90 b/flang/test/Semantics/OpenMP/omp-allocate06.f90
similarity index 91%
rename from flang/test/Semantics/omp-allocate06.f90
rename to flang/test/Semantics/OpenMP/omp-allocate06.f90
index 22651348bf501..68a7e8857eb89 100644
--- a/flang/test/Semantics/omp-allocate06.f90
+++ b/flang/test/Semantics/OpenMP/omp-allocate06.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.0
! 2.11.3 allocate Directive
! List items specified in the allocate directive must not have the ALLOCATABLE attribute unless the directive is associated with an
diff --git a/flang/test/Semantics/omp-allocate07.f90 b/flang/test/Semantics/OpenMP/omp-allocate07.f90
similarity index 94%
rename from flang/test/Semantics/omp-allocate07.f90
rename to flang/test/Semantics/OpenMP/omp-allocate07.f90
index 80549f9c0187c..c01b35ab27400 100644
--- a/flang/test/Semantics/omp-allocate07.f90
+++ b/flang/test/Semantics/OpenMP/omp-allocate07.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.0
! 2.11.3 allocate Directive
! A type parameter inquiry cannot appear in an allocate directive.
diff --git a/flang/test/Semantics/omp-allocate08.f90 b/flang/test/Semantics/OpenMP/omp-allocate08.f90
similarity index 96%
rename from flang/test/Semantics/omp-allocate08.f90
rename to flang/test/Semantics/OpenMP/omp-allocate08.f90
index 2594933733ccc..65029d1ce0e5f 100644
--- a/flang/test/Semantics/omp-allocate08.f90
+++ b/flang/test/Semantics/OpenMP/omp-allocate08.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.0
! 2.11.3 allocate Directive
! If list items within the ALLOCATE directive have the SAVE attribute, are a common block name, or are declared in the scope of a
diff --git a/flang/test/Semantics/omp-atomic.f90 b/flang/test/Semantics/OpenMP/omp-atomic.f90
similarity index 94%
rename from flang/test/Semantics/omp-atomic.f90
rename to flang/test/Semantics/OpenMP/omp-atomic.f90
index 86d9457011b9d..44f06b7460bf1 100644
--- a/flang/test/Semantics/omp-atomic.f90
+++ b/flang/test/Semantics/OpenMP/omp-atomic.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
use omp_lib
! Check OpenMP 2.13.6 atomic Construct
diff --git a/flang/test/Semantics/omp-atomic01.f90 b/flang/test/Semantics/OpenMP/omp-atomic01.f90
similarity index 99%
rename from flang/test/Semantics/omp-atomic01.f90
rename to flang/test/Semantics/OpenMP/omp-atomic01.f90
index b668de202c17e..79f69e5843e82 100644
--- a/flang/test/Semantics/omp-atomic01.f90
+++ b/flang/test/Semantics/OpenMP/omp-atomic01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! Semantic checks for OpenMP 5.0 standard 2.17.7 atomic Construct.
use omp_lib
diff --git a/flang/test/Semantics/omp-atomic02.f90 b/flang/test/Semantics/OpenMP/omp-atomic02.f90
similarity index 98%
rename from flang/test/Semantics/omp-atomic02.f90
rename to flang/test/Semantics/OpenMP/omp-atomic02.f90
index ec04fda86afc5..336949ada3324 100644
--- a/flang/test/Semantics/omp-atomic02.f90
+++ b/flang/test/Semantics/OpenMP/omp-atomic02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Atomic construct
! section 2.17.7
diff --git a/flang/test/Semantics/omp-atomic03.f90 b/flang/test/Semantics/OpenMP/omp-atomic03.f90
similarity index 97%
rename from flang/test/Semantics/omp-atomic03.f90
rename to flang/test/Semantics/OpenMP/omp-atomic03.f90
index 4262416fa9930..f829e78426e5a 100644
--- a/flang/test/Semantics/omp-atomic03.f90
+++ b/flang/test/Semantics/OpenMP/omp-atomic03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Atomic construct
! section 2.17.7
diff --git a/flang/test/Semantics/omp-atomic04.f90 b/flang/test/Semantics/OpenMP/omp-atomic04.f90
similarity index 98%
rename from flang/test/Semantics/omp-atomic04.f90
rename to flang/test/Semantics/OpenMP/omp-atomic04.f90
index 15b832cd3bcdc..a81a091cdb225 100644
--- a/flang/test/Semantics/omp-atomic04.f90
+++ b/flang/test/Semantics/OpenMP/omp-atomic04.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Atomic construct
! section 2.17.7
diff --git a/flang/test/Semantics/omp-atomic05.f90 b/flang/test/Semantics/OpenMP/omp-atomic05.f90
similarity index 94%
rename from flang/test/Semantics/omp-atomic05.f90
rename to flang/test/Semantics/OpenMP/omp-atomic05.f90
index 1ff13d6cd29ce..70492675e61e1 100644
--- a/flang/test/Semantics/omp-atomic05.f90
+++ b/flang/test/Semantics/OpenMP/omp-atomic05.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! This tests the various semantics related to the clauses of various OpenMP atomic constructs
diff --git a/flang/test/Semantics/omp-clause-validity01.f90 b/flang/test/Semantics/OpenMP/omp-clause-validity01.f90
similarity index 99%
rename from flang/test/Semantics/omp-clause-validity01.f90
rename to flang/test/Semantics/OpenMP/omp-clause-validity01.f90
index 4391fad251382..e641493a2ccc3 100644
--- a/flang/test/Semantics/omp-clause-validity01.f90
+++ b/flang/test/Semantics/OpenMP/omp-clause-validity01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
use omp_lib
! Check OpenMP clause validity for the following directives:
!
diff --git a/flang/test/Semantics/omp-combined-constructs.f90 b/flang/test/Semantics/OpenMP/omp-combined-constructs.f90
similarity index 99%
rename from flang/test/Semantics/omp-combined-constructs.f90
rename to flang/test/Semantics/OpenMP/omp-combined-constructs.f90
index c8d3d2621c170..35ab6fcac58b9 100644
--- a/flang/test/Semantics/omp-combined-constructs.f90
+++ b/flang/test/Semantics/OpenMP/omp-combined-constructs.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
program main
implicit none
diff --git a/flang/test/Semantics/omp-copyin01.f90 b/flang/test/Semantics/OpenMP/omp-copyin01.f90
similarity index 91%
rename from flang/test/Semantics/omp-copyin01.f90
rename to flang/test/Semantics/OpenMP/omp-copyin01.f90
index 6aba8a2769aa8..0051b5d441f05 100644
--- a/flang/test/Semantics/omp-copyin01.f90
+++ b/flang/test/Semantics/OpenMP/omp-copyin01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.4.1 copyin Clause
! A list item that appears in a copyin clause must be threadprivate
diff --git a/flang/test/Semantics/omp-copyin02.f90 b/flang/test/Semantics/OpenMP/omp-copyin02.f90
similarity index 91%
rename from flang/test/Semantics/omp-copyin02.f90
rename to flang/test/Semantics/OpenMP/omp-copyin02.f90
index 8c92cccfa9177..09b876677ea31 100644
--- a/flang/test/Semantics/omp-copyin02.f90
+++ b/flang/test/Semantics/OpenMP/omp-copyin02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.4.1 copyin Clause
! A common block name that appears in a copyin clause must be declared to be
diff --git a/flang/test/Semantics/omp-copyin03.f90 b/flang/test/Semantics/OpenMP/omp-copyin03.f90
similarity index 91%
rename from flang/test/Semantics/omp-copyin03.f90
rename to flang/test/Semantics/OpenMP/omp-copyin03.f90
index 54a260427bcff..7c3759aa2e116 100644
--- a/flang/test/Semantics/omp-copyin03.f90
+++ b/flang/test/Semantics/OpenMP/omp-copyin03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.4.1 copyin Clause
! A list item that appears in a copyin clause must be threadprivate.
diff --git a/flang/test/Semantics/omp-copyin04.f90 b/flang/test/Semantics/OpenMP/omp-copyin04.f90
similarity index 88%
rename from flang/test/Semantics/omp-copyin04.f90
rename to flang/test/Semantics/OpenMP/omp-copyin04.f90
index 297d42ab3cffb..6f5e8dfef217b 100644
--- a/flang/test/Semantics/omp-copyin04.f90
+++ b/flang/test/Semantics/OpenMP/omp-copyin04.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.4.1 copyin Clause
! A list item that appears in a copyin clause must be threadprivate
diff --git a/flang/test/Semantics/omp-copyin05.f90 b/flang/test/Semantics/OpenMP/omp-copyin05.f90
similarity index 90%
rename from flang/test/Semantics/omp-copyin05.f90
rename to flang/test/Semantics/OpenMP/omp-copyin05.f90
index 8f1ba29a5ce4c..142d5a7345c6e 100644
--- a/flang/test/Semantics/omp-copyin05.f90
+++ b/flang/test/Semantics/OpenMP/omp-copyin05.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.4.1 copyin Clause
! A common block name that appears in a copyin clause must be declared to be
diff --git a/flang/test/Semantics/omp-copyprivate01.f90 b/flang/test/Semantics/OpenMP/omp-copyprivate01.f90
similarity index 92%
rename from flang/test/Semantics/omp-copyprivate01.f90
rename to flang/test/Semantics/OpenMP/omp-copyprivate01.f90
index 37912ed1ef3d7..d5cf273476078 100644
--- a/flang/test/Semantics/omp-copyprivate01.f90
+++ b/flang/test/Semantics/OpenMP/omp-copyprivate01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.4.2 copyprivate Clause
! A list item that appears in a copyprivate clause may not appear in a
diff --git a/flang/test/Semantics/omp-copyprivate02.f90 b/flang/test/Semantics/OpenMP/omp-copyprivate02.f90
similarity index 90%
rename from flang/test/Semantics/omp-copyprivate02.f90
rename to flang/test/Semantics/OpenMP/omp-copyprivate02.f90
index e2d408aac781e..35fd6dddd20c9 100644
--- a/flang/test/Semantics/omp-copyprivate02.f90
+++ b/flang/test/Semantics/OpenMP/omp-copyprivate02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.4.2 copyprivate Clause
! Pointers with the INTENT(IN) attribute may not appear in a copyprivate clause.
diff --git a/flang/test/Semantics/omp-copyprivate03.f90 b/flang/test/Semantics/OpenMP/omp-copyprivate03.f90
similarity index 93%
rename from flang/test/Semantics/omp-copyprivate03.f90
rename to flang/test/Semantics/OpenMP/omp-copyprivate03.f90
index 0ca4909817ad8..eccc308b1d5ab 100644
--- a/flang/test/Semantics/omp-copyprivate03.f90
+++ b/flang/test/Semantics/OpenMP/omp-copyprivate03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.4.2 copyprivate Clause
! All list items that appear in the copyprivate clause must be either
diff --git a/flang/test/Semantics/omp-declarative-directive.f90 b/flang/test/Semantics/OpenMP/omp-declarative-directive.f90
similarity index 97%
rename from flang/test/Semantics/omp-declarative-directive.f90
rename to flang/test/Semantics/OpenMP/omp-declarative-directive.f90
index f53d73a742bd7..23ed8d5e0b555 100644
--- a/flang/test/Semantics/omp-declarative-directive.f90
+++ b/flang/test/Semantics/OpenMP/omp-declarative-directive.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! Check OpenMP declarative directives
diff --git a/flang/test/Semantics/omp-declare-target01.f90 b/flang/test/Semantics/OpenMP/omp-declare-target01.f90
similarity index 98%
rename from flang/test/Semantics/omp-declare-target01.f90
rename to flang/test/Semantics/OpenMP/omp-declare-target01.f90
index 972468fd9d065..3cb7cfb14c373 100644
--- a/flang/test/Semantics/omp-declare-target01.f90
+++ b/flang/test/Semantics/OpenMP/omp-declare-target01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.14.7 Declare Target Directive
diff --git a/flang/test/Semantics/omp-declare-target02.f90 b/flang/test/Semantics/OpenMP/omp-declare-target02.f90
similarity index 98%
rename from flang/test/Semantics/omp-declare-target02.f90
rename to flang/test/Semantics/OpenMP/omp-declare-target02.f90
index 2e4e5ee640283..57a2776ff9340 100644
--- a/flang/test/Semantics/omp-declare-target02.f90
+++ b/flang/test/Semantics/OpenMP/omp-declare-target02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.14.7 Declare Target Directive
diff --git a/flang/test/Semantics/omp-declare-target03.f90 b/flang/test/Semantics/OpenMP/omp-declare-target03.f90
similarity index 87%
rename from flang/test/Semantics/omp-declare-target03.f90
rename to flang/test/Semantics/OpenMP/omp-declare-target03.f90
index 8b291f22f7fa9..45064ff2ea255 100644
--- a/flang/test/Semantics/omp-declare-target03.f90
+++ b/flang/test/Semantics/OpenMP/omp-declare-target03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.14.7 Declare Target Directive
diff --git a/flang/test/Semantics/omp-declare-target04.f90 b/flang/test/Semantics/OpenMP/omp-declare-target04.f90
similarity index 87%
rename from flang/test/Semantics/omp-declare-target04.f90
rename to flang/test/Semantics/OpenMP/omp-declare-target04.f90
index 9f3b7757bc9bc..24f8b4abecd13 100644
--- a/flang/test/Semantics/omp-declare-target04.f90
+++ b/flang/test/Semantics/OpenMP/omp-declare-target04.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.14.7 Declare Target Directive
diff --git a/flang/test/Semantics/omp-declare-target05.f90 b/flang/test/Semantics/OpenMP/omp-declare-target05.f90
similarity index 95%
rename from flang/test/Semantics/omp-declare-target05.f90
rename to flang/test/Semantics/OpenMP/omp-declare-target05.f90
index 9d9c53a5659f5..2334a8506b7e4 100644
--- a/flang/test/Semantics/omp-declare-target05.f90
+++ b/flang/test/Semantics/OpenMP/omp-declare-target05.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.14.7 Declare Target Directive
diff --git a/flang/test/Semantics/omp-default.f90 b/flang/test/Semantics/OpenMP/omp-default.f90
similarity index 94%
rename from flang/test/Semantics/omp-default.f90
rename to flang/test/Semantics/OpenMP/omp-default.f90
index e4f364cf365e6..94de7fa468692 100644
--- a/flang/test/Semantics/omp-default.f90
+++ b/flang/test/Semantics/OpenMP/omp-default.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.1 default Clause
program omp_default
diff --git a/flang/test/Semantics/omp-default02.f90 b/flang/test/Semantics/OpenMP/omp-default02.f90
similarity index 96%
rename from flang/test/Semantics/omp-default02.f90
rename to flang/test/Semantics/OpenMP/omp-default02.f90
index f508d6acfba3e..23f994bcc3920 100644
--- a/flang/test/Semantics/omp-default02.f90
+++ b/flang/test/Semantics/OpenMP/omp-default02.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.1 default Clause - a positive test case.
diff --git a/flang/test/Semantics/omp-depend01.f90 b/flang/test/Semantics/OpenMP/omp-depend01.f90
similarity index 92%
rename from flang/test/Semantics/omp-depend01.f90
rename to flang/test/Semantics/OpenMP/omp-depend01.f90
index aedcb8b66eaaa..29468f4358855 100644
--- a/flang/test/Semantics/omp-depend01.f90
+++ b/flang/test/Semantics/OpenMP/omp-depend01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.13.9 Depend Clause
! List items used in depend clauses cannot be zero-length array sections.
diff --git a/flang/test/Semantics/omp-depend02.f90 b/flang/test/Semantics/OpenMP/omp-depend02.f90
similarity index 95%
rename from flang/test/Semantics/omp-depend02.f90
rename to flang/test/Semantics/OpenMP/omp-depend02.f90
index e00c8510f2544..76c02c8f9cbab 100644
--- a/flang/test/Semantics/omp-depend02.f90
+++ b/flang/test/Semantics/OpenMP/omp-depend02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.13.9 Depend Clause
! A variable that is part of another variable
diff --git a/flang/test/Semantics/omp-depend03.f90 b/flang/test/Semantics/OpenMP/omp-depend03.f90
similarity index 89%
rename from flang/test/Semantics/omp-depend03.f90
rename to flang/test/Semantics/OpenMP/omp-depend03.f90
index 9bca93a2a8a1b..e0eb683d252ef 100644
--- a/flang/test/Semantics/omp-depend03.f90
+++ b/flang/test/Semantics/OpenMP/omp-depend03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.13.9 Depend Clause
! Coarrays are not supported in depend clause
diff --git a/flang/test/Semantics/omp-device-constructs.f90 b/flang/test/Semantics/OpenMP/omp-device-constructs.f90
similarity index 99%
rename from flang/test/Semantics/omp-device-constructs.f90
rename to flang/test/Semantics/OpenMP/omp-device-constructs.f90
index 586cec6f8a94f..80f7902d35bb7 100644
--- a/flang/test/Semantics/omp-device-constructs.f90
+++ b/flang/test/Semantics/OpenMP/omp-device-constructs.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! Check OpenMP clause validity for the following directives:
! 2.10 Device constructs
program main
diff --git a/flang/test/Semantics/omp-do-collapse-positivecases.f90 b/flang/test/Semantics/OpenMP/omp-do-collapse-positivecases.f90
similarity index 94%
rename from flang/test/Semantics/omp-do-collapse-positivecases.f90
rename to flang/test/Semantics/OpenMP/omp-do-collapse-positivecases.f90
index fecd4d582640a..6ad14fa01bca0 100644
--- a/flang/test/Semantics/omp-do-collapse-positivecases.f90
+++ b/flang/test/Semantics/OpenMP/omp-do-collapse-positivecases.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.1 Collapse Clause Positive cases
diff --git a/flang/test/Semantics/omp-do-collapse.f90 b/flang/test/Semantics/OpenMP/omp-do-collapse.f90
similarity index 92%
rename from flang/test/Semantics/omp-do-collapse.f90
rename to flang/test/Semantics/OpenMP/omp-do-collapse.f90
index c7404e059489a..bc5412b3f9037 100644
--- a/flang/test/Semantics/omp-do-collapse.f90
+++ b/flang/test/Semantics/OpenMP/omp-do-collapse.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.1 Collapse Clause
program omp_doCollapse
diff --git a/flang/test/Semantics/omp-do-cycle.f90 b/flang/test/Semantics/OpenMP/omp-do-cycle.f90
similarity index 95%
rename from flang/test/Semantics/omp-do-cycle.f90
rename to flang/test/Semantics/OpenMP/omp-do-cycle.f90
index f01e10f73709a..b6617acb0794a 100644
--- a/flang/test/Semantics/omp-do-cycle.f90
+++ b/flang/test/Semantics/OpenMP/omp-do-cycle.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! Check for cycle statements leaving an OpenMP structured block
diff --git a/flang/test/Semantics/omp-do-ordered-positivecases.f90 b/flang/test/Semantics/OpenMP/omp-do-ordered-positivecases.f90
similarity index 96%
rename from flang/test/Semantics/omp-do-ordered-positivecases.f90
rename to flang/test/Semantics/OpenMP/omp-do-ordered-positivecases.f90
index 91a17215abc36..d4c4e5b1bf2f4 100644
--- a/flang/test/Semantics/omp-do-ordered-positivecases.f90
+++ b/flang/test/Semantics/OpenMP/omp-do-ordered-positivecases.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.1 Ordered Clause positive cases.
diff --git a/flang/test/Semantics/omp-do-ordered.f90 b/flang/test/Semantics/OpenMP/omp-do-ordered.f90
similarity index 97%
rename from flang/test/Semantics/omp-do-ordered.f90
rename to flang/test/Semantics/OpenMP/omp-do-ordered.f90
index f0cbd44ef0de1..79ded3e1b6fe6 100644
--- a/flang/test/Semantics/omp-do-ordered.f90
+++ b/flang/test/Semantics/OpenMP/omp-do-ordered.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.1 Ordered Clause
diff --git a/flang/test/Semantics/omp-do-schedule01.f90 b/flang/test/Semantics/OpenMP/omp-do-schedule01.f90
similarity index 85%
rename from flang/test/Semantics/omp-do-schedule01.f90
rename to flang/test/Semantics/OpenMP/omp-do-schedule01.f90
index 2c52f968eaef9..1e0a8a613135c 100644
--- a/flang/test/Semantics/omp-do-schedule01.f90
+++ b/flang/test/Semantics/OpenMP/omp-do-schedule01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.1 Schedule Clause
program omp_doSchedule
diff --git a/flang/test/Semantics/omp-do-schedule02.f90 b/flang/test/Semantics/OpenMP/omp-do-schedule02.f90
similarity index 87%
rename from flang/test/Semantics/omp-do-schedule02.f90
rename to flang/test/Semantics/OpenMP/omp-do-schedule02.f90
index 28f84d22e5eca..a7cbdc24e83a2 100644
--- a/flang/test/Semantics/omp-do-schedule02.f90
+++ b/flang/test/Semantics/OpenMP/omp-do-schedule02.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.1 Schedule Clause
program omp_doSchedule
diff --git a/flang/test/Semantics/omp-do-schedule03.f90 b/flang/test/Semantics/OpenMP/omp-do-schedule03.f90
similarity index 93%
rename from flang/test/Semantics/omp-do-schedule03.f90
rename to flang/test/Semantics/OpenMP/omp-do-schedule03.f90
index 4b5fb029c7ea0..65f35292af8f4 100644
--- a/flang/test/Semantics/omp-do-schedule03.f90
+++ b/flang/test/Semantics/OpenMP/omp-do-schedule03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Schedule Clause
! Test that does not catch non constant integer expressions like xx - xx.
diff --git a/flang/test/Semantics/omp-do-schedule04.f90 b/flang/test/Semantics/OpenMP/omp-do-schedule04.f90
similarity index 92%
rename from flang/test/Semantics/omp-do-schedule04.f90
rename to flang/test/Semantics/OpenMP/omp-do-schedule04.f90
index 05daa05fc1590..f36cb318fee52 100644
--- a/flang/test/Semantics/omp-do-schedule04.f90
+++ b/flang/test/Semantics/OpenMP/omp-do-schedule04.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Schedule Clause
! Test that does not catch non constant integer expressions like xx - yy.
diff --git a/flang/test/Semantics/omp-do01-positivecase.f90 b/flang/test/Semantics/OpenMP/omp-do01-positivecase.f90
similarity index 87%
rename from flang/test/Semantics/omp-do01-positivecase.f90
rename to flang/test/Semantics/OpenMP/omp-do01-positivecase.f90
index a810f93795959..8d19cc21ed4d0 100644
--- a/flang/test/Semantics/omp-do01-positivecase.f90
+++ b/flang/test/Semantics/OpenMP/omp-do01-positivecase.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct
! The loop iteration variable may not appear in a firstprivate directive.
diff --git a/flang/test/Semantics/omp-do01.f90 b/flang/test/Semantics/OpenMP/omp-do01.f90
similarity index 86%
rename from flang/test/Semantics/omp-do01.f90
rename to flang/test/Semantics/OpenMP/omp-do01.f90
index ee256c8a56861..78c3ba38bc873 100644
--- a/flang/test/Semantics/omp-do01.f90
+++ b/flang/test/Semantics/OpenMP/omp-do01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct
! The loop iteration variable may not appear in a firstprivate directive.
diff --git a/flang/test/Semantics/omp-do02.f90 b/flang/test/Semantics/OpenMP/omp-do02.f90
similarity index 100%
rename from flang/test/Semantics/omp-do02.f90
rename to flang/test/Semantics/OpenMP/omp-do02.f90
diff --git a/flang/test/Semantics/omp-do03.f90 b/flang/test/Semantics/OpenMP/omp-do03.f90
similarity index 86%
rename from flang/test/Semantics/omp-do03.f90
rename to flang/test/Semantics/OpenMP/omp-do03.f90
index f83cd7cb24ab6..7ec84a0a34245 100644
--- a/flang/test/Semantics/omp-do03.f90
+++ b/flang/test/Semantics/OpenMP/omp-do03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct
diff --git a/flang/test/Semantics/omp-do04-positivecase.f90 b/flang/test/Semantics/OpenMP/omp-do04-positivecase.f90
similarity index 90%
rename from flang/test/Semantics/omp-do04-positivecase.f90
rename to flang/test/Semantics/OpenMP/omp-do04-positivecase.f90
index 5a549a863afd1..56eb333955cda 100644
--- a/flang/test/Semantics/omp-do04-positivecase.f90
+++ b/flang/test/Semantics/OpenMP/omp-do04-positivecase.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Do Loop Constructs
diff --git a/flang/test/Semantics/omp-do04.f90 b/flang/test/Semantics/OpenMP/omp-do04.f90
similarity index 97%
rename from flang/test/Semantics/omp-do04.f90
rename to flang/test/Semantics/OpenMP/omp-do04.f90
index 8d327b4031c8d..6690f4927f6a9 100644
--- a/flang/test/Semantics/omp-do04.f90
+++ b/flang/test/Semantics/OpenMP/omp-do04.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct
! The loop iteration variable may not appear in a threadprivate directive.
diff --git a/flang/test/Semantics/omp-do05-positivecase.f90 b/flang/test/Semantics/OpenMP/omp-do05-positivecase.f90
similarity index 93%
rename from flang/test/Semantics/omp-do05-positivecase.f90
rename to flang/test/Semantics/OpenMP/omp-do05-positivecase.f90
index 9de1337cd4454..74ed8eb450c3f 100644
--- a/flang/test/Semantics/omp-do05-positivecase.f90
+++ b/flang/test/Semantics/OpenMP/omp-do05-positivecase.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct restrictions on single directive.
! A positive case
diff --git a/flang/test/Semantics/omp-do05.f90 b/flang/test/Semantics/OpenMP/omp-do05.f90
similarity index 99%
rename from flang/test/Semantics/omp-do05.f90
rename to flang/test/Semantics/OpenMP/omp-do05.f90
index 9e207a03da997..c0f240db57b65 100644
--- a/flang/test/Semantics/omp-do05.f90
+++ b/flang/test/Semantics/OpenMP/omp-do05.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct restrictions on single directive.
diff --git a/flang/test/Semantics/omp-do06-positivecases.f90 b/flang/test/Semantics/OpenMP/omp-do06-positivecases.f90
similarity index 91%
rename from flang/test/Semantics/omp-do06-positivecases.f90
rename to flang/test/Semantics/OpenMP/omp-do06-positivecases.f90
index 07057102df4ac..741412550cfe0 100644
--- a/flang/test/Semantics/omp-do06-positivecases.f90
+++ b/flang/test/Semantics/OpenMP/omp-do06-positivecases.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct
! The ordered clause must be present on the loop construct if any ordered
diff --git a/flang/test/Semantics/omp-do06.f90 b/flang/test/Semantics/OpenMP/omp-do06.f90
similarity index 94%
rename from flang/test/Semantics/omp-do06.f90
rename to flang/test/Semantics/OpenMP/omp-do06.f90
index 7902e688af30c..86790c2930e24 100644
--- a/flang/test/Semantics/omp-do06.f90
+++ b/flang/test/Semantics/OpenMP/omp-do06.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct
! The ordered clause must be present on the loop construct if any ordered
diff --git a/flang/test/Semantics/omp-do07.f90 b/flang/test/Semantics/OpenMP/omp-do07.f90
similarity index 100%
rename from flang/test/Semantics/omp-do07.f90
rename to flang/test/Semantics/OpenMP/omp-do07.f90
diff --git a/flang/test/Semantics/omp-do08.f90 b/flang/test/Semantics/OpenMP/omp-do08.f90
similarity index 98%
rename from flang/test/Semantics/omp-do08.f90
rename to flang/test/Semantics/OpenMP/omp-do08.f90
index f4d6f7d88c76a..3ba63072a80bd 100644
--- a/flang/test/Semantics/omp-do08.f90
+++ b/flang/test/Semantics/OpenMP/omp-do08.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct
diff --git a/flang/test/Semantics/omp-do09.f90 b/flang/test/Semantics/OpenMP/omp-do09.f90
similarity index 89%
rename from flang/test/Semantics/omp-do09.f90
rename to flang/test/Semantics/OpenMP/omp-do09.f90
index 75b1ddcea66b0..af9f2e294ace9 100644
--- a/flang/test/Semantics/omp-do09.f90
+++ b/flang/test/Semantics/OpenMP/omp-do09.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct
! The do-loop cannot be a DO WHILE or a DO loop without loop control.
diff --git a/flang/test/Semantics/omp-do10.f90 b/flang/test/Semantics/OpenMP/omp-do10.f90
similarity index 94%
rename from flang/test/Semantics/omp-do10.f90
rename to flang/test/Semantics/OpenMP/omp-do10.f90
index d14278c5075e8..7e8105e125a92 100644
--- a/flang/test/Semantics/omp-do10.f90
+++ b/flang/test/Semantics/OpenMP/omp-do10.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct
! The DO loop iteration variable must be of type integer.
diff --git a/flang/test/Semantics/omp-do11.f90 b/flang/test/Semantics/OpenMP/omp-do11.f90
similarity index 93%
rename from flang/test/Semantics/omp-do11.f90
rename to flang/test/Semantics/OpenMP/omp-do11.f90
index e9269939856b7..4993922691ff4 100644
--- a/flang/test/Semantics/omp-do11.f90
+++ b/flang/test/Semantics/OpenMP/omp-do11.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Do Loop Constructs
diff --git a/flang/test/Semantics/omp-do12.f90 b/flang/test/Semantics/OpenMP/omp-do12.f90
similarity index 97%
rename from flang/test/Semantics/omp-do12.f90
rename to flang/test/Semantics/OpenMP/omp-do12.f90
index 36ba685e50c91..cc8e53a16e97f 100644
--- a/flang/test/Semantics/omp-do12.f90
+++ b/flang/test/Semantics/OpenMP/omp-do12.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Do Loop constructs.
diff --git a/flang/test/Semantics/omp-do13.f90 b/flang/test/Semantics/OpenMP/omp-do13.f90
similarity index 98%
rename from flang/test/Semantics/omp-do13.f90
rename to flang/test/Semantics/OpenMP/omp-do13.f90
index 2168375e95762..6e9d1dddade4c 100644
--- a/flang/test/Semantics/omp-do13.f90
+++ b/flang/test/Semantics/OpenMP/omp-do13.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct
diff --git a/flang/test/Semantics/omp-do14.f90 b/flang/test/Semantics/OpenMP/omp-do14.f90
similarity index 97%
rename from flang/test/Semantics/omp-do14.f90
rename to flang/test/Semantics/OpenMP/omp-do14.f90
index 87e6f7207886f..dc3818a847ee6 100644
--- a/flang/test/Semantics/omp-do14.f90
+++ b/flang/test/Semantics/OpenMP/omp-do14.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Do Loop constructs.
diff --git a/flang/test/Semantics/omp-do15.f90 b/flang/test/Semantics/OpenMP/omp-do15.f90
similarity index 97%
rename from flang/test/Semantics/omp-do15.f90
rename to flang/test/Semantics/OpenMP/omp-do15.f90
index 10099d642720c..45c591e66361c 100644
--- a/flang/test/Semantics/omp-do15.f90
+++ b/flang/test/Semantics/OpenMP/omp-do15.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct
diff --git a/flang/test/Semantics/omp-do16.f90 b/flang/test/Semantics/OpenMP/omp-do16.f90
similarity index 96%
rename from flang/test/Semantics/omp-do16.f90
rename to flang/test/Semantics/OpenMP/omp-do16.f90
index f312ba61d23f3..15d13f683cf12 100644
--- a/flang/test/Semantics/omp-do16.f90
+++ b/flang/test/Semantics/OpenMP/omp-do16.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Loop Construct
diff --git a/flang/test/Semantics/omp-do17.f90 b/flang/test/Semantics/OpenMP/omp-do17.f90
similarity index 95%
rename from flang/test/Semantics/omp-do17.f90
rename to flang/test/Semantics/OpenMP/omp-do17.f90
index 0b1245e53f59a..8339ce0429483 100644
--- a/flang/test/Semantics/omp-do17.f90
+++ b/flang/test/Semantics/OpenMP/omp-do17.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.1 Do Loop constructs.
diff --git a/flang/test/Semantics/OpenMP/omp-do18.f90 b/flang/test/Semantics/OpenMP/omp-do18.f90
new file mode 100644
index 0000000000000..cdac323240eeb
--- /dev/null
+++ b/flang/test/Semantics/OpenMP/omp-do18.f90
@@ -0,0 +1,40 @@
+! RUN: %flang_fc1 -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s
+! RUN: %flang_fc1 -fopenmp -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s
+! CHECK-NOT: do *[1-9]
+
+program P
+implicit none
+integer OMP_GET_NUM_THREADS, OMP_GET_THREAD_NUM
+integer NUMTHRDS, TID
+integer N, CSZ, CNUM, I
+parameter (N=100)
+parameter (CSZ=10)
+real A(N), B(N), C(N)
+
+do 10 I = 1, N
+ A(I) = I * 1.0
+10 continue
+
+B = A
+CNUM = CSZ
+
+!$OMP PARALLEL SHARED(A,B,C,NUMTHRDS,CNUM) PRIVATE(I,TID)
+TID = OMP_GET_THREAD_NUM()
+if (TID .EQ. 0) then
+ NUMTHRDS = OMP_GET_NUM_THREADS()
+ print *, "Number of threads =", NUMTHRDS
+end if
+print *, "Thread", TID, " is starting..."
+
+!$OMP DO SCHEDULE(DYNAMIC,CNUM)
+do 20 I = 1, N
+ C(I) = A(I) + B(I)
+ write (*,100) TID, I, C(I)
+20 continue
+!$OMP END DO NOWAIT
+
+print *, "Thread", TID, " done."
+
+!$OMP END PARALLEL
+100 format(" Thread", I2, ": C(", I3, ")=", F8.2)
+end program P
diff --git a/flang/test/Semantics/OpenMP/omp-do19.f90 b/flang/test/Semantics/OpenMP/omp-do19.f90
new file mode 100644
index 0000000000000..3dab59d615e5e
--- /dev/null
+++ b/flang/test/Semantics/OpenMP/omp-do19.f90
@@ -0,0 +1,25 @@
+! RUN: %flang_fc1 -fopenmp -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s
+! CHECK-NOT: do *[1-9]
+! CHECK: omp simd
+
+program P
+implicit none
+integer N, I
+parameter (N=100)
+real A(N), B(N), C(N)
+
+!$OMP SIMD
+do 10 I = 1, N
+ A(I) = I * 1.0
+10 continue
+
+B = A
+
+!$OMP SIMD
+do 20 I = 1, N
+ C(I) = A(I) + B(I)
+ write (*,100) I, C(I)
+20 continue
+
+100 format(" C(", I3, ")=", F8.2)
+end program P
diff --git a/flang/test/Semantics/omp-firstprivate01.f90 b/flang/test/Semantics/OpenMP/omp-firstprivate01.f90
similarity index 97%
rename from flang/test/Semantics/omp-firstprivate01.f90
rename to flang/test/Semantics/OpenMP/omp-firstprivate01.f90
index 507d16706c6ca..09f7b62b96a50 100644
--- a/flang/test/Semantics/omp-firstprivate01.f90
+++ b/flang/test/Semantics/OpenMP/omp-firstprivate01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.4 firstprivate Clause
! Variables that appear in a firstprivate clause on a distribute or
diff --git a/flang/test/Semantics/omp-flush01.f90 b/flang/test/Semantics/OpenMP/omp-flush01.f90
similarity index 93%
rename from flang/test/Semantics/omp-flush01.f90
rename to flang/test/Semantics/OpenMP/omp-flush01.f90
index 1eb9680d8b047..27324de4a8f7a 100644
--- a/flang/test/Semantics/omp-flush01.f90
+++ b/flang/test/Semantics/OpenMP/omp-flush01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! 2.17.8 Flush construct [OpenMP 5.0]
! memory-order-clause ->
diff --git a/flang/test/Semantics/omp-flush02.f90 b/flang/test/Semantics/OpenMP/omp-flush02.f90
similarity index 98%
rename from flang/test/Semantics/omp-flush02.f90
rename to flang/test/Semantics/OpenMP/omp-flush02.f90
index a23f634a75a56..7700954b19061 100644
--- a/flang/test/Semantics/omp-flush02.f90
+++ b/flang/test/Semantics/OpenMP/omp-flush02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! Check OpenMP 5.0 - 2.17.8 flush Construct
! Restriction -
diff --git a/flang/test/Semantics/omp-invalid-branch.f90 b/flang/test/Semantics/OpenMP/omp-invalid-branch.f90
similarity index 100%
rename from flang/test/Semantics/omp-invalid-branch.f90
rename to flang/test/Semantics/OpenMP/omp-invalid-branch.f90
diff --git a/flang/test/Semantics/omp-lastprivate01.f90 b/flang/test/Semantics/OpenMP/omp-lastprivate01.f90
similarity index 94%
rename from flang/test/Semantics/omp-lastprivate01.f90
rename to flang/test/Semantics/OpenMP/omp-lastprivate01.f90
index 104155529dbad..acf91b81fb152 100644
--- a/flang/test/Semantics/omp-lastprivate01.f90
+++ b/flang/test/Semantics/OpenMP/omp-lastprivate01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.5 lastprivate Clause
! A variable that appears in a lastprivate clause must be definable.
diff --git a/flang/test/Semantics/omp-lastprivate02.f90 b/flang/test/Semantics/OpenMP/omp-lastprivate02.f90
similarity index 94%
rename from flang/test/Semantics/omp-lastprivate02.f90
rename to flang/test/Semantics/OpenMP/omp-lastprivate02.f90
index 61e2329565659..c5bf9d7f50d04 100644
--- a/flang/test/Semantics/omp-lastprivate02.f90
+++ b/flang/test/Semantics/OpenMP/omp-lastprivate02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.5 lastprivate Clause
! A list item that is private within a parallel region, or that appears in
diff --git a/flang/test/Semantics/omp-linear-iter.f90 b/flang/test/Semantics/OpenMP/omp-linear-iter.f90
similarity index 98%
rename from flang/test/Semantics/omp-linear-iter.f90
rename to flang/test/Semantics/OpenMP/omp-linear-iter.f90
index 73389d953889f..8102c1a03cd37 100644
--- a/flang/test/Semantics/omp-linear-iter.f90
+++ b/flang/test/Semantics/OpenMP/omp-linear-iter.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! Various checks with the ordered construct
diff --git a/flang/test/Semantics/omp-loop-association.f90 b/flang/test/Semantics/OpenMP/omp-loop-association.f90
similarity index 98%
rename from flang/test/Semantics/omp-loop-association.f90
rename to flang/test/Semantics/OpenMP/omp-loop-association.f90
index de7c9cbf0bc2f..8a28fd8878f49 100644
--- a/flang/test/Semantics/omp-loop-association.f90
+++ b/flang/test/Semantics/OpenMP/omp-loop-association.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! Check the association between OpenMPLoopConstruct and DoConstruct
diff --git a/flang/test/Semantics/omp-loop-simd01.f90 b/flang/test/Semantics/OpenMP/omp-loop-simd01.f90
similarity index 86%
rename from flang/test/Semantics/omp-loop-simd01.f90
rename to flang/test/Semantics/OpenMP/omp-loop-simd01.f90
index 0146a0193b127..18878645c0c6f 100644
--- a/flang/test/Semantics/omp-loop-simd01.f90
+++ b/flang/test/Semantics/OpenMP/omp-loop-simd01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.8.3 Loop simd Construct
diff --git a/flang/test/Semantics/OpenMP/omp-modfile-threadprivate.f90 b/flang/test/Semantics/OpenMP/omp-modfile-threadprivate.f90
new file mode 100644
index 0000000000000..74147c0494a54
--- /dev/null
+++ b/flang/test/Semantics/OpenMP/omp-modfile-threadprivate.f90
@@ -0,0 +1,35 @@
+! RUN: %python %S/../test_modfile.py %s %flang_fc1 -fopenmp
+! Check correct modfile generation for OpenMP threadprivate directive.
+
+module m
+ implicit none
+ type :: my_type(kind_param, len_param)
+ integer, KIND :: kind_param
+ integer, LEN :: len_param
+ integer :: t_i
+ integer :: t_arr(10)
+ end type
+ type(my_type(kind_param=2, len_param=4)) :: t
+ real, dimension(3) :: thrtest
+ real :: x
+ common /blk/ x
+
+ !$omp threadprivate(thrtest, t, /blk/)
+end
+
+!Expect: m.mod
+!module m
+!type::my_type(kind_param,len_param)
+!integer(4),kind::kind_param
+!integer(4),len::len_param
+!integer(4)::t_i
+!integer(4)::t_arr(1_8:10_8)
+!end type
+!type(my_type(kind_param=2_4,len_param=4_4))::t
+!!$omp threadprivate(t)
+!real(4)::thrtest(1_8:3_8)
+!!$omp threadprivate(thrtest)
+!real(4)::x
+!!$omp threadprivate(x)
+!common/blk/x
+!end
diff --git a/flang/test/Semantics/omp-nested-barrier.f90 b/flang/test/Semantics/OpenMP/omp-nested-barrier.f90
similarity index 98%
rename from flang/test/Semantics/omp-nested-barrier.f90
rename to flang/test/Semantics/OpenMP/omp-nested-barrier.f90
index 14bc36d5e91af..cad31d7985607 100644
--- a/flang/test/Semantics/omp-nested-barrier.f90
+++ b/flang/test/Semantics/OpenMP/omp-nested-barrier.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! Various checks with the nesting of BARRIER construct
diff --git a/flang/test/Semantics/omp-nested-cancel.f90 b/flang/test/Semantics/OpenMP/omp-nested-cancel.f90
similarity index 99%
rename from flang/test/Semantics/omp-nested-cancel.f90
rename to flang/test/Semantics/OpenMP/omp-nested-cancel.f90
index 97b3dd5fa8e90..afd94a591a067 100644
--- a/flang/test/Semantics/omp-nested-cancel.f90
+++ b/flang/test/Semantics/OpenMP/omp-nested-cancel.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 5.0
! Check OpenMP construct validity for the following directives:
diff --git a/flang/test/Semantics/omp-nested-cancellation-point.f90 b/flang/test/Semantics/OpenMP/omp-nested-cancellation-point.f90
similarity index 99%
rename from flang/test/Semantics/omp-nested-cancellation-point.f90
rename to flang/test/Semantics/OpenMP/omp-nested-cancellation-point.f90
index e339e8034e4b4..5392a31b23312 100644
--- a/flang/test/Semantics/omp-nested-cancellation-point.f90
+++ b/flang/test/Semantics/OpenMP/omp-nested-cancellation-point.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 5.0
! Check OpenMP construct validity for the following directives:
diff --git a/flang/test/Semantics/omp-nested-distribute.f90 b/flang/test/Semantics/OpenMP/omp-nested-distribute.f90
similarity index 97%
rename from flang/test/Semantics/omp-nested-distribute.f90
rename to flang/test/Semantics/OpenMP/omp-nested-distribute.f90
index 7baffdf07443e..5103790392897 100644
--- a/flang/test/Semantics/omp-nested-distribute.f90
+++ b/flang/test/Semantics/OpenMP/omp-nested-distribute.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! Check OpenMP clause validity for the following directives:
! 2.10 Device constructs
program main
diff --git a/flang/test/Semantics/omp-nested-master.f90 b/flang/test/Semantics/OpenMP/omp-nested-master.f90
similarity index 98%
rename from flang/test/Semantics/omp-nested-master.f90
rename to flang/test/Semantics/OpenMP/omp-nested-master.f90
index 0134674620ad4..ef7d2cef6f88a 100644
--- a/flang/test/Semantics/omp-nested-master.f90
+++ b/flang/test/Semantics/OpenMP/omp-nested-master.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! Various checks with the nesting of MASTER construct
diff --git a/flang/test/Semantics/omp-nested-simd.f90 b/flang/test/Semantics/OpenMP/omp-nested-simd.f90
similarity index 99%
rename from flang/test/Semantics/omp-nested-simd.f90
rename to flang/test/Semantics/OpenMP/omp-nested-simd.f90
index 33d519097c80d..4149b6d97e9dc 100644
--- a/flang/test/Semantics/omp-nested-simd.f90
+++ b/flang/test/Semantics/OpenMP/omp-nested-simd.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! Various checks with the nesting of SIMD construct
diff --git a/flang/test/Semantics/omp-nested-target.f90 b/flang/test/Semantics/OpenMP/omp-nested-target.f90
similarity index 95%
rename from flang/test/Semantics/omp-nested-target.f90
rename to flang/test/Semantics/OpenMP/omp-nested-target.f90
index ea061bddfe80a..f23cb035ae9fe 100644
--- a/flang/test/Semantics/omp-nested-target.f90
+++ b/flang/test/Semantics/OpenMP/omp-nested-target.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.0
! Check OpenMP construct validity for the following directives:
diff --git a/flang/test/Semantics/omp-nested-teams.f90 b/flang/test/Semantics/OpenMP/omp-nested-teams.f90
similarity index 98%
rename from flang/test/Semantics/omp-nested-teams.f90
rename to flang/test/Semantics/OpenMP/omp-nested-teams.f90
index 465ece4d2d92f..80c59e07fbaa6 100644
--- a/flang/test/Semantics/omp-nested-teams.f90
+++ b/flang/test/Semantics/OpenMP/omp-nested-teams.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 5.0
! Check OpenMP construct validity for the following directives:
diff --git a/flang/test/Semantics/omp-nested01.f90 b/flang/test/Semantics/OpenMP/omp-nested01.f90
similarity index 93%
rename from flang/test/Semantics/omp-nested01.f90
rename to flang/test/Semantics/OpenMP/omp-nested01.f90
index 602790c24b1fc..49c964ab86aa6 100644
--- a/flang/test/Semantics/omp-nested01.f90
+++ b/flang/test/Semantics/OpenMP/omp-nested01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! Check OpenMP 2.17 Nesting of Regions
diff --git a/flang/test/Semantics/omp-no-dowhile-in-parallel.f90 b/flang/test/Semantics/OpenMP/omp-no-dowhile-in-parallel.f90
similarity index 89%
rename from flang/test/Semantics/omp-no-dowhile-in-parallel.f90
rename to flang/test/Semantics/OpenMP/omp-no-dowhile-in-parallel.f90
index 2cab4a4082796..fb864fd32ef00 100644
--- a/flang/test/Semantics/omp-no-dowhile-in-parallel.f90
+++ b/flang/test/Semantics/OpenMP/omp-no-dowhile-in-parallel.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
subroutine bug48308(x,i)
real :: x(:)
diff --git a/flang/test/Semantics/omp-nontemporal.f90 b/flang/test/Semantics/OpenMP/omp-nontemporal.f90
similarity index 96%
rename from flang/test/Semantics/omp-nontemporal.f90
rename to flang/test/Semantics/OpenMP/omp-nontemporal.f90
index ea910bec048ca..6d24849575ee9 100644
--- a/flang/test/Semantics/omp-nontemporal.f90
+++ b/flang/test/Semantics/OpenMP/omp-nontemporal.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! REQUIRES: shell
! Check OpenMP clause validity for NONTEMPORAL clause
diff --git a/flang/test/Semantics/omp-ordered-simd.f90 b/flang/test/Semantics/OpenMP/omp-ordered-simd.f90
similarity index 98%
rename from flang/test/Semantics/omp-ordered-simd.f90
rename to flang/test/Semantics/OpenMP/omp-ordered-simd.f90
index a577572a57816..c33ec745f2dda 100644
--- a/flang/test/Semantics/omp-ordered-simd.f90
+++ b/flang/test/Semantics/OpenMP/omp-ordered-simd.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! Various checks with the ordered construct
diff --git a/flang/test/Semantics/omp-ordered01.f90 b/flang/test/Semantics/OpenMP/omp-ordered01.f90
similarity index 98%
rename from flang/test/Semantics/omp-ordered01.f90
rename to flang/test/Semantics/OpenMP/omp-ordered01.f90
index 948ad41de1a76..9433120fab10f 100644
--- a/flang/test/Semantics/omp-ordered01.f90
+++ b/flang/test/Semantics/OpenMP/omp-ordered01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.19.9 Ordered Construct
diff --git a/flang/test/Semantics/omp-ordered02.f90 b/flang/test/Semantics/OpenMP/omp-ordered02.f90
similarity index 98%
rename from flang/test/Semantics/omp-ordered02.f90
rename to flang/test/Semantics/OpenMP/omp-ordered02.f90
index 8b89912fb1457..ed320c82a9794 100644
--- a/flang/test/Semantics/omp-ordered02.f90
+++ b/flang/test/Semantics/OpenMP/omp-ordered02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.19.9 Ordered Construct
diff --git a/flang/test/Semantics/omp-ordered03.f90 b/flang/test/Semantics/OpenMP/omp-ordered03.f90
similarity index 98%
rename from flang/test/Semantics/omp-ordered03.f90
rename to flang/test/Semantics/OpenMP/omp-ordered03.f90
index 4d8b28cf43336..8dd4d035212d8 100644
--- a/flang/test/Semantics/omp-ordered03.f90
+++ b/flang/test/Semantics/OpenMP/omp-ordered03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.19.9 Ordered Construct
diff --git a/flang/test/Semantics/omp-parallel-private01.f90 b/flang/test/Semantics/OpenMP/omp-parallel-private01.f90
similarity index 90%
rename from flang/test/Semantics/omp-parallel-private01.f90
rename to flang/test/Semantics/OpenMP/omp-parallel-private01.f90
index 210c72f567e81..0f7ffcabda6bb 100644
--- a/flang/test/Semantics/omp-parallel-private01.f90
+++ b/flang/test/Semantics/OpenMP/omp-parallel-private01.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.3 parallel private Clause
program omp_parallel_private
diff --git a/flang/test/Semantics/omp-parallel-private02.f90 b/flang/test/Semantics/OpenMP/omp-parallel-private02.f90
similarity index 90%
rename from flang/test/Semantics/omp-parallel-private02.f90
rename to flang/test/Semantics/OpenMP/omp-parallel-private02.f90
index 3af35f77d14d4..b649db972548d 100644
--- a/flang/test/Semantics/omp-parallel-private02.f90
+++ b/flang/test/Semantics/OpenMP/omp-parallel-private02.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.3 parallel private Clause
program omp_parallel_private
diff --git a/flang/test/Semantics/omp-parallel-private03.f90 b/flang/test/Semantics/OpenMP/omp-parallel-private03.f90
similarity index 92%
rename from flang/test/Semantics/omp-parallel-private03.f90
rename to flang/test/Semantics/OpenMP/omp-parallel-private03.f90
index 5d2778150af19..1ec93e3e0dba8 100644
--- a/flang/test/Semantics/omp-parallel-private03.f90
+++ b/flang/test/Semantics/OpenMP/omp-parallel-private03.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.3 parallel private Clause
program omp_parallel_private
diff --git a/flang/test/Semantics/omp-parallel-private04.f90 b/flang/test/Semantics/OpenMP/omp-parallel-private04.f90
similarity index 92%
rename from flang/test/Semantics/omp-parallel-private04.f90
rename to flang/test/Semantics/OpenMP/omp-parallel-private04.f90
index a7516573392a0..dbab1564e40fd 100644
--- a/flang/test/Semantics/omp-parallel-private04.f90
+++ b/flang/test/Semantics/OpenMP/omp-parallel-private04.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.3 parallel private Clause
program omp_parallel_private
diff --git a/flang/test/Semantics/omp-parallel-sections01.f90 b/flang/test/Semantics/OpenMP/omp-parallel-sections01.f90
similarity index 98%
rename from flang/test/Semantics/omp-parallel-sections01.f90
rename to flang/test/Semantics/OpenMP/omp-parallel-sections01.f90
index b522a310e122f..c5bfbdfcb7b26 100644
--- a/flang/test/Semantics/omp-parallel-sections01.f90
+++ b/flang/test/Semantics/OpenMP/omp-parallel-sections01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP version 5.0.0
! 2.13.3 parallel sections Construct
! The restrictions for the parallel construct and the sections construct apply
diff --git a/flang/test/Semantics/omp-parallel-shared01.f90 b/flang/test/Semantics/OpenMP/omp-parallel-shared01.f90
similarity index 90%
rename from flang/test/Semantics/omp-parallel-shared01.f90
rename to flang/test/Semantics/OpenMP/omp-parallel-shared01.f90
index 9c3fb716697e3..d9ed9bc2efe2e 100644
--- a/flang/test/Semantics/omp-parallel-shared01.f90
+++ b/flang/test/Semantics/OpenMP/omp-parallel-shared01.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.2 parallel shared Clause
program omp_parallel_shared
diff --git a/flang/test/Semantics/omp-parallel-shared02.f90 b/flang/test/Semantics/OpenMP/omp-parallel-shared02.f90
similarity index 90%
rename from flang/test/Semantics/omp-parallel-shared02.f90
rename to flang/test/Semantics/OpenMP/omp-parallel-shared02.f90
index 273a6c876dfcb..f46cfa17ba38f 100644
--- a/flang/test/Semantics/omp-parallel-shared02.f90
+++ b/flang/test/Semantics/OpenMP/omp-parallel-shared02.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.2 parallel shared Clause
program omp_parallel_shared
diff --git a/flang/test/Semantics/omp-parallel-shared03.f90 b/flang/test/Semantics/OpenMP/omp-parallel-shared03.f90
similarity index 92%
rename from flang/test/Semantics/omp-parallel-shared03.f90
rename to flang/test/Semantics/OpenMP/omp-parallel-shared03.f90
index 9ff7b24d62c5f..801ffba424a7f 100644
--- a/flang/test/Semantics/omp-parallel-shared03.f90
+++ b/flang/test/Semantics/OpenMP/omp-parallel-shared03.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.2 parallel shared Clause
program omp_parallel_shared
diff --git a/flang/test/Semantics/omp-parallel-shared04.f90 b/flang/test/Semantics/OpenMP/omp-parallel-shared04.f90
similarity index 92%
rename from flang/test/Semantics/omp-parallel-shared04.f90
rename to flang/test/Semantics/OpenMP/omp-parallel-shared04.f90
index 1ddb758aa8abb..6f170c6a6ba7e 100644
--- a/flang/test/Semantics/omp-parallel-shared04.f90
+++ b/flang/test/Semantics/OpenMP/omp-parallel-shared04.f90
@@ -1,4 +1,4 @@
-!RUN: %python %S/test_errors.py %s %flang -fopenmp
+!RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.2 parallel shared Clause
program omp_parallel_shared
diff --git a/flang/test/Semantics/omp-parallel01.f90 b/flang/test/Semantics/OpenMP/omp-parallel01.f90
similarity index 100%
rename from flang/test/Semantics/omp-parallel01.f90
rename to flang/test/Semantics/OpenMP/omp-parallel01.f90
diff --git a/flang/test/Semantics/omp-parallel02.f90 b/flang/test/Semantics/OpenMP/omp-parallel02.f90
similarity index 100%
rename from flang/test/Semantics/omp-parallel02.f90
rename to flang/test/Semantics/OpenMP/omp-parallel02.f90
diff --git a/flang/test/Semantics/omp-private-is-pointer-check.f90 b/flang/test/Semantics/OpenMP/omp-private-is-pointer-check.f90
similarity index 100%
rename from flang/test/Semantics/omp-private-is-pointer-check.f90
rename to flang/test/Semantics/OpenMP/omp-private-is-pointer-check.f90
diff --git a/flang/test/Semantics/omp-private01.f90 b/flang/test/Semantics/OpenMP/omp-private01.f90
similarity index 88%
rename from flang/test/Semantics/omp-private01.f90
rename to flang/test/Semantics/OpenMP/omp-private01.f90
index e5cc4ba7bb395..052823a9f78a6 100644
--- a/flang/test/Semantics/omp-private01.f90
+++ b/flang/test/Semantics/OpenMP/omp-private01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.3 private Clause
! Pointers with the INTENT(IN) attribute may not appear in a private clause.
diff --git a/flang/test/Semantics/omp-private02.f90 b/flang/test/Semantics/OpenMP/omp-private02.f90
similarity index 94%
rename from flang/test/Semantics/omp-private02.f90
rename to flang/test/Semantics/OpenMP/omp-private02.f90
index fbc1da8ef92eb..a81e31998eebb 100644
--- a/flang/test/Semantics/omp-private02.f90
+++ b/flang/test/Semantics/OpenMP/omp-private02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.15.3.3 private Clause
! Variables that appear in namelist statements may not appear in a private clause.
diff --git a/flang/test/Semantics/omp-reduction01.f90 b/flang/test/Semantics/OpenMP/omp-reduction01.f90
similarity index 83%
rename from flang/test/Semantics/omp-reduction01.f90
rename to flang/test/Semantics/OpenMP/omp-reduction01.f90
index 85e866922e1cd..0e1a8a571c584 100644
--- a/flang/test/Semantics/omp-reduction01.f90
+++ b/flang/test/Semantics/OpenMP/omp-reduction01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.6 Reduction Clause
program omp_reduction
diff --git a/flang/test/Semantics/omp-reduction02.f90 b/flang/test/Semantics/OpenMP/omp-reduction02.f90
similarity index 94%
rename from flang/test/Semantics/omp-reduction02.f90
rename to flang/test/Semantics/OpenMP/omp-reduction02.f90
index 634381437a4e4..b96dd063d1084 100644
--- a/flang/test/Semantics/omp-reduction02.f90
+++ b/flang/test/Semantics/OpenMP/omp-reduction02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.6 Reduction Clause
program omp_reduction
diff --git a/flang/test/Semantics/omp-reduction03.f90 b/flang/test/Semantics/OpenMP/omp-reduction03.f90
similarity index 85%
rename from flang/test/Semantics/omp-reduction03.f90
rename to flang/test/Semantics/OpenMP/omp-reduction03.f90
index 77415790eccec..1ddc2903fecc4 100644
--- a/flang/test/Semantics/omp-reduction03.f90
+++ b/flang/test/Semantics/OpenMP/omp-reduction03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.6 Reduction Clause
diff --git a/flang/test/Semantics/omp-reduction04.f90 b/flang/test/Semantics/OpenMP/omp-reduction04.f90
similarity index 89%
rename from flang/test/Semantics/omp-reduction04.f90
rename to flang/test/Semantics/OpenMP/omp-reduction04.f90
index 0a8a306235857..eb9675252815b 100644
--- a/flang/test/Semantics/omp-reduction04.f90
+++ b/flang/test/Semantics/OpenMP/omp-reduction04.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.6 Reduction Clause
program omp_Reduction
diff --git a/flang/test/Semantics/omp-reduction05.f90 b/flang/test/Semantics/OpenMP/omp-reduction05.f90
similarity index 93%
rename from flang/test/Semantics/omp-reduction05.f90
rename to flang/test/Semantics/OpenMP/omp-reduction05.f90
index 22810608e91f9..aa115ed7454ba 100644
--- a/flang/test/Semantics/omp-reduction05.f90
+++ b/flang/test/Semantics/OpenMP/omp-reduction05.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.6 Reduction Clause
diff --git a/flang/test/Semantics/omp-reduction06.f90 b/flang/test/Semantics/OpenMP/omp-reduction06.f90
similarity index 93%
rename from flang/test/Semantics/omp-reduction06.f90
rename to flang/test/Semantics/OpenMP/omp-reduction06.f90
index 50b17362d0e97..58290c61cae86 100644
--- a/flang/test/Semantics/omp-reduction06.f90
+++ b/flang/test/Semantics/OpenMP/omp-reduction06.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.6 Reduction Clause
diff --git a/flang/test/Semantics/omp-reduction07.f90 b/flang/test/Semantics/OpenMP/omp-reduction07.f90
similarity index 98%
rename from flang/test/Semantics/omp-reduction07.f90
rename to flang/test/Semantics/OpenMP/omp-reduction07.f90
index 74178a9f39ccb..a9aaa0a925ca8 100644
--- a/flang/test/Semantics/omp-reduction07.f90
+++ b/flang/test/Semantics/OpenMP/omp-reduction07.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.6 Reduction Clause
program omp_reduction
diff --git a/flang/test/Semantics/omp-reduction08.f90 b/flang/test/Semantics/OpenMP/omp-reduction08.f90
similarity index 97%
rename from flang/test/Semantics/omp-reduction08.f90
rename to flang/test/Semantics/OpenMP/omp-reduction08.f90
index e46585a068b74..2fdc7f6d7cb5b 100644
--- a/flang/test/Semantics/omp-reduction08.f90
+++ b/flang/test/Semantics/OpenMP/omp-reduction08.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.6 Reduction Clause Positive cases
diff --git a/flang/test/Semantics/omp-reduction09.f90 b/flang/test/Semantics/OpenMP/omp-reduction09.f90
similarity index 97%
rename from flang/test/Semantics/omp-reduction09.f90
rename to flang/test/Semantics/OpenMP/omp-reduction09.f90
index e1ca4b0cfcebc..c8d4c448abf79 100644
--- a/flang/test/Semantics/omp-reduction09.f90
+++ b/flang/test/Semantics/OpenMP/omp-reduction09.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.6 Reduction Clause Positive cases.
!DEF: /omp_reduction MainProgram
diff --git a/flang/test/Semantics/omp-reduction10.f90 b/flang/test/Semantics/OpenMP/omp-reduction10.f90
similarity index 83%
rename from flang/test/Semantics/omp-reduction10.f90
rename to flang/test/Semantics/OpenMP/omp-reduction10.f90
index 96e0b50f81e86..0f94594408b88 100644
--- a/flang/test/Semantics/omp-reduction10.f90
+++ b/flang/test/Semantics/OpenMP/omp-reduction10.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.15.3.6 Reduction Clause
program omp_reduction
diff --git a/flang/test/Semantics/omp-resolve01.f90 b/flang/test/Semantics/OpenMP/omp-resolve01.f90
similarity index 86%
rename from flang/test/Semantics/omp-resolve01.f90
rename to flang/test/Semantics/OpenMP/omp-resolve01.f90
index b716c4a6853b2..79b67885b8b9c 100644
--- a/flang/test/Semantics/omp-resolve01.f90
+++ b/flang/test/Semantics/OpenMP/omp-resolve01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! 2.4 An array section designates a subset of the elements in an array. Although
! Substring shares similar syntax but cannot be treated as valid array section.
diff --git a/flang/test/Semantics/omp-resolve02.f90 b/flang/test/Semantics/OpenMP/omp-resolve02.f90
similarity index 88%
rename from flang/test/Semantics/omp-resolve02.f90
rename to flang/test/Semantics/OpenMP/omp-resolve02.f90
index 0bbf779ecde8f..7c3d6331c82ae 100644
--- a/flang/test/Semantics/omp-resolve02.f90
+++ b/flang/test/Semantics/OpenMP/omp-resolve02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! Test the effect to name resolution from illegal clause
diff --git a/flang/test/Semantics/omp-resolve03.f90 b/flang/test/Semantics/OpenMP/omp-resolve03.f90
similarity index 91%
rename from flang/test/Semantics/omp-resolve03.f90
rename to flang/test/Semantics/OpenMP/omp-resolve03.f90
index 58fc4d57d929f..b9306c4fe9cb4 100644
--- a/flang/test/Semantics/omp-resolve03.f90
+++ b/flang/test/Semantics/OpenMP/omp-resolve03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! 2.15.3 Although variables in common blocks can be accessed by use association
! or host association, common block names cannot. As a result, a common block
diff --git a/flang/test/Semantics/omp-resolve04.f90 b/flang/test/Semantics/OpenMP/omp-resolve04.f90
similarity index 89%
rename from flang/test/Semantics/omp-resolve04.f90
rename to flang/test/Semantics/OpenMP/omp-resolve04.f90
index 147dc1ae7b945..7c61950c57f66 100644
--- a/flang/test/Semantics/omp-resolve04.f90
+++ b/flang/test/Semantics/OpenMP/omp-resolve04.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! 2.15.3 Data-Sharing Attribute Clauses
! A list item that specifies a given variable may not appear in more than
diff --git a/flang/test/Semantics/omp-resolve05.f90 b/flang/test/Semantics/OpenMP/omp-resolve05.f90
similarity index 90%
rename from flang/test/Semantics/omp-resolve05.f90
rename to flang/test/Semantics/OpenMP/omp-resolve05.f90
index a54feaec981de..509e67becf295 100644
--- a/flang/test/Semantics/omp-resolve05.f90
+++ b/flang/test/Semantics/OpenMP/omp-resolve05.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! 2.15.3 Data-Sharing Attribute Clauses
! 2.15.3.1 default Clause
diff --git a/flang/test/Semantics/omp-resolve06.f90 b/flang/test/Semantics/OpenMP/omp-resolve06.f90
similarity index 97%
rename from flang/test/Semantics/omp-resolve06.f90
rename to flang/test/Semantics/OpenMP/omp-resolve06.f90
index 4711b000c44d1..1afc7408c0bc2 100644
--- a/flang/test/Semantics/omp-resolve06.f90
+++ b/flang/test/Semantics/OpenMP/omp-resolve06.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
use omp_lib
!2.11.4 Allocate Clause
!For any list item that is specified in the allocate
diff --git a/flang/test/Semantics/omp-sections01.f90 b/flang/test/Semantics/OpenMP/omp-sections01.f90
similarity index 86%
rename from flang/test/Semantics/omp-sections01.f90
rename to flang/test/Semantics/OpenMP/omp-sections01.f90
index 4ea75931d91ca..c26cc88dcc7af 100644
--- a/flang/test/Semantics/omp-sections01.f90
+++ b/flang/test/Semantics/OpenMP/omp-sections01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.2 sections Construct
diff --git a/flang/test/Semantics/omp-sections02.f90 b/flang/test/Semantics/OpenMP/omp-sections02.f90
similarity index 98%
rename from flang/test/Semantics/omp-sections02.f90
rename to flang/test/Semantics/OpenMP/omp-sections02.f90
index c1597804af6e5..bcdeb05e5a171 100644
--- a/flang/test/Semantics/omp-sections02.f90
+++ b/flang/test/Semantics/OpenMP/omp-sections02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP version 5.0.0
! 2.8.1 sections construct
! The code enclosed in a sections construct must be a structured block.
diff --git a/flang/test/Semantics/omp-sections03.f90 b/flang/test/Semantics/OpenMP/omp-sections03.f90
similarity index 94%
rename from flang/test/Semantics/omp-sections03.f90
rename to flang/test/Semantics/OpenMP/omp-sections03.f90
index 35c17118fe896..69775013ea823 100644
--- a/flang/test/Semantics/omp-sections03.f90
+++ b/flang/test/Semantics/OpenMP/omp-sections03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
!XFAIL: *
! OpenMP version 5.0.0
! 2.8.1 sections construct
diff --git a/flang/test/Semantics/omp-simd-aligned.f90 b/flang/test/Semantics/OpenMP/omp-simd-aligned.f90
similarity index 94%
rename from flang/test/Semantics/omp-simd-aligned.f90
rename to flang/test/Semantics/OpenMP/omp-simd-aligned.f90
index 3870e21c844c1..9b42118e2e1e4 100644
--- a/flang/test/Semantics/omp-simd-aligned.f90
+++ b/flang/test/Semantics/OpenMP/omp-simd-aligned.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.8.1 simd Construct
diff --git a/flang/test/Semantics/omp-simd-nontemporal.f90 b/flang/test/Semantics/OpenMP/omp-simd-nontemporal.f90
similarity index 96%
rename from flang/test/Semantics/omp-simd-nontemporal.f90
rename to flang/test/Semantics/OpenMP/omp-simd-nontemporal.f90
index a6b7123651a66..a488edd98cdc3 100644
--- a/flang/test/Semantics/omp-simd-nontemporal.f90
+++ b/flang/test/Semantics/OpenMP/omp-simd-nontemporal.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.8.1 simd Construct
diff --git a/flang/test/Semantics/omp-simd01.f90 b/flang/test/Semantics/OpenMP/omp-simd01.f90
similarity index 94%
rename from flang/test/Semantics/omp-simd01.f90
rename to flang/test/Semantics/OpenMP/omp-simd01.f90
index 4fa166b1d4b3e..1aa2880cda831 100644
--- a/flang/test/Semantics/omp-simd01.f90
+++ b/flang/test/Semantics/OpenMP/omp-simd01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 5.0
! 2.9.3.1 simd Construct
! - A program that branches into or out of a simd region is non-conforming.
diff --git a/flang/test/Semantics/omp-simd02.f90 b/flang/test/Semantics/OpenMP/omp-simd02.f90
similarity index 83%
rename from flang/test/Semantics/omp-simd02.f90
rename to flang/test/Semantics/OpenMP/omp-simd02.f90
index 0ac71c655b41a..a627e2ac2d67c 100644
--- a/flang/test/Semantics/omp-simd02.f90
+++ b/flang/test/Semantics/OpenMP/omp-simd02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.8.1 simd Construct
diff --git a/flang/test/Semantics/omp-simd03.f90 b/flang/test/Semantics/OpenMP/omp-simd03.f90
similarity index 100%
rename from flang/test/Semantics/omp-simd03.f90
rename to flang/test/Semantics/OpenMP/omp-simd03.f90
diff --git a/flang/test/Semantics/omp-single01.f90 b/flang/test/Semantics/OpenMP/omp-single01.f90
similarity index 85%
rename from flang/test/Semantics/omp-single01.f90
rename to flang/test/Semantics/OpenMP/omp-single01.f90
index a12940902904a..2e40bec56e9c2 100644
--- a/flang/test/Semantics/omp-single01.f90
+++ b/flang/test/Semantics/OpenMP/omp-single01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.3 single Construct
! Symbol present on multiple clauses
diff --git a/flang/test/Semantics/omp-single02.f90 b/flang/test/Semantics/OpenMP/omp-single02.f90
similarity index 86%
rename from flang/test/Semantics/omp-single02.f90
rename to flang/test/Semantics/OpenMP/omp-single02.f90
index cd80e7c2c74f5..03cf7fbb6ad38 100644
--- a/flang/test/Semantics/omp-single02.f90
+++ b/flang/test/Semantics/OpenMP/omp-single02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 4.5
! 2.7.3 single Construct
! Copyprivate variable is not thread private or private in outer context
diff --git a/flang/test/Semantics/omp-symbol01.f90 b/flang/test/Semantics/OpenMP/omp-symbol01.f90
similarity index 96%
rename from flang/test/Semantics/omp-symbol01.f90
rename to flang/test/Semantics/OpenMP/omp-symbol01.f90
index 06d5d7cbf8e9c..cff2ecb83d2ef 100644
--- a/flang/test/Semantics/omp-symbol01.f90
+++ b/flang/test/Semantics/OpenMP/omp-symbol01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! Test clauses that accept list.
! 2.1 Directive Format
diff --git a/flang/test/Semantics/omp-symbol02.f90 b/flang/test/Semantics/OpenMP/omp-symbol02.f90
similarity index 92%
rename from flang/test/Semantics/omp-symbol02.f90
rename to flang/test/Semantics/OpenMP/omp-symbol02.f90
index de3650565716f..d1c49983290bf 100644
--- a/flang/test/Semantics/omp-symbol02.f90
+++ b/flang/test/Semantics/OpenMP/omp-symbol02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! 1.4.1 Structure of the OpenMP Memory Model
diff --git a/flang/test/Semantics/omp-symbol03.f90 b/flang/test/Semantics/OpenMP/omp-symbol03.f90
similarity index 92%
rename from flang/test/Semantics/omp-symbol03.f90
rename to flang/test/Semantics/OpenMP/omp-symbol03.f90
index 4c37c5adce648..e6ba7ded79e7c 100644
--- a/flang/test/Semantics/omp-symbol03.f90
+++ b/flang/test/Semantics/OpenMP/omp-symbol03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! 1.4.1 Structure of the OpenMP Memory Model
! In the inner OpenMP region, SHARED `a` refers to the `a` in the outer OpenMP
diff --git a/flang/test/Semantics/omp-symbol04.f90 b/flang/test/Semantics/OpenMP/omp-symbol04.f90
similarity index 91%
rename from flang/test/Semantics/omp-symbol04.f90
rename to flang/test/Semantics/OpenMP/omp-symbol04.f90
index cf892a96932d3..d49524c188de6 100644
--- a/flang/test/Semantics/omp-symbol04.f90
+++ b/flang/test/Semantics/OpenMP/omp-symbol04.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! 2.15.3 Data-Sharing Attribute Clauses
! Both PARALLEL and DO (worksharing) directives need to create new scope,
diff --git a/flang/test/Semantics/omp-symbol05.f90 b/flang/test/Semantics/OpenMP/omp-symbol05.f90
similarity index 94%
rename from flang/test/Semantics/omp-symbol05.f90
rename to flang/test/Semantics/OpenMP/omp-symbol05.f90
index 72be56f99b4b7..a1c0e554b93b8 100644
--- a/flang/test/Semantics/omp-symbol05.f90
+++ b/flang/test/Semantics/OpenMP/omp-symbol05.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! 2.15.2 threadprivate Directive
! The threadprivate directive specifies that variables are replicated,
diff --git a/flang/test/Semantics/omp-symbol06.f90 b/flang/test/Semantics/OpenMP/omp-symbol06.f90
similarity index 90%
rename from flang/test/Semantics/omp-symbol06.f90
rename to flang/test/Semantics/OpenMP/omp-symbol06.f90
index 5b6621f8fdbb9..37d9243d10d48 100644
--- a/flang/test/Semantics/omp-symbol06.f90
+++ b/flang/test/Semantics/OpenMP/omp-symbol06.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! 2.15.3 Data-Sharing Attribute Clauses
! A list item that specifies a given variable may not appear in more than
diff --git a/flang/test/Semantics/omp-symbol07.f90 b/flang/test/Semantics/OpenMP/omp-symbol07.f90
similarity index 94%
rename from flang/test/Semantics/omp-symbol07.f90
rename to flang/test/Semantics/OpenMP/omp-symbol07.f90
index 0d88276ebb98c..ed44e13a42ea0 100644
--- a/flang/test/Semantics/omp-symbol07.f90
+++ b/flang/test/Semantics/OpenMP/omp-symbol07.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! Generic tests
! 1. subroutine or function calls should not be fixed for DSA or DMA
diff --git a/flang/test/Semantics/omp-symbol08.f90 b/flang/test/Semantics/OpenMP/omp-symbol08.f90
similarity index 99%
rename from flang/test/Semantics/omp-symbol08.f90
rename to flang/test/Semantics/OpenMP/omp-symbol08.f90
index 25b49ee070c3e..ab3988b9497d6 100644
--- a/flang/test/Semantics/omp-symbol08.f90
+++ b/flang/test/Semantics/OpenMP/omp-symbol08.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_symbols.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_symbols.py %s %flang_fc1 -fopenmp
! 2.15.1.1 Predetermined rules for associated do-loops index variable
! a) The loop iteration variable(s) in the associated do-loop(s) of a do,
diff --git a/flang/test/Semantics/omp-sync-critical01.f90 b/flang/test/Semantics/OpenMP/omp-sync-critical01.f90
similarity index 93%
rename from flang/test/Semantics/omp-sync-critical01.f90
rename to flang/test/Semantics/OpenMP/omp-sync-critical01.f90
index 7c80076c6fe2c..b597eb17ea226 100644
--- a/flang/test/Semantics/omp-sync-critical01.f90
+++ b/flang/test/Semantics/OpenMP/omp-sync-critical01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 5.0
! 2.17.1 critical construct
diff --git a/flang/test/Semantics/omp-sync-critical02.f90 b/flang/test/Semantics/OpenMP/omp-sync-critical02.f90
similarity index 96%
rename from flang/test/Semantics/omp-sync-critical02.f90
rename to flang/test/Semantics/OpenMP/omp-sync-critical02.f90
index cf78a3c136351..dac031f4f8fc3 100644
--- a/flang/test/Semantics/omp-sync-critical02.f90
+++ b/flang/test/Semantics/OpenMP/omp-sync-critical02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 5.0
! 2.17.1 critical construct
diff --git a/flang/test/Semantics/omp-task01.f90 b/flang/test/Semantics/OpenMP/omp-task01.f90
similarity index 100%
rename from flang/test/Semantics/omp-task01.f90
rename to flang/test/Semantics/OpenMP/omp-task01.f90
diff --git a/flang/test/Semantics/omp-taskgroup01.f90 b/flang/test/Semantics/OpenMP/omp-taskgroup01.f90
similarity index 94%
rename from flang/test/Semantics/omp-taskgroup01.f90
rename to flang/test/Semantics/OpenMP/omp-taskgroup01.f90
index c220c66287a5e..a2494129b580a 100644
--- a/flang/test/Semantics/omp-taskgroup01.f90
+++ b/flang/test/Semantics/OpenMP/omp-taskgroup01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
use omp_lib
implicit none
diff --git a/flang/test/Semantics/omp-taskloop-simd01.f90 b/flang/test/Semantics/OpenMP/omp-taskloop-simd01.f90
similarity index 82%
rename from flang/test/Semantics/omp-taskloop-simd01.f90
rename to flang/test/Semantics/OpenMP/omp-taskloop-simd01.f90
index e0ca7cfd8290d..bb7266a52f61e 100644
--- a/flang/test/Semantics/omp-taskloop-simd01.f90
+++ b/flang/test/Semantics/OpenMP/omp-taskloop-simd01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 5.0
! 2.10.3 taskloop simd Construct
diff --git a/flang/test/Semantics/omp-taskloop01.f90 b/flang/test/Semantics/OpenMP/omp-taskloop01.f90
similarity index 87%
rename from flang/test/Semantics/omp-taskloop01.f90
rename to flang/test/Semantics/OpenMP/omp-taskloop01.f90
index 14be62e475aaf..6bef584381518 100644
--- a/flang/test/Semantics/omp-taskloop01.f90
+++ b/flang/test/Semantics/OpenMP/omp-taskloop01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.9.2 taskloop Construct
diff --git a/flang/test/Semantics/omp-taskloop02.f90 b/flang/test/Semantics/OpenMP/omp-taskloop02.f90
similarity index 100%
rename from flang/test/Semantics/omp-taskloop02.f90
rename to flang/test/Semantics/OpenMP/omp-taskloop02.f90
diff --git a/flang/test/Semantics/omp-taskloop03.f90 b/flang/test/Semantics/OpenMP/omp-taskloop03.f90
similarity index 100%
rename from flang/test/Semantics/omp-taskloop03.f90
rename to flang/test/Semantics/OpenMP/omp-taskloop03.f90
diff --git a/flang/test/Semantics/omp-threadprivate01.f90 b/flang/test/Semantics/OpenMP/omp-threadprivate01.f90
similarity index 96%
rename from flang/test/Semantics/omp-threadprivate01.f90
rename to flang/test/Semantics/OpenMP/omp-threadprivate01.f90
index 95175f0dff545..309d209a45672 100644
--- a/flang/test/Semantics/omp-threadprivate01.f90
+++ b/flang/test/Semantics/OpenMP/omp-threadprivate01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.21.2 Threadprivate Directive
diff --git a/flang/test/Semantics/omp-threadprivate02.f90 b/flang/test/Semantics/OpenMP/omp-threadprivate02.f90
similarity index 97%
rename from flang/test/Semantics/omp-threadprivate02.f90
rename to flang/test/Semantics/OpenMP/omp-threadprivate02.f90
index 5978a8e832fe6..7f6e8dcc8e8ab 100644
--- a/flang/test/Semantics/omp-threadprivate02.f90
+++ b/flang/test/Semantics/OpenMP/omp-threadprivate02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.21.2 Threadprivate Directive
diff --git a/flang/test/Semantics/omp-threadprivate03.f90 b/flang/test/Semantics/OpenMP/omp-threadprivate03.f90
similarity index 91%
rename from flang/test/Semantics/omp-threadprivate03.f90
rename to flang/test/Semantics/OpenMP/omp-threadprivate03.f90
index 5a9e0dbaad987..d5ce4a9f8d79d 100644
--- a/flang/test/Semantics/omp-threadprivate03.f90
+++ b/flang/test/Semantics/OpenMP/omp-threadprivate03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.21.2 Threadprivate Directive
diff --git a/flang/test/Semantics/omp-threadprivate04.f90 b/flang/test/Semantics/OpenMP/omp-threadprivate04.f90
similarity index 95%
rename from flang/test/Semantics/omp-threadprivate04.f90
rename to flang/test/Semantics/OpenMP/omp-threadprivate04.f90
index 45684fcb2baa8..2612e9da31ff5 100644
--- a/flang/test/Semantics/omp-threadprivate04.f90
+++ b/flang/test/Semantics/OpenMP/omp-threadprivate04.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.21.2 Threadprivate Directive
diff --git a/flang/test/Semantics/omp-threadprivate05.f90 b/flang/test/Semantics/OpenMP/omp-threadprivate05.f90
similarity index 95%
rename from flang/test/Semantics/omp-threadprivate05.f90
rename to flang/test/Semantics/OpenMP/omp-threadprivate05.f90
index 610b6b25392f1..cdbf3701b70ae 100644
--- a/flang/test/Semantics/omp-threadprivate05.f90
+++ b/flang/test/Semantics/OpenMP/omp-threadprivate05.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp
! OpenMP Version 5.1
! Check OpenMP construct validity for the following directives:
! 2.21.2 Threadprivate Directive
diff --git a/flang/test/Semantics/omp-workshare01.f90 b/flang/test/Semantics/OpenMP/omp-workshare01.f90
similarity index 94%
rename from flang/test/Semantics/omp-workshare01.f90
rename to flang/test/Semantics/OpenMP/omp-workshare01.f90
index 52d65bb5b2909..9667a306061c0 100644
--- a/flang/test/Semantics/omp-workshare01.f90
+++ b/flang/test/Semantics/OpenMP/omp-workshare01.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.4 workshare Construct
! Invalid do construct inside !$omp workshare
diff --git a/flang/test/Semantics/omp-workshare02.f90 b/flang/test/Semantics/OpenMP/omp-workshare02.f90
similarity index 97%
rename from flang/test/Semantics/omp-workshare02.f90
rename to flang/test/Semantics/OpenMP/omp-workshare02.f90
index c53b323dcd8d1..e099ecb9f1e61 100644
--- a/flang/test/Semantics/omp-workshare02.f90
+++ b/flang/test/Semantics/OpenMP/omp-workshare02.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.4 workshare Construct
! The !omp workshare construct must not contain any user defined
diff --git a/flang/test/Semantics/omp-workshare03.f90 b/flang/test/Semantics/OpenMP/omp-workshare03.f90
similarity index 92%
rename from flang/test/Semantics/omp-workshare03.f90
rename to flang/test/Semantics/OpenMP/omp-workshare03.f90
index e8e2241580d77..09d46abf42eec 100644
--- a/flang/test/Semantics/omp-workshare03.f90
+++ b/flang/test/Semantics/OpenMP/omp-workshare03.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.4 workshare Construct
! All array assignments, scalar assignments, and masked array assignments
diff --git a/flang/test/Semantics/omp-workshare04.f90 b/flang/test/Semantics/OpenMP/omp-workshare04.f90
similarity index 96%
rename from flang/test/Semantics/omp-workshare04.f90
rename to flang/test/Semantics/OpenMP/omp-workshare04.f90
index 0c1e2b1f6221a..0ec635e52d2b7 100644
--- a/flang/test/Semantics/omp-workshare04.f90
+++ b/flang/test/Semantics/OpenMP/omp-workshare04.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.4 workshare Construct
! Checks for OpenMP Workshare construct
diff --git a/flang/test/Semantics/omp-workshare05.f90 b/flang/test/Semantics/OpenMP/omp-workshare05.f90
similarity index 95%
rename from flang/test/Semantics/omp-workshare05.f90
rename to flang/test/Semantics/OpenMP/omp-workshare05.f90
index 70a8426bba4e6..b57053e092e67 100644
--- a/flang/test/Semantics/omp-workshare05.f90
+++ b/flang/test/Semantics/OpenMP/omp-workshare05.f90
@@ -1,4 +1,4 @@
-! RUN: %python %S/test_errors.py %s %flang -fopenmp
+! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! OpenMP Version 4.5
! 2.7.4 workshare Construct
! Checks for OpenMP Parallel constructs enclosed in Workshare constructs
diff --git a/flang/test/Semantics/canondo05.f90 b/flang/test/Semantics/canondo05.f90
index cdac323240eeb..934f8a0d42d2e 100644
--- a/flang/test/Semantics/canondo05.f90
+++ b/flang/test/Semantics/canondo05.f90
@@ -1,40 +1,28 @@
-! RUN: %flang_fc1 -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s
-! RUN: %flang_fc1 -fopenmp -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s
-! CHECK-NOT: do *[1-9]
+! Check that if there is a label or a name on an label-do-stmt,
+! then it is not lost when rewriting it to an non-label-do-stmt.
-program P
-implicit none
-integer OMP_GET_NUM_THREADS, OMP_GET_THREAD_NUM
-integer NUMTHRDS, TID
-integer N, CSZ, CNUM, I
-parameter (N=100)
-parameter (CSZ=10)
-real A(N), B(N), C(N)
+! RUN: %flang_fc1 -fdebug-unparse-with-symbols -pedantic %s 2>&1 | FileCheck %s
-do 10 I = 1, N
- A(I) = I * 1.0
-10 continue
+! CHECK: end do
+! CHECK: 2 do
+! CHECK: mainloop: do
+! CHECK: end do mainloop
-B = A
-CNUM = CSZ
+! CHECK-NOT: do [1-9]
-!$OMP PARALLEL SHARED(A,B,C,NUMTHRDS,CNUM) PRIVATE(I,TID)
-TID = OMP_GET_THREAD_NUM()
-if (TID .EQ. 0) then
- NUMTHRDS = OMP_GET_NUM_THREADS()
- print *, "Number of threads =", NUMTHRDS
-end if
-print *, "Thread", TID, " is starting..."
+subroutine foo()
+ do 1 i=1,2
+ goto 2
+1 continue
+2 do 3 i=1,2
+3 continue
-!$OMP DO SCHEDULE(DYNAMIC,CNUM)
-do 20 I = 1, N
- C(I) = A(I) + B(I)
- write (*,100) TID, I, C(I)
-20 continue
-!$OMP END DO NOWAIT
-
-print *, "Thread", TID, " done."
-
-!$OMP END PARALLEL
-100 format(" Thread", I2, ": C(", I3, ")=", F8.2)
-end program P
+ mainloop : do 4 i=1,100
+ do j=1,20
+ if (j==i) then
+ ! cycle mainloop: TODO: fix invalid complaints that mainloop construct
+ ! is not in scope.
+ end if
+ end do
+4 end do mainloop
+end subroutine
diff --git a/flang/test/Semantics/canondo06.f90 b/flang/test/Semantics/canondo06.f90
index 3dab59d615e5e..15d9a3a286205 100644
--- a/flang/test/Semantics/canondo06.f90
+++ b/flang/test/Semantics/canondo06.f90
@@ -1,25 +1,28 @@
-! RUN: %flang_fc1 -fopenmp -fdebug-unparse-with-symbols %s 2>&1 | FileCheck %s
-! CHECK-NOT: do *[1-9]
-! CHECK: omp simd
+! Error test -- DO loop uses obsolete loop termination statement (warning)
+! See R1131 and C1133
-program P
-implicit none
-integer N, I
-parameter (N=100)
-real A(N), B(N), C(N)
+! By default, this is not an error and label do are rewritten to non-label do.
+! A warning is generated with -pedantic
-!$OMP SIMD
-do 10 I = 1, N
- A(I) = I * 1.0
-10 continue
+! RUN: %flang_fc1 -fdebug-unparse-with-symbols -pedantic %s 2>%t.stderr | FileCheck %s
-B = A
+! CHECK: end do
-!$OMP SIMD
-do 20 I = 1, N
- C(I) = A(I) + B(I)
- write (*,100) I, C(I)
-20 continue
+! The following CHECK-NOT actively uses the fact that the leading zero of labels
+! would be removed in the unparse but not the line linked to warnings. We do
+! not want to see label do in the unparse only.
+! CHECK-NOT: do [1-9]
-100 format(" C(", I3, ")=", F8.2)
-end program P
+! RUN: FileCheck --check-prefix=ERR --input-file=%t.stderr %s
+! ERR: A DO loop should terminate with an END DO or CONTINUE
+
+subroutine foo10()
+ real :: a(10, 10), b(10, 10) = 1.0
+ do 01 k=1,4
+ where (a<k)
+ a = a + b
+ b = a - b
+ elsewhere
+ a = a*2
+01 end where
+end subroutine
diff --git a/flang/test/Semantics/canondo18.f90 b/flang/test/Semantics/canondo18.f90
deleted file mode 100644
index 15d9a3a286205..0000000000000
--- a/flang/test/Semantics/canondo18.f90
+++ /dev/null
@@ -1,28 +0,0 @@
-! Error test -- DO loop uses obsolete loop termination statement (warning)
-! See R1131 and C1133
-
-! By default, this is not an error and label do are rewritten to non-label do.
-! A warning is generated with -pedantic
-
-! RUN: %flang_fc1 -fdebug-unparse-with-symbols -pedantic %s 2>%t.stderr | FileCheck %s
-
-! CHECK: end do
-
-! The following CHECK-NOT actively uses the fact that the leading zero of labels
-! would be removed in the unparse but not the line linked to warnings. We do
-! not want to see label do in the unparse only.
-! CHECK-NOT: do [1-9]
-
-! RUN: FileCheck --check-prefix=ERR --input-file=%t.stderr %s
-! ERR: A DO loop should terminate with an END DO or CONTINUE
-
-subroutine foo10()
- real :: a(10, 10), b(10, 10) = 1.0
- do 01 k=1,4
- where (a<k)
- a = a + b
- b = a - b
- elsewhere
- a = a*2
-01 end where
-end subroutine
diff --git a/flang/test/Semantics/canondo19.f90 b/flang/test/Semantics/canondo19.f90
deleted file mode 100644
index 934f8a0d42d2e..0000000000000
--- a/flang/test/Semantics/canondo19.f90
+++ /dev/null
@@ -1,28 +0,0 @@
-! Check that if there is a label or a name on an label-do-stmt,
-! then it is not lost when rewriting it to an non-label-do-stmt.
-
-! RUN: %flang_fc1 -fdebug-unparse-with-symbols -pedantic %s 2>&1 | FileCheck %s
-
-! CHECK: end do
-! CHECK: 2 do
-! CHECK: mainloop: do
-! CHECK: end do mainloop
-
-! CHECK-NOT: do [1-9]
-
-subroutine foo()
- do 1 i=1,2
- goto 2
-1 continue
-2 do 3 i=1,2
-3 continue
-
- mainloop : do 4 i=1,100
- do j=1,20
- if (j==i) then
- ! cycle mainloop: TODO: fix invalid complaints that mainloop construct
- ! is not in scope.
- end if
- end do
-4 end do mainloop
-end subroutine
diff --git a/flang/test/Semantics/modfile47.f90 b/flang/test/Semantics/modfile47.f90
index 4d268d8616855..030258098ff19 100644
--- a/flang/test/Semantics/modfile47.f90
+++ b/flang/test/Semantics/modfile47.f90
@@ -1,35 +1,19 @@
-! RUN: %python %S/test_modfile.py %s %flang_fc1 -fopenmp
-! Check correct modfile generation for OpenMP threadprivate directive.
-
-module m
- implicit none
- type :: my_type(kind_param, len_param)
- integer, KIND :: kind_param
- integer, LEN :: len_param
- integer :: t_i
- integer :: t_arr(10)
- end type
- type(my_type(kind_param=2, len_param=4)) :: t
- real, dimension(3) :: thrtest
- real :: x
- common /blk/ x
-
- !$omp threadprivate(thrtest, t, /blk/)
+! RUN: %python %S/test_errors.py %s %flang_fc1
+subroutine foo
+end
+subroutine iso_fortran_env
+end
+subroutine bad1
+ !ERROR: 'foo' is not a module
+ use foo
+end
+subroutine ok1
+ use, intrinsic :: iso_fortran_env
+end
+subroutine ok2
+ use iso_fortran_env
+end
+subroutine bad2
+ !ERROR: 'iso_fortran_env' is not a module
+ use, non_intrinsic :: iso_fortran_env
end
-
-!Expect: m.mod
-!module m
-!type::my_type(kind_param,len_param)
-!integer(4),kind::kind_param
-!integer(4),len::len_param
-!integer(4)::t_i
-!integer(4)::t_arr(1_8:10_8)
-!end type
-!type(my_type(kind_param=2_4,len_param=4_4))::t
-!!$omp threadprivate(t)
-!real(4)::thrtest(1_8:3_8)
-!!$omp threadprivate(thrtest)
-!real(4)::x
-!!$omp threadprivate(x)
-!common/blk/x
-!end
diff --git a/flang/test/Semantics/modfile49.f90 b/flang/test/Semantics/modfile49.f90
deleted file mode 100644
index 030258098ff19..0000000000000
--- a/flang/test/Semantics/modfile49.f90
+++ /dev/null
@@ -1,19 +0,0 @@
-! RUN: %python %S/test_errors.py %s %flang_fc1
-subroutine foo
-end
-subroutine iso_fortran_env
-end
-subroutine bad1
- !ERROR: 'foo' is not a module
- use foo
-end
-subroutine ok1
- use, intrinsic :: iso_fortran_env
-end
-subroutine ok2
- use iso_fortran_env
-end
-subroutine bad2
- !ERROR: 'iso_fortran_env' is not a module
- use, non_intrinsic :: iso_fortran_env
-end
More information about the flang-commits
mailing list