re PR fortran/63861 (OpenACC coarray ICE (also with OpenMP?))
[official-gcc.git] / libgomp / libgomp_f.h.in
blobd84fd3fe840a79027c51ed5ba648ffe47447105b
1 /* Copyright (C) 2005-2015 Free Software Foundation, Inc.
2 Contributed by Jakub Jelinek <jakub@redhat.com>.
4 This file is part of the GNU Offloading and Multi Processing Library
5 (libgomp).
7 Libgomp is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
12 Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 more details.
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
26 /* This file contains prototypes of functions in the external ABI.
27 This file is included by files in the testsuite. */
29 #ifndef LIBGOMP_F_H
30 #define LIBGOMP_F_H 1
32 #include "libgomp.h"
34 #if (@OMP_LOCK_SIZE@ == @OMP_LOCK_KIND@) \
35 && (@OMP_LOCK_ALIGN@ <= @OMP_LOCK_SIZE@)
36 # define OMP_LOCK_DIRECT
37 typedef omp_lock_t *omp_lock_arg_t;
38 # define omp_lock_arg(arg) (arg)
39 #else
40 typedef union { omp_lock_t *lock; uint64_t u; } *omp_lock_arg_t;
41 # define omp_lock_arg(arg) ((arg)->lock)
42 # endif
44 #if (@OMP_NEST_LOCK_SIZE@ == @OMP_NEST_LOCK_KIND@) \
45 && (@OMP_NEST_LOCK_ALIGN@ <= @OMP_NEST_LOCK_SIZE@)
46 # define OMP_NEST_LOCK_DIRECT
47 typedef omp_nest_lock_t *omp_nest_lock_arg_t;
48 # define omp_nest_lock_arg(arg) (arg)
49 #else
50 typedef union { omp_nest_lock_t *lock; uint64_t u; } *omp_nest_lock_arg_t;
51 # define omp_nest_lock_arg(arg) ((arg)->lock)
52 # endif
54 #if (@OMP_LOCK_25_SIZE@ == @OMP_LOCK_25_KIND@) \
55 && (@OMP_LOCK_25_ALIGN@ <= @OMP_LOCK_25_SIZE@)
56 # define OMP_LOCK_25_DIRECT
57 typedef omp_lock_25_t *omp_lock_25_arg_t;
58 # define omp_lock_25_arg(arg) (arg)
59 #else
60 typedef union { omp_lock_25_t *lock; uint64_t u; } *omp_lock_25_arg_t;
61 # define omp_lock_25_arg(arg) ((arg)->lock)
62 # endif
64 #if (@OMP_NEST_LOCK_25_SIZE@ == @OMP_NEST_LOCK_25_KIND@) \
65 && (@OMP_NEST_LOCK_25_ALIGN@ <= @OMP_NEST_LOCK_25_SIZE@)
66 # define OMP_NEST_LOCK_25_DIRECT
67 typedef omp_nest_lock_25_t *omp_nest_lock_25_arg_t;
68 # define omp_nest_lock_25_arg(arg) (arg)
69 #else
70 typedef union { omp_nest_lock_25_t *lock; uint64_t u; } *omp_nest_lock_25_arg_t;
71 # define omp_nest_lock_25_arg(arg) ((arg)->lock)
72 # endif
74 static inline void
75 omp_check_defines (void)
77 char test[(@OMP_LOCK_SIZE@ != sizeof (omp_lock_t)
78 || @OMP_LOCK_ALIGN@ != __alignof (omp_lock_t)
79 || @OMP_NEST_LOCK_SIZE@ != sizeof (omp_nest_lock_t)
80 || @OMP_NEST_LOCK_ALIGN@ != __alignof (omp_nest_lock_t)
81 || @OMP_LOCK_KIND@ != sizeof (*(omp_lock_arg_t) 0)
82 || @OMP_NEST_LOCK_KIND@ != sizeof (*(omp_nest_lock_arg_t) 0))
83 ? -1 : 1] __attribute__ ((__unused__));
84 char test2[(@OMP_LOCK_25_SIZE@ != sizeof (omp_lock_25_t)
85 || @OMP_LOCK_25_ALIGN@ != __alignof (omp_lock_25_t)
86 || @OMP_NEST_LOCK_25_SIZE@ != sizeof (omp_nest_lock_25_t)
87 || @OMP_NEST_LOCK_25_ALIGN@ != __alignof (omp_nest_lock_25_t)
88 || @OMP_LOCK_25_KIND@ != sizeof (*(omp_lock_25_arg_t) 0)
89 || @OMP_NEST_LOCK_25_KIND@
90 != sizeof (*(omp_nest_lock_25_arg_t) 0))
91 ? -1 : 1] __attribute__ ((__unused__));
94 #endif /* LIBGOMP_F_H */