49 lines · plain
1! RUN: %flang_fc1 -fdebug-dump-symbols -fopenmp -fopenmp-version=50 %s | FileCheck %s2 3!CHECK-LABEL: Subprogram scope: initme4subroutine initme(x,n)5 integer x,n6 x=n7end subroutine initme8 9!CHECK-LABEL: Subprogram scope: func10function func(x, n, init)11 integer func12 integer x(n)13 integer res14 interface15 subroutine initme(x,n)16 integer x,n17 end subroutine initme18 end interface19 !$omp declare reduction(red_add:integer(4):omp_out=omp_out+omp_in) initializer(initme(omp_priv,0))20!CHECK: red_add: UserReductionDetails21!CHECK: Subprogram scope: initme22!CHECK: OtherConstruct scope:23!CHECK: omp_in size=4 offset=0: ObjectEntity type: INTEGER(4)24!CHECK: omp_out size=4 offset=4: ObjectEntity type: INTEGER(4)25!CHECK: OtherConstruct scope:26!CHECK: omp_orig size=4 offset=0: ObjectEntity type: INTEGER(4)27!CHECK: omp_priv size=4 offset=4: ObjectEntity type: INTEGER(4)28!$omp simd reduction(red_add:res)29 do i=1,n30 res=res+x(i)31 enddo32 func=res33end function func34 35program main36!CHECK-LABEL: MainProgram scope: MAIN37 38 !$omp declare reduction (my_add_red : integer : omp_out = omp_out + omp_in) initializer (omp_priv=0)39 40!CHECK: my_add_red: UserReductionDetails41!CHECK: OtherConstruct scope:42!CHECK: omp_in size=4 offset=0: ObjectEntity type: INTEGER(4)43!CHECK: omp_out size=4 offset=4: ObjectEntity type: INTEGER(4)44!CHECK: OtherConstruct scope:45!CHECK: omp_orig size=4 offset=0: ObjectEntity type: INTEGER(4)46!CHECK: omp_priv size=4 offset=4: ObjectEntity type: INTEGER(4)47 48end program main49