]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/trans-const.h
arith.c: Add #define for model numbers.
[thirdparty/gcc.git] / gcc / fortran / trans-const.h
CommitLineData
6de9cd9a 1/* Header for code constant translation functions
9fc4d79b 2 Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
6de9cd9a
DN
3 Contributed by Paul Brook
4
9fc4d79b 5This file is part of GCC.
6de9cd9a 6
9fc4d79b
TS
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
9Software Foundation; either version 2, or (at your option) any later
10version.
6de9cd9a 11
9fc4d79b
TS
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.
6de9cd9a
DN
16
17You should have received a copy of the GNU General Public License
9fc4d79b
TS
18along with GCC; see the file COPYING. If not, write to the Free
19Software Foundation, 59 Temple Place - Suite 330, Boston, MA
2002111-1307, USA. */
6de9cd9a
DN
21
22/* Returns an INT_CST. */
23tree gfc_conv_mpz_to_tree (mpz_t, int);
24
25/* Returns a REAL_CST. */
f8e566e5 26tree gfc_conv_mpfr_to_tree (mpfr_t, int);
6de9cd9a
DN
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. */
31tree 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. */
35void gfc_conv_constant (gfc_se *, gfc_expr *);
36
37tree gfc_build_string_const (int, const char *);
38
39/* Translate a string constant for a static initializer. */
40tree gfc_conv_string_init (tree, gfc_expr *);
41
42/* Create a tree node for the string length if it is constant. */
43void gfc_conv_const_charlen (gfc_charlen *);
44
45/* Initialise the nodes for constants. */
46void gfc_init_constants (void);
47
48/* Build a constant with given type from an int_cst. */
49tree gfc_build_const (tree, tree);
50
51/* String constants. */
52extern GTY(()) tree gfc_strconst_current_filename;
53extern GTY(()) tree gfc_strconst_bounds;
54extern GTY(()) tree gfc_strconst_fault;
55extern GTY(()) tree gfc_strconst_wrong_return;
56
57/* Integer constants 0..GFC_MAX_DIMENSIONS. */
58extern GTY(()) tree gfc_rank_cst[GFC_MAX_DIMENSIONS + 1];
7ab92584 59
6de9cd9a 60#define gfc_index_zero_node gfc_rank_cst[0]
7ab92584 61#define gfc_index_one_node gfc_rank_cst[1]