]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/trans-types.h
Update copyright years in gcc/
[thirdparty/gcc.git] / gcc / fortran / trans-types.h
CommitLineData
6de9cd9a 1/* Header for Fortran 95 types backend support.
23a5b65a 2 Copyright (C) 2002-2014 Free Software Foundation, Inc.
6de9cd9a
DN
3 Contributed by Paul Brook <paul@nowt.org>
4 and Steven Bosscher <s.bosscher@student.tudelft.nl>
5
9fc4d79b 6This file is part of GCC.
6de9cd9a 7
9fc4d79b
TS
8GCC is free software; you can redistribute it and/or modify it under
9the terms of the GNU General Public License as published by the Free
d234d788 10Software Foundation; either version 3, or (at your option) any later
9fc4d79b 11version.
6de9cd9a 12
9fc4d79b
TS
13GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14WARRANTY; without even the implied warranty of MERCHANTABILITY or
15FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16for more details.
6de9cd9a
DN
17
18You should have received a copy of the GNU General Public License
d234d788
NC
19along with GCC; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. */
6de9cd9a
DN
21
22
23#ifndef GFC_BACKEND_H
24#define GFC_BACKEND_H
25
6de9cd9a 26extern GTY(()) tree gfc_array_index_type;
7e6de2a5 27extern GTY(()) tree gfc_array_range_type;
e2cad04b 28extern GTY(()) tree gfc_character1_type_node;
6de9cd9a
DN
29extern GTY(()) tree ppvoid_type_node;
30extern GTY(()) tree pvoid_type_node;
10174ddf 31extern GTY(()) tree prvoid_type_node;
6de9cd9a 32extern GTY(()) tree pchar_type_node;
a3c85b74
FXC
33extern GTY(()) tree float128_type_node;
34extern GTY(()) tree complex_float128_type_node;
7e6de2a5 35
d7177ab2
TS
36/* This is the type used to hold the lengths of character variables.
37 It must be the same as the corresponding definition in gfortran.h. */
da17f559
PB
38/* TODO: This is still hardcoded as kind=4 in some bits of the compiler
39 and runtime library. */
d7177ab2 40extern GTY(()) tree gfc_charlen_type_node;
6de9cd9a 41
62732c30 42/* The following flags give us information on the correspondence of
a3c85b74
FXC
43 real (and complex) kinds with C floating-point types long double
44 and __float128. */
45extern bool gfc_real16_is_float128;
46
dcfef7d4
TS
47typedef enum {
48 PACKED_NO = 0,
49 PACKED_PARTIAL,
50 PACKED_FULL,
51 PACKED_STATIC
52} gfc_packed;
53
6de9cd9a
DN
54/* be-function.c */
55void gfc_convert_function_code (gfc_namespace *);
56
57/* trans-types.c */
5e8e542f 58void gfc_init_kinds (void);
6de9cd9a 59void gfc_init_types (void);
28d0b595 60void gfc_init_c_interop_kinds (void);
6de9cd9a
DN
61
62tree gfc_get_int_type (int);
63tree gfc_get_real_type (int);
64tree gfc_get_complex_type (int);
65tree gfc_get_logical_type (int);
374929b2
FXC
66tree gfc_get_char_type (int);
67tree gfc_get_pchar_type (int);
6de9cd9a 68tree gfc_get_character_type (int, gfc_charlen *);
40f20186 69tree gfc_get_character_type_len (int, tree);
d393bbd7 70tree gfc_get_character_type_len_for_eltype (tree, tree);
6de9cd9a
DN
71
72tree gfc_sym_type (gfc_symbol *);
73tree gfc_typenode_for_spec (gfc_typespec *);
43afc047 74int gfc_copy_dt_decls_ifequal (gfc_symbol *, gfc_symbol *, bool);
6de9cd9a
DN
75
76tree gfc_get_function_type (gfc_symbol *);
77
78tree gfc_type_for_size (unsigned, int);
79tree gfc_type_for_mode (enum machine_mode, int);
0a05c536 80tree gfc_build_uint_type (int);
6de9cd9a
DN
81
82tree gfc_get_element_type (tree);
f33beee9 83tree gfc_get_array_type_bounds (tree, int, int, tree *, tree *, int,
10174ddf
MM
84 enum gfc_array_kind, bool);
85tree gfc_get_nodesc_array_type (tree, gfc_array_spec *, gfc_packed, bool);
6de9cd9a
DN
86
87/* Add a field of given name and type to a UNION_TYPE or RECORD_TYPE. */
35151cd5 88tree gfc_add_field_to_struct (tree, tree, tree, tree **);
6de9cd9a
DN
89
90/* Layout and output debugging info for a type. */
91void gfc_finish_type (tree);
92
93/* Some functions have an extra parameter for the return value. */
94int gfc_return_by_reference (gfc_symbol *);
95
96/* Returns true if the array sym does not require a descriptor. */
97int gfc_is_nodesc_array (gfc_symbol *);
98
40b026d8
PB
99/* Return the DTYPE for an array. */
100tree gfc_get_dtype (tree);
101
713485cc
JW
102tree gfc_get_ppc_type (gfc_component *);
103
6de9cd9a 104#endif