File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
flang/test/Semantics/OpenMP Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ ! RUN: %flang_fc1 -fopenmp -fopenmp-version=51 -Wno-experimental-option -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty
2+ ! CHECK-NOT: error:
3+ ! CHECK-NOT: warning:
4+
5+ ! Regression test for issue #162033.
6+ ! Verify that a named COMMON block can appear in a data-sharing clause together
7+ ! with one of its members in another clause on the same construct. This is valid
8+ ! in OpenMP >= 5.1 because:
9+ ! - A named COMMON in a clause is equivalent to listing all its explicit members
10+ ! - A list item may appear in both FIRSTPRIVATE and LASTPRIVATE on the same directive
11+ ! OpenMP 5.0 explicitly forbade this combination.
12+
13+ subroutine sub1 ()
14+ common / com/ j
15+ j = 10
16+ ! $omp parallel do firstprivate(j) lastprivate(/com/)
17+ do i = 1 , 10
18+ j = j + 1
19+ end do
20+ ! $omp end parallel do
21+ end
You can’t perform that action at this time.
0 commit comments