Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/scope-6.f90

raw
1 ! { dg-additional-options "-fdump-tree-original" }
2
3 module m
4 use iso_c_binding
5 !use omp_lib, only: omp_allocator_handle_kind
6 implicit none
7 integer, parameter :: omp_allocator_handle_kind = c_intptr_t
8 integer :: a = 0, b = 42, c = 0
9
10 contains
11 subroutine foo (h)
12 integer(omp_allocator_handle_kind), value :: h
13 !$omp scope private (a) firstprivate (b) reduction (+: c) allocate ( h : a , b , c)
14 if (b /= 42) &
15 error stop
16 a = 36
17 b = 15
18 c = c + 1
19 !$omp end scope
20 end
21 end
22
23 ! { dg-final { scan-tree-dump "omp scope private\\(a\\) firstprivate\\(b\\) reduction\\(\\+:c\\) allocate\\(allocator\\(D\\.\[0-9\]+\\):a\\) allocate\\(allocator\\(D\\.\[0-9\]+\\):b\\) allocate\\(allocator\\(D\\.\[0-9\]+\\):c\\)" "original" } }