]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgomp/libgomp_f.h.in
[Ada] Warning for out-of-order record representation clauses
[thirdparty/gcc.git] / libgomp / libgomp_f.h.in
CommitLineData
fbd26352 1/* Copyright (C) 2005-2019 Free Software Foundation, Inc.
1e8e9920 2 Contributed by Jakub Jelinek <jakub@redhat.com>.
3
c35c9a62 4 This file is part of the GNU Offloading and Multi Processing Library
5 (libgomp).
1e8e9920 6
7 Libgomp is free software; you can redistribute it and/or modify it
6bc9506f 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.
1e8e9920 11
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
6bc9506f 14 FOR A PARTICULAR PURPOSE. See the GNU General Public License for
1e8e9920 15 more details.
16
6bc9506f 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.
20
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/>. */
1e8e9920 25
26/* This file contains prototypes of functions in the external ABI.
27 This file is included by files in the testsuite. */
28
29#ifndef LIBGOMP_F_H
30#define LIBGOMP_F_H 1
31
32#include "libgomp.h"
1e8e9920 33
107c3bbf 34#if (@OMP_LOCK_SIZE@ == @OMP_LOCK_KIND@) \
35 && (@OMP_LOCK_ALIGN@ <= @OMP_LOCK_SIZE@)
1e8e9920 36# define OMP_LOCK_DIRECT
37typedef omp_lock_t *omp_lock_arg_t;
38# define omp_lock_arg(arg) (arg)
39#else
40typedef union { omp_lock_t *lock; uint64_t u; } *omp_lock_arg_t;
41# define omp_lock_arg(arg) ((arg)->lock)
42# endif
43
107c3bbf 44#if (@OMP_NEST_LOCK_SIZE@ == @OMP_NEST_LOCK_KIND@) \
45 && (@OMP_NEST_LOCK_ALIGN@ <= @OMP_NEST_LOCK_SIZE@)
1e8e9920 46# define OMP_NEST_LOCK_DIRECT
47typedef omp_nest_lock_t *omp_nest_lock_arg_t;
48# define omp_nest_lock_arg(arg) (arg)
49#else
50typedef 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
53
fd6481cf 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
57typedef omp_lock_25_t *omp_lock_25_arg_t;
58# define omp_lock_25_arg(arg) (arg)
59#else
60typedef 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
63
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
67typedef omp_nest_lock_25_t *omp_nest_lock_25_arg_t;
68# define omp_nest_lock_25_arg(arg) (arg)
69#else
70typedef 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
73
1e8e9920 74static inline void
75omp_check_defines (void)
76{
107c3bbf 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))
1e8e9920 83 ? -1 : 1] __attribute__ ((__unused__));
fd6481cf 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__));
1e8e9920 92}
93
94#endif /* LIBGOMP_F_H */