21 lines · plain
1! RUN: %flang_fc1 -fopenmp -fopenmp-version=51 -fsyntax-only %s 2>&1 | FileCheck %s --allow-empty2! CHECK-NOT: error:3 4! Regression test for issue #162033.5! Verify that a named COMMON block can appear in a data-sharing clause together6! with one of its members in another clause on the same construct. This is valid7! in OpenMP >= 5.1 because:8! - A named COMMON in a clause is equivalent to listing all its explicit members9! - A list item may appear in both FIRSTPRIVATE and LASTPRIVATE on the same directive10! OpenMP 5.0 explicitly forbade this combination.11 12subroutine sub1()13 common /com/ j14 j = 1015!$omp parallel do firstprivate(j) lastprivate(/com/)16 do i = 1, 1017 j = j + 118 end do19!$omp end parallel do20end21