We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d71df82 commit 1d2f9acCopy full SHA for 1d2f9ac
flang/test/Lower/OpenMP/lastprivate-alloc-scope.f90
@@ -0,0 +1,22 @@
1
+! RUN: %flang_fc1 -fopenmp -emit-hlfir %s -o - | FileCheck %s
2
+
3
+program p
4
+ type y3; integer, allocatable :: x; end type
5
+ type(y3) :: v
6
+ integer :: s, n, i
7
+ s = 1; n = 10
8
+ allocate(v%x); v%x = 0
9
+!$omp parallel
10
+ if (.not. allocated(v%x)) print *, '101', allocated(v%x)
11
+!$omp do schedule(dynamic) lastprivate(v)
12
+ do i = s, n
13
+ v%x = i
14
+ end do
15
+!$omp end do
16
+!$omp end parallel
17
+end program
18
19
+! CHECK: omp.parallel {
20
+! CHECK-NOT: private(
21
+! CHECK: omp.wsloop
22
+! CHECK-SAME: private(
0 commit comments