]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/libgfortran.h
cgraph.c (dump_cgraph_node): Add replace output flag by process.
[thirdparty/gcc.git] / gcc / fortran / libgfortran.h
CommitLineData
d74b97cc 1/* Header file to the Fortran front-end and runtime library
835aac92 2 Copyright (C) 2007, 2008 Free Software Foundation, Inc.
d74b97cc
FXC
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20
21/* Flags to specify which standard/extension contains a feature.
22 Note that no features were obsoleted nor deleted in F2003. */
f489fba1 23#define GFC_STD_F2008 (1<<7) /* New in F2008. */
d74b97cc
FXC
24#define GFC_STD_LEGACY (1<<6) /* Backward compatibility. */
25#define GFC_STD_GNU (1<<5) /* GNU Fortran extension. */
26#define GFC_STD_F2003 (1<<4) /* New in F2003. */
27#define GFC_STD_F95 (1<<3) /* New in F95. */
28#define GFC_STD_F95_DEL (1<<2) /* Deleted in F95. */
29#define GFC_STD_F95_OBS (1<<1) /* Obsolescent in F95. */
30#define GFC_STD_F77 (1<<0) /* Included in F77, but not deleted or
31 obsolescent in later standards. */
32
33
34/* Bitmasks for the various FPE that can be enabled. */
35#define GFC_FPE_INVALID (1<<0)
36#define GFC_FPE_DENORMAL (1<<1)
37#define GFC_FPE_ZERO (1<<2)
38#define GFC_FPE_OVERFLOW (1<<3)
39#define GFC_FPE_UNDERFLOW (1<<4)
40#define GFC_FPE_PRECISION (1<<5)
41
42
43/* Possible values for the CONVERT I/O specifier. */
44typedef enum
45{
46 GFC_CONVERT_NONE = -1,
47 GFC_CONVERT_NATIVE = 0,
48 GFC_CONVERT_SWAP,
49 GFC_CONVERT_BIG,
50 GFC_CONVERT_LITTLE
51}
52unit_convert;
53
54
55/* Runtime errors. */
56typedef enum
57{
58 LIBERROR_FIRST = -3, /* Marker for the first error. */
59 LIBERROR_EOR = -2, /* End of record, must be negative. */
60 LIBERROR_END = -1, /* End of file, must be negative. */
61 LIBERROR_OK = 0, /* Indicates success, must be zero. */
62 LIBERROR_OS = 5000, /* OS error, more info in errno. */
63 LIBERROR_OPTION_CONFLICT,
64 LIBERROR_BAD_OPTION,
65 LIBERROR_MISSING_OPTION,
66 LIBERROR_ALREADY_OPEN,
67 LIBERROR_BAD_UNIT,
68 LIBERROR_FORMAT,
69 LIBERROR_BAD_ACTION,
70 LIBERROR_ENDFILE,
71 LIBERROR_BAD_US,
72 LIBERROR_READ_VALUE,
73 LIBERROR_READ_OVERFLOW,
74 LIBERROR_INTERNAL,
75 LIBERROR_INTERNAL_UNIT,
76 LIBERROR_ALLOCATION,
77 LIBERROR_DIRECT_EOR,
78 LIBERROR_SHORT_RECORD,
79 LIBERROR_CORRUPT_FILE,
80 LIBERROR_LAST /* Not a real error, the last error # + 1. */
81}
82libgfortran_error_codes;
83
84
85/* Default unit number for preconnected standard input and output. */
86#define GFC_STDIN_UNIT_NUMBER 5
87#define GFC_STDOUT_UNIT_NUMBER 6
88#define GFC_STDERR_UNIT_NUMBER 0
89
90
6c397102
TB
91/* FIXME: Increase to 15 for Fortran 2008. Also needs changes to
92 GFC_DTYPE_RANK_MASK. See PR 36825. */
93#define GFC_MAX_DIMENSIONS 7
d74b97cc
FXC
94
95#define GFC_DTYPE_RANK_MASK 0x07
96#define GFC_DTYPE_TYPE_SHIFT 3
97#define GFC_DTYPE_TYPE_MASK 0x38
98#define GFC_DTYPE_SIZE_SHIFT 6
99
100enum
101{
102 GFC_DTYPE_UNKNOWN = 0,
103 GFC_DTYPE_INTEGER,
104 /* TODO: recognize logical types. */
105 GFC_DTYPE_LOGICAL,
106 GFC_DTYPE_REAL,
107 GFC_DTYPE_COMPLEX,
108 GFC_DTYPE_DERIVED,
109 GFC_DTYPE_CHARACTER
110};
111