35 lines · plain
1!RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -fopenmp-version=502 3!Ref: [5.0:297:28-29]4! If a list item is an array section or an array element, its base expression5! must be a base language identifier.6 7module m8 type t9 integer :: a(10)10 end type11 12contains13 14 subroutine f0015 type(t) :: x16 !ERROR: A variable that is part of another variable cannot appear on the REDUCTION clause17 !ERROR: The base expression of an array element or section in REDUCTION clause must be an identifier18 !$omp do reduction (+ : x%a(2))19 do i = 1, 1020 end do21 !$omp end do22 end subroutine23 24 subroutine f0125 type(t) :: x26 !ERROR: A variable that is part of another variable cannot appear on the REDUCTION clause27 !ERROR: The base expression of an array element or section in REDUCTION clause must be an identifier28 !$omp do reduction (+ : x%a(1:10))29 do i = 1, 1030 end do31 !$omp end do32 end subroutine33end34 35