]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/target-memory.h
PR 78534 Change character length from int to size_t
[thirdparty/gcc.git] / gcc / fortran / target-memory.h
CommitLineData
7433458d 1/* Simulate storage of variables into target memory, header.
cbe34bb5 2 Copyright (C) 2007-2017 Free Software Foundation, Inc.
7433458d
PT
3 Contributed by Paul Thomas and Brooks Moses
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
d234d788 9Software Foundation; either version 3, or (at your option) any later
7433458d
PT
10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License
d234d788
NC
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
7433458d
PT
20
21#ifndef GFC_TARGET_MEMORY_H
22#define GFC_TARGET_MEMORY_H
23
00a4618b 24/* Convert a BOZ to REAL or COMPLEX. */
c7abc45c 25bool gfc_convert_boz (gfc_expr *, gfc_typespec *);
00a4618b 26
e361d18d 27size_t gfc_element_size (gfc_expr *);
7433458d
PT
28size_t gfc_target_expr_size (gfc_expr *);
29
30/* Write a constant expression in binary form to a target buffer. */
994e4aca 31int gfc_encode_character (int, gfc_charlen_t, const gfc_char_t *, unsigned char *,
d393bbd7 32 size_t);
fd2805e1
TB
33unsigned HOST_WIDE_INT gfc_target_encode_expr (gfc_expr *, unsigned char *,
34 size_t);
7433458d
PT
35
36/* Read a target buffer into a constant expression. */
20585ad6
BM
37
38int gfc_interpret_integer (int, unsigned char *, size_t, mpz_t);
39int gfc_interpret_float (int, unsigned char *, size_t, mpfr_t);
eb6f9a86 40int gfc_interpret_complex (int, unsigned char *, size_t, mpc_t);
20585ad6
BM
41int gfc_interpret_logical (int, unsigned char *, size_t, int *);
42int gfc_interpret_character (unsigned char *, size_t, gfc_expr *);
43int gfc_interpret_derived (unsigned char *, size_t, gfc_expr *);
86dbed7d 44int gfc_target_interpret_expr (unsigned char *, size_t, gfc_expr *, bool);
7433458d 45
9d99ee7b 46/* Merge overlapping equivalence initializers for trans-common.c. */
93cb9a5a 47size_t gfc_merge_initializers (gfc_typespec, gfc_expr *, locus *,
9d99ee7b
PT
48 unsigned char *, unsigned char *,
49 size_t);
50
7433458d 51#endif /* GFC_TARGET_MEMORY_H */