10This header can be included into both
Fortran and C.
12This file defines various code values that need to be exported
13to predefined
Fortran standard modules as well as to C/C++
14code in the compiler and runtime library.
16 - the error/end code values that can be returned
17 to an IOSTAT= or STAT= specifier on a
Fortran I/O statement
18 or coindexed data reference (see
Fortran 2018 12.11.5,
19 16.10.2, and 16.10.2.33)
20Codes from <errno.h>, e.g. ENOENT, are assumed to be positive
21and are used
"raw" as IOSTAT values.
23CFI_ERROR_xxx and CFI_INVALID_xxx macros from ISO_Fortran_binding.h
24have small positive values. The FORTRAN_RUNTIME_STAT_xxx macros here
25start at 100 so as to never conflict with those codes.
27#ifndef FORTRAN_RUNTIME_MAGIC_NUMBERS_H_
28#define FORTRAN_RUNTIME_MAGIC_NUMBERS_H_
30#define FORTRAN_DEFAULT_OUTPUT_UNIT 6
31#define FORTRAN_DEFAULT_INPUT_UNIT 5
32#define FORTRAN_ERROR_UNIT 0
34#define FORTRAN_RUNTIME_IOSTAT_END (-1)
35#define FORTRAN_RUNTIME_IOSTAT_EOR (-2)
36#define FORTRAN_RUNTIME_IOSTAT_FLUSH (-3)
37#define FORTRAN_RUNTIME_IOSTAT_INQUIRE_INTERNAL_UNIT 256
39#define FORTRAN_RUNTIME_STAT_FAILED_IMAGE 101
40#define FORTRAN_RUNTIME_STAT_LOCKED 102
41#define FORTRAN_RUNTIME_STAT_LOCKED_OTHER_IMAGE 103
42#define FORTRAN_RUNTIME_STAT_STOPPED_IMAGE 104
43#define FORTRAN_RUNTIME_STAT_UNLOCKED 105
44#define FORTRAN_RUNTIME_STAT_UNLOCKED_FAILED_IMAGE 106
47Status codes
for GET_COMMAND_ARGUMENT. The status
for 'value too short' needs
48to be -1, the others must be positive.
50#define FORTRAN_RUNTIME_STAT_INVALID_ARG_NUMBER 107
51#define FORTRAN_RUNTIME_STAT_MISSING_ARG 108
52#define FORTRAN_RUNTIME_STAT_VALUE_TOO_SHORT -1
55Status codes
for GET_ENVIRONMENT_VARIABLE. Values mandated by the standard.
57#define FORTRAN_RUNTIME_STAT_MISSING_ENV_VAR 1
58#define FORTRAN_RUNTIME_STAT_ENV_VARS_UNSUPPORTED 2
61Processor-defined status code
for MOVE_ALLOC where arguments are the
64#define FORTRAN_RUNTIME_STAT_MOVE_ALLOC_SAME_ALLOCATABLE 109
67Additional status code
for a bad pointer DEALLOCATE.
69#define FORTRAN_RUNTIME_STAT_BAD_POINTER_DEALLOCATION 110
72Status codes
for GETCWD.
74#define FORTRAN_RUNTIME_STAT_MISSING_CWD 111
77Status code
for NEXT/PREVIOUS at enumeration type boundary.
79#define FORTRAN_RUNTIME_STAT_ENUM_BOUNDARY 112
83The sequence is that of F18 Clause 17.2p3, but nothing depends on that.
85#define _FORTRAN_RUNTIME_IEEE_SIGNALING_NAN 1
86#define _FORTRAN_RUNTIME_IEEE_QUIET_NAN 2
87#define _FORTRAN_RUNTIME_IEEE_NEGATIVE_INF 3
88#define _FORTRAN_RUNTIME_IEEE_NEGATIVE_NORMAL 4
89#define _FORTRAN_RUNTIME_IEEE_NEGATIVE_SUBNORMAL 5
90#define _FORTRAN_RUNTIME_IEEE_NEGATIVE_ZERO 6
91#define _FORTRAN_RUNTIME_IEEE_POSITIVE_ZERO 7
92#define _FORTRAN_RUNTIME_IEEE_POSITIVE_SUBNORMAL 8
93#define _FORTRAN_RUNTIME_IEEE_POSITIVE_NORMAL 9
94#define _FORTRAN_RUNTIME_IEEE_POSITIVE_INF 10
95#define _FORTRAN_RUNTIME_IEEE_OTHER_VALUE 11
99The values are those of a common but not universal fenv.h file.
100The denorm value is a nonstandard extension.
102#define _FORTRAN_RUNTIME_IEEE_INVALID 1
103#define _FORTRAN_RUNTIME_IEEE_DENORM 2
104#define _FORTRAN_RUNTIME_IEEE_DIVIDE_BY_ZERO 4
105#define _FORTRAN_RUNTIME_IEEE_OVERFLOW 8
106#define _FORTRAN_RUNTIME_IEEE_UNDERFLOW 16
107#define _FORTRAN_RUNTIME_IEEE_INEXACT 32
108#define _FORTRAN_RUNTIME_IEEE_ALL \
109 _FORTRAN_RUNTIME_IEEE_INVALID | _FORTRAN_RUNTIME_IEEE_DENORM | \
110 _FORTRAN_RUNTIME_IEEE_DIVIDE_BY_ZERO | _FORTRAN_RUNTIME_IEEE_OVERFLOW | \
111 _FORTRAN_RUNTIME_IEEE_UNDERFLOW | _FORTRAN_RUNTIME_IEEE_INEXACT
114ieee_round_type values
115The values are those of the llvm.get.rounding intrinsic, which is assumed by
116ieee_arithmetic module rounding procedures.
118#define _FORTRAN_RUNTIME_IEEE_TO_ZERO 0
119#define _FORTRAN_RUNTIME_IEEE_NEAREST 1
120#define _FORTRAN_RUNTIME_IEEE_UP 2
121#define _FORTRAN_RUNTIME_IEEE_DOWN 3
122#define _FORTRAN_RUNTIME_IEEE_AWAY 4
123#define _FORTRAN_RUNTIME_IEEE_OTHER 5
126INTEGER(kind=4) extents for ieee_exceptions module types ieee_modes_type and
127ieee_status_type. These extent values are large enough to hold femode_t and
128fenv_t data in many environments. An environment that does not meet these
129size constraints may allocate memory with runtime size values.
131#define _FORTRAN_RUNTIME_IEEE_FEMODE_T_EXTENT 2
132#define _FORTRAN_RUNTIME_IEEE_FENV_T_EXTENT 8
Definition bit-population-count.h:20