48 lines · plain
1!RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=602 3module m004implicit none5integer :: x = 16!ERROR: GROUPPRIVATE argument cannot be declared with an initializer7!$omp groupprivate(x)8!ERROR: GROUPPRIVATE argument should be a variable or a named common block9!$omp groupprivate(f00)10 11contains12subroutine f0013 implicit none14 integer, save :: y15 associate (z => y)16 block17 !ERROR: GROUPPRIVATE argument cannot be an ASSOCIATE name18 !$omp groupprivate(z)19 end block20 end associate21end22end module23 24module m0125implicit none26integer :: x, y27common /some_block/ x28!ERROR: GROUPPRIVATE argument cannot be a member of a common block29!$omp groupprivate(x)30 31contains32subroutine f0133 implicit none34 integer :: z35 !ERROR: GROUPPRIVATE argument variable must be declared in the same scope as the construct on which it appears36 !$omp groupprivate(y)37 !ERROR: GROUPPRIVATE argument variable must be declared in the module scope or have SAVE attribute38 !$omp groupprivate(z)39end40end module41 42module m0243implicit none44integer :: x(10)[*]45!ERROR: GROUPPRIVATE argument cannot be a coarray46!$omp groupprivate(x)47end module48