Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/allocate-static-2.f90

raw
1 module omp_lib_kinds
2 use iso_c_binding, only: c_int, c_intptr_t
3 implicit none
4 private :: c_int, c_intptr_t
5 integer, parameter :: omp_allocator_handle_kind = c_intptr_t
6
7 integer (kind=omp_allocator_handle_kind), &
8 parameter :: omp_null_allocator = 0
9 integer (kind=omp_allocator_handle_kind), &
10 parameter :: omp_default_mem_alloc = 1
11 integer (kind=omp_allocator_handle_kind), &
12 parameter :: omp_large_cap_mem_alloc = 2
13 integer (kind=omp_allocator_handle_kind), &
14 parameter :: omp_const_mem_alloc = 3
15 integer (kind=omp_allocator_handle_kind), &
16 parameter :: omp_high_bw_mem_alloc = 4
17 integer (kind=omp_allocator_handle_kind), &
18 parameter :: omp_low_lat_mem_alloc = 5
19 integer (kind=omp_allocator_handle_kind), &
20 parameter :: omp_cgroup_mem_alloc = 6
21 integer (kind=omp_allocator_handle_kind), &
22 parameter :: omp_pteam_mem_alloc = 7
23 integer (kind=omp_allocator_handle_kind), &
24 parameter :: omp_thread_mem_alloc = 8
25 end module
26
27 module m
28 use omp_lib_kinds, only: omp_default_mem_alloc
29 implicit none
30 integer a,b
31 common /foo/ a,b ! { dg-error "Sorry, !.OMP allocate for COMMON block variable 'foo' at .1. not supported" }
32 !$omp allocate(/foo/) align(128) allocator(omp_default_mem_alloc)
33 end
34
35 subroutine sub
36 use omp_lib_kinds
37 implicit none
38 integer a,b
39 common /foo/ a,b ! { dg-error "Sorry, !.OMP allocate for COMMON block variable 'foo' at .1. not supported" }
40 !$omp allocate(/foo/) align(128) allocator(omp_default_mem_alloc)
41 end
42
43 subroutine outer
44 contains
45 subroutine inner
46 use omp_lib_kinds
47 implicit none
48 integer a,b
49 common /foo/ a,b ! { dg-error "Sorry, !.OMP allocate for COMMON block variable 'foo' at .1. not supported" }
50 !$omp allocate(/foo/) align(128) allocator(omp_default_mem_alloc)
51 end
52 end