]> gcc.gnu.org Git - gcc.git/blame - gcc/fortran/trans-types.h
re PR fortran/31675 (Fortran front-end and libgfortran should have a common header...
[gcc.git] / gcc / fortran / trans-types.h
CommitLineData
6de9cd9a 1/* Header for Fortran 95 types backend support.
710a179f
TS
2 Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation,
3 Inc.
6de9cd9a
DN
4 Contributed by Paul Brook <paul@nowt.org>
5 and Steven Bosscher <s.bosscher@student.tudelft.nl>
6
9fc4d79b 7This file is part of GCC.
6de9cd9a 8
9fc4d79b
TS
9GCC is free software; you can redistribute it and/or modify it under
10the terms of the GNU General Public License as published by the Free
d234d788 11Software Foundation; either version 3, or (at your option) any later
9fc4d79b 12version.
6de9cd9a 13
9fc4d79b
TS
14GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15WARRANTY; without even the implied warranty of MERCHANTABILITY or
16FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17for more details.
6de9cd9a
DN
18
19You should have received a copy of the GNU General Public License
d234d788
NC
20along with GCC; see the file COPYING3. If not see
21<http://www.gnu.org/licenses/>. */
6de9cd9a
DN
22
23
24#ifndef GFC_BACKEND_H
25#define GFC_BACKEND_H
26
6de9cd9a 27extern GTY(()) tree gfc_array_index_type;
7e6de2a5 28extern GTY(()) tree gfc_array_range_type;
e2cad04b 29extern GTY(()) tree gfc_character1_type_node;
6de9cd9a
DN
30extern GTY(()) tree ppvoid_type_node;
31extern GTY(()) tree pvoid_type_node;
32extern GTY(()) tree pchar_type_node;
7e6de2a5 33
d7177ab2
TS
34/* This is the type used to hold the lengths of character variables.
35 It must be the same as the corresponding definition in gfortran.h. */
da17f559
PB
36/* TODO: This is still hardcoded as kind=4 in some bits of the compiler
37 and runtime library. */
d7177ab2 38extern GTY(()) tree gfc_charlen_type_node;
6de9cd9a 39
dcfef7d4
TS
40typedef enum {
41 PACKED_NO = 0,
42 PACKED_PARTIAL,
43 PACKED_FULL,
44 PACKED_STATIC
45} gfc_packed;
46
6de9cd9a
DN
47/* be-function.c */
48void gfc_convert_function_code (gfc_namespace *);
49
50/* trans-types.c */
5e8e542f 51void gfc_init_kinds (void);
6de9cd9a
DN
52void gfc_init_types (void);
53
54tree gfc_get_int_type (int);
55tree gfc_get_real_type (int);
56tree gfc_get_complex_type (int);
57tree gfc_get_logical_type (int);
58tree gfc_get_character_type (int, gfc_charlen *);
40f20186 59tree gfc_get_character_type_len (int, tree);
6de9cd9a
DN
60
61tree gfc_sym_type (gfc_symbol *);
62tree gfc_typenode_for_spec (gfc_typespec *);
63
64tree gfc_get_function_type (gfc_symbol *);
65
66tree gfc_type_for_size (unsigned, int);
67tree gfc_type_for_mode (enum machine_mode, int);
6de9cd9a
DN
68
69tree gfc_get_element_type (tree);
70tree gfc_get_array_type_bounds (tree, int, tree *, tree *, int);
dcfef7d4 71tree gfc_get_nodesc_array_type (tree, gfc_array_spec *, gfc_packed);
6de9cd9a
DN
72
73/* Add a field of given name and type to a UNION_TYPE or RECORD_TYPE. */
74tree gfc_add_field_to_struct (tree *, tree, tree, tree);
75
76/* Layout and output debugging info for a type. */
77void gfc_finish_type (tree);
78
79/* Some functions have an extra parameter for the return value. */
80int gfc_return_by_reference (gfc_symbol *);
81
82/* Returns true if the array sym does not require a descriptor. */
83int gfc_is_nodesc_array (gfc_symbol *);
84
40b026d8
PB
85/* Return the DTYPE for an array. */
86tree gfc_get_dtype (tree);
87
6de9cd9a 88#endif
This page took 0.923092 seconds and 5 git commands to generate.