Debian Codegraph @

flang/test/Lower/OpenMP/allocatable-multiple-vars.f90

raw
1 ! Test early privatization for multiple allocatable variables.
2
3 ! RUN: %flang_fc1 -emit-hlfir -fopenmp -mmlir --openmp-enable-delayed-privatization=false \
4 ! RUN: -o - %s 2>&1 | FileCheck %s
5
6 ! RUN: bbc -emit-hlfir -fopenmp --openmp-enable-delayed-privatization=false -o - %s 2>&1 |\
7 ! RUN: FileCheck %s
8
9 subroutine delayed_privatization_allocatable
10 implicit none
11 integer, allocatable :: var1, var2
12
13 !$omp parallel private(var1, var2)
14 var1 = 10
15 var2 = 20
16 !$omp end parallel
17 end subroutine
18
19 ! Verify that private versions of each variable are both allocated and freed
20 ! within the parallel region.
21
22 ! CHECK: omp.parallel {
23 ! CHECK: fir.allocmem
24 ! CHECK: fir.allocmem
25 ! CHECK: fir.freemem
26 ! CHECK: fir.freemem
27 ! CHECK: omp.terminator
28 ! CHECK-NEXT: }