OSDN Git Service

* trans.c (gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return):
[pf3gnuchains/gcc-fork.git] / gcc / fortran / trans-const.h
1 /* Header for code constant translation functions
2    Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
3    Contributed by Paul Brook
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING.  If not, write to the Free
19 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
20 02110-1301, USA.  */
21
22 /* Returns an INT_CST.  */
23 tree gfc_conv_mpz_to_tree (mpz_t, int);
24
25 /* Returns a REAL_CST.  */
26 tree gfc_conv_mpfr_to_tree (mpfr_t, int);
27
28 /* Build a tree for a constant.  Must be an EXPR_CONSTANT gfc_expr.
29    For CHARACTER literal constants, the caller still has to set the
30    string length as a separate operation.  */
31 tree gfc_conv_constant_to_tree (gfc_expr *);
32
33 /* Like gfc_conv_noncharacter_constant, but works on simplified expression
34    structures.  Also sets the length of CHARACTER strings in the gfc_se.  */
35 void gfc_conv_constant (gfc_se *, gfc_expr *);
36
37 tree gfc_build_string_const (int, const char *);
38 tree gfc_build_cstring_const (const char *);
39
40 /* Translate a string constant for a static initializer.  */
41 tree gfc_conv_string_init (tree, gfc_expr *);
42
43 /* Create a tree node for the string length if it is constant.  */
44 void gfc_conv_const_charlen (gfc_charlen *);
45
46 /* Initialize the nodes for constants.  */
47 void gfc_init_constants (void);
48
49 /* Build a constant with given type from an int_cst.  */
50 tree gfc_build_const (tree, tree);
51
52 /* Integer constants 0..GFC_MAX_DIMENSIONS.  */
53 extern GTY(()) tree gfc_rank_cst[GFC_MAX_DIMENSIONS + 1];
54
55 #define gfc_index_zero_node gfc_rank_cst[0]
56 #define gfc_index_one_node gfc_rank_cst[1]