xref: /llvm-project/flang/test/Semantics/OpenMP/reduction11.f90 (revision 502bea25bdc07d1811b8bfea1c2e6bfa8617f72f)
1! RUN: %flang_fc1 -fopenmp -fdebug-dump-symbols -o - %s 2>&1 | FileCheck %s
2! Check intrinsic reduction symbols (in this case "max" are marked as INTRINSIC
3
4! CHECK: MainProgram scope: omp_reduction
5program omp_reduction
6  ! CHECK: i size=4 offset=0: ObjectEntity type: INTEGER(4)
7  integer i
8  ! CHECK: k size=4 offset=4: ObjectEntity type: INTEGER(4) init:10_4
9  integer :: k = 10
10  ! CHECK: m size=4 offset=8: ObjectEntity type: INTEGER(4) init:12_4
11  integer :: m = 12
12
13  ! CHECK: OtherConstruct scope
14  ! CHECK: i (OmpPrivate, OmpPreDetermined): HostAssoc
15  ! CHECK: k (OmpReduction): HostAssoc
16  ! CHECK: max, INTRINSIC: ProcEntity
17  !$omp parallel do  reduction(max:k)
18  do i=1,10
19    k = i
20  end do
21  !$omp end parallel do
22end program omp_reduction
23