Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions flang/test/Lower/OpenMP/lastprivate-alloc-scope.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
! RUN: %flang_fc1 -fopenmp -emit-hlfir %s -o - | FileCheck %s

program p
type y3; integer, allocatable :: x; end type
type(y3) :: v
integer :: s, n, i
s = 1; n = 10
allocate(v%x); v%x = 0
!$omp parallel
if (.not. allocated(v%x)) print *, '101', allocated(v%x)
!$omp do schedule(dynamic) lastprivate(v)
do i = s, n
v%x = i
end do
!$omp end do
!$omp end parallel
end program

! CHECK: omp.parallel {
! CHECK-NOT: private(
! CHECK: omp.wsloop
! CHECK-SAME: private(