]> gcc.gnu.org Git - gcc.git/blame - gcc/fortran/trans-types.h
re PR c++/31517 (ICE on invalid initialization of static member of a template class)
[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
11Software Foundation; either version 2, or (at your option) any later
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
9fc4d79b 20along with GCC; see the file COPYING. If not, write to the Free
ab57747b
KC
21Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
2202110-1301, USA. */
6de9cd9a
DN
23
24
25#ifndef GFC_BACKEND_H
26#define GFC_BACKEND_H
27
6de9cd9a
DN
28#define GFC_DTYPE_RANK_MASK 0x07
29#define GFC_DTYPE_TYPE_SHIFT 3
30#define GFC_DTYPE_TYPE_MASK 0x38
31#define GFC_DTYPE_SIZE_SHIFT 6
32
33enum
34{
35 GFC_DTYPE_UNKNOWN = 0,
36 GFC_DTYPE_INTEGER,
37 GFC_DTYPE_LOGICAL,
38 GFC_DTYPE_REAL,
39 GFC_DTYPE_COMPLEX,
40 GFC_DTYPE_DERIVED,
41 GFC_DTYPE_CHARACTER
42};
43
6de9cd9a 44extern GTY(()) tree gfc_array_index_type;
7e6de2a5 45extern GTY(()) tree gfc_array_range_type;
e2cad04b 46extern GTY(()) tree gfc_character1_type_node;
6de9cd9a
DN
47extern GTY(()) tree ppvoid_type_node;
48extern GTY(()) tree pvoid_type_node;
49extern GTY(()) tree pchar_type_node;
7e6de2a5 50
d7177ab2
TS
51/* This is the type used to hold the lengths of character variables.
52 It must be the same as the corresponding definition in gfortran.h. */
da17f559
PB
53/* TODO: This is still hardcoded as kind=4 in some bits of the compiler
54 and runtime library. */
d7177ab2 55extern GTY(()) tree gfc_charlen_type_node;
6de9cd9a 56
6de9cd9a
DN
57/* be-function.c */
58void gfc_convert_function_code (gfc_namespace *);
59
60/* trans-types.c */
5e8e542f 61void gfc_init_kinds (void);
6de9cd9a
DN
62void gfc_init_types (void);
63
64tree gfc_get_int_type (int);
65tree gfc_get_real_type (int);
66tree gfc_get_complex_type (int);
67tree gfc_get_logical_type (int);
68tree gfc_get_character_type (int, gfc_charlen *);
40f20186 69tree gfc_get_character_type_len (int, tree);
6de9cd9a
DN
70
71tree gfc_sym_type (gfc_symbol *);
72tree gfc_typenode_for_spec (gfc_typespec *);
73
74tree gfc_get_function_type (gfc_symbol *);
75
76tree gfc_type_for_size (unsigned, int);
77tree gfc_type_for_mode (enum machine_mode, int);
78tree gfc_unsigned_type (tree);
79tree gfc_signed_type (tree);
6de9cd9a
DN
80
81tree gfc_get_element_type (tree);
82tree gfc_get_array_type_bounds (tree, int, tree *, tree *, int);
83tree gfc_get_nodesc_array_type (tree, gfc_array_spec *, int);
84
85/* Add a field of given name and type to a UNION_TYPE or RECORD_TYPE. */
86tree gfc_add_field_to_struct (tree *, tree, tree, tree);
87
88/* Layout and output debugging info for a type. */
89void gfc_finish_type (tree);
90
91/* Some functions have an extra parameter for the return value. */
92int gfc_return_by_reference (gfc_symbol *);
93
94/* Returns true if the array sym does not require a descriptor. */
95int gfc_is_nodesc_array (gfc_symbol *);
96
40b026d8
PB
97/* Return the DTYPE for an array. */
98tree gfc_get_dtype (tree);
99
6de9cd9a 100#endif
This page took 0.880745 seconds and 5 git commands to generate.