[flang-commits] [flang] 9da7c3b - [Flang][OpenMP][NFC] Add tests for align and allocator in allocate clauses (#121356)

via flang-commits flang-commits at lists.llvm.org
Mon Jan 20 08:04:27 PST 2025


Author: Mats Petersson
Date: 2025-01-20T16:04:23Z
New Revision: 9da7c3ba17681a875d743a6709f3f56324ee6042

URL: https://github.com/llvm/llvm-project/commit/9da7c3ba17681a875d743a6709f3f56324ee6042
DIFF: https://github.com/llvm/llvm-project/commit/9da7c3ba17681a875d743a6709f3f56324ee6042.diff

LOG: [Flang][OpenMP][NFC] Add tests for align and allocator in allocate clauses (#121356)

No functional change.

(Also, tried to filter out all ALLOCATOR modifiers, but that makes some
other tests fail).

Added: 
    flang/test/Lower/OpenMP/Todo/allocate-clause-align.f90
    flang/test/Lower/OpenMP/Todo/allocate-clause-allocator.f90

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/flang/test/Lower/OpenMP/Todo/allocate-clause-align.f90 b/flang/test/Lower/OpenMP/Todo/allocate-clause-align.f90
new file mode 100644
index 00000000000000..b272d2e76d70ce
--- /dev/null
+++ b/flang/test/Lower/OpenMP/Todo/allocate-clause-align.f90
@@ -0,0 +1,13 @@
+! RUN: %not_todo_cmd %flang_fc1 -emit-fir -fopenmp -fopenmp-version=51 -o - %s 2>&1 | FileCheck %s
+
+! CHECK: not yet implemented: OmpAllocateClause ALIGN modifier
+program p
+  integer :: x
+  integer :: a
+  integer :: i
+  !$omp parallel private(x) allocate(align(4): x)
+  do i=1,10
+     a = a + i
+  end do
+  !$omp end parallel
+end program p

diff  --git a/flang/test/Lower/OpenMP/Todo/allocate-clause-allocator.f90 b/flang/test/Lower/OpenMP/Todo/allocate-clause-allocator.f90
new file mode 100644
index 00000000000000..d33bdf9f9a8db2
--- /dev/null
+++ b/flang/test/Lower/OpenMP/Todo/allocate-clause-allocator.f90
@@ -0,0 +1,16 @@
+! REQUIRES: openmp_runtime
+! RUN: %not_todo_cmd %flang_fc1 -emit-llvm -fopenmp -fopenmp-version=51 -o - %s 2>&1 | FileCheck %s
+
+! CHECK: not yet implemented: Unhandled clause allocate in omp.parallel
+! CHECK: LLVM Translation failed for operation: omp.parallel
+program p
+  use omp_lib
+  integer :: x
+  integer :: a
+  integer :: i
+  !$omp parallel private(x) allocate(allocator(omp_default_mem_alloc): x)
+  do i=1,10
+     a = a + i
+  end do
+  !$omp end parallel
+end program p


        


More information about the flang-commits mailing list