File tree Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Expand file tree Collapse file tree 4 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -1674,7 +1674,6 @@ void OmpAttributeVisitor::ResolveSeqLoopIndexInParallelOrTaskConstruct(
1674
1674
// parallel or task
1675
1675
if (auto *symbol{ResolveOmp (iv, Symbol::Flag::OmpPrivate, targetIt->scope )}) {
1676
1676
targetIt++;
1677
- symbol->set (Symbol::Flag::OmpPreDetermined);
1678
1677
iv.symbol = symbol; // adjust the symbol within region
1679
1678
for (auto it{dirContext_.rbegin ()}; it != targetIt; ++it) {
1680
1679
AddToContextObjectWithDSA (*symbol, Symbol::Flag::OmpPrivate, *it);
Original file line number Diff line number Diff line change @@ -537,16 +537,21 @@ subroutine nested_constructs
537
537
538
538
integer :: y, z
539
539
! CHECK: omp.parallel {
540
- ! CHECK: %[[INNER_J:.*]] = fir.alloca i32 {bindc_name = "j", pinned}
541
- ! CHECK: %[[INNER_J_DECL:.*]]:2 = hlfir.declare %[[INNER_J]] {{.*}}
542
- ! CHECK: %[[INNER_I:.*]] = fir.alloca i32 {bindc_name = "i", pinned}
543
- ! CHECK: %[[INNER_I_DECL:.*]]:2 = hlfir.declare %[[INNER_I]] {{.*}}
540
+
544
541
! CHECK: %[[INNER_Y:.*]] = fir.alloca i32 {bindc_name = "y", pinned, uniq_name = "_QFnested_constructsEy"}
545
542
! CHECK: %[[INNER_Y_DECL:.*]]:2 = hlfir.declare %[[INNER_Y]] {{.*}}
546
543
! CHECK: %[[TEMP:.*]] = fir.load %[[Y_DECL]]#0 : !fir.ref<i32>
547
544
! CHECK: hlfir.assign %[[TEMP]] to %[[INNER_Y_DECL]]#0 temporary_lhs : i32, !fir.ref<i32>
545
+
546
+ ! CHECK: %[[INNER_I:.*]] = fir.alloca i32 {bindc_name = "i", pinned, uniq_name
547
+ ! CHECK: %[[INNER_I_DECL:.*]]:2 = hlfir.declare %[[INNER_I]] {{.*}}
548
+
549
+ ! CHECK: %[[INNER_J:.*]] = fir.alloca i32 {bindc_name = "j", pinned, uniq_name
550
+ ! CHECK: %[[INNER_J_DECL:.*]]:2 = hlfir.declare %[[INNER_J]] {{.*}}
551
+
548
552
! CHECK: %[[INNER_Z:.*]] = fir.alloca i32 {bindc_name = "z", pinned, uniq_name = "_QFnested_constructsEz"}
549
553
! CHECK: %[[INNER_Z_DECL:.*]]:2 = hlfir.declare %[[INNER_Z]] {{.*}}
554
+
550
555
! $omp parallel default(private) firstprivate(y)
551
556
! CHECK: {{.*}} = fir.do_loop {{.*}} {
552
557
do i = 1 , 10
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ program omp_do
9
9
! DEF: /omp_do/n ObjectEntity INTEGER(4)
10
10
integer i,n
11
11
! $omp parallel
12
- ! DEF: /omp_do/OtherConstruct1/i (OmpPrivate, OmpPreDetermined ) HostAssoc INTEGER(4)
12
+ ! DEF: /omp_do/OtherConstruct1/i (OmpPrivate) HostAssoc INTEGER(4)
13
13
do i= 1 ,10
14
14
! $omp single
15
15
print * , " hello"
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ subroutine test_do
37
37
do j= 6 ,10
38
38
! REF: /test_do/a
39
39
a(1 ,1 ,1 ) = 0 .
40
- ! DEF: /test_do/OtherConstruct1/k (OmpPrivate, OmpPreDetermined ) HostAssoc INTEGER(4)
40
+ ! DEF: /test_do/OtherConstruct1/k (OmpPrivate) HostAssoc INTEGER(4)
41
41
do k= 11 ,15
42
42
! REF: /test_do/a
43
43
! REF: /test_do/OtherConstruct1/k
@@ -170,9 +170,9 @@ subroutine test_simd
170
170
! $omp parallel do simd
171
171
! DEF: /test_simd/OtherConstruct1/i (OmpLinear, OmpPreDetermined) HostAssoc INTEGER(4)
172
172
do i= 1 ,5
173
- ! DEF: /test_simd/OtherConstruct1/j (OmpPrivate, OmpPreDetermined ) HostAssoc INTEGER(4)
173
+ ! DEF: /test_simd/OtherConstruct1/j (OmpPrivate) HostAssoc INTEGER(4)
174
174
do j= 6 ,10
175
- ! DEF: /test_simd/OtherConstruct1/k (OmpPrivate, OmpPreDetermined ) HostAssoc INTEGER(4)
175
+ ! DEF: /test_simd/OtherConstruct1/k (OmpPrivate) HostAssoc INTEGER(4)
176
176
do k= 11 ,15
177
177
! REF: /test_simd/a
178
178
! REF: /test_simd/OtherConstruct1/k
@@ -228,7 +228,7 @@ subroutine test_seq_loop
228
228
print * , i, j
229
229
! $omp parallel
230
230
! REF: /test_seq_loop/i
231
- ! DEF: /test_seq_loop/OtherConstruct1/OtherConstruct1/j (OmpPrivate, OmpPreDetermined ) HostAssoc INTEGER(4)
231
+ ! DEF: /test_seq_loop/OtherConstruct1/OtherConstruct1/j (OmpPrivate) HostAssoc INTEGER(4)
232
232
print * , i, j
233
233
! $omp do
234
234
! DEF: /test_seq_loop/OtherConstruct1/OtherConstruct1/OtherConstruct1/i (OmpPrivate, OmpPreDetermined) HostAssoc INTEGER(4)
You can’t perform that action at this time.
0 commit comments