comparison gcc/fortran/libgfortran.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* Header file to the Fortran front-end and runtime library 1 /* Header file to the Fortran front-end and runtime library
2 Copyright (C) 2007-2017 Free Software Foundation, Inc. 2 Copyright (C) 2007-2018 Free Software Foundation, Inc.
3 3
4 This file is part of GCC. 4 This file is part of GCC.
5 5
6 GCC is free software; you can redistribute it and/or modify it under 6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free 7 the terms of the GNU General Public License as published by the Free
20 20
21 /* Flags to specify which standard/extension contains a feature. 21 /* Flags to specify which standard/extension contains a feature.
22 Note that no features were obsoleted nor deleted in F2003. 22 Note that no features were obsoleted nor deleted in F2003.
23 Please remember to keep those definitions in sync with 23 Please remember to keep those definitions in sync with
24 gfortran.texi. */ 24 gfortran.texi. */
25 /* For now, use F2015 = GFC_STD_GNU. */ 25 #define GFC_STD_F2018_DEL (1<<11) /* Deleted in F2018. */
26 #define GFC_STD_F2015 (1<<5) /* PLACEHOLDER for Fortran 2015. */ 26 #define GFC_STD_F2018_OBS (1<<10) /* Obsolescent in F2018. */
27 #define GFC_STD_F2008_TS (1<<9) /* POST-F2008 technical reports. */ 27 #define GFC_STD_F2018 (1<<9) /* New in F2018. */
28 #define GFC_STD_F2008_OBS (1<<8) /* Obsolescent in F2008. */ 28 #define GFC_STD_F2008_OBS (1<<8) /* Obsolescent in F2008. */
29 #define GFC_STD_F2008 (1<<7) /* New in F2008. */ 29 #define GFC_STD_F2008 (1<<7) /* New in F2008. */
30 #define GFC_STD_LEGACY (1<<6) /* Backward compatibility. */ 30 #define GFC_STD_LEGACY (1<<6) /* Backward compatibility. */
31 #define GFC_STD_GNU (1<<5) /* GNU Fortran extension. */ 31 #define GFC_STD_GNU (1<<5) /* GNU Fortran extension. */
32 #define GFC_STD_F2003 (1<<4) /* New in F2003. */ 32 #define GFC_STD_F2003 (1<<4) /* New in F2003. */
34 #define GFC_STD_F95_DEL (1<<2) /* Deleted in F95. */ 34 #define GFC_STD_F95_DEL (1<<2) /* Deleted in F95. */
35 #define GFC_STD_F95_OBS (1<<1) /* Obsolescent in F95. */ 35 #define GFC_STD_F95_OBS (1<<1) /* Obsolescent in F95. */
36 #define GFC_STD_F77 (1<<0) /* Included in F77, but not deleted or 36 #define GFC_STD_F77 (1<<0) /* Included in F77, but not deleted or
37 obsolescent in later standards. */ 37 obsolescent in later standards. */
38 38
39 /* Combinations of the above flags that specify which classes of features
40 * are allowed with a certain -std option. */
41 #define GFC_STD_OPT_F95 (GFC_STD_F77 | GFC_STD_F95 | GFC_STD_F95_OBS \
42 | GFC_STD_F2008_OBS | GFC_STD_F2018_OBS \
43 | GFC_STD_F2018_DEL)
44 #define GFC_STD_OPT_F03 (GFC_STD_OPT_F95 | GFC_STD_F2003)
45 #define GFC_STD_OPT_F08 (GFC_STD_OPT_F03 | GFC_STD_F2008)
46 #define GFC_STD_OPT_F18 ((GFC_STD_OPT_F08 | GFC_STD_F2018) \
47 & (~GFC_STD_F2018_DEL))
39 48
40 /* Bitmasks for the various FPE that can be enabled. These need to be straight integers 49 /* Bitmasks for the various FPE that can be enabled. These need to be straight integers
41 e.g., 8 instead of (1<<3), because they will be included in Fortran source. */ 50 e.g., 8 instead of (1<<3), because they will be included in Fortran source. */
42 #define GFC_FPE_INVALID 1 51 #define GFC_FPE_INVALID 1
43 #define GFC_FPE_DENORMAL 2 52 #define GFC_FPE_DENORMAL 2
147 /* Default unit number for preconnected standard input and output. */ 156 /* Default unit number for preconnected standard input and output. */
148 #define GFC_STDIN_UNIT_NUMBER 5 157 #define GFC_STDIN_UNIT_NUMBER 5
149 #define GFC_STDOUT_UNIT_NUMBER 6 158 #define GFC_STDOUT_UNIT_NUMBER 6
150 #define GFC_STDERR_UNIT_NUMBER 0 159 #define GFC_STDERR_UNIT_NUMBER 0
151 160
161 /* F2003 onward. For std < F2003, error caught in array.c(gfc_match_array_ref). */
162 #define GFC_MAX_DIMENSIONS 15
152 163
153 /* FIXME: Increase to 15 for Fortran 2008. Also needs changes to 164 #define GFC_DTYPE_RANK_MASK 0x0F
154 GFC_DTYPE_RANK_MASK. See PR 36825. */ 165 #define GFC_DTYPE_TYPE_SHIFT 4
155 #define GFC_MAX_DIMENSIONS 7 166 #define GFC_DTYPE_TYPE_MASK 0x70
156 167 #define GFC_DTYPE_SIZE_SHIFT 7
157 #define GFC_DTYPE_RANK_MASK 0x07
158 #define GFC_DTYPE_TYPE_SHIFT 3
159 #define GFC_DTYPE_TYPE_MASK 0x38
160 #define GFC_DTYPE_SIZE_SHIFT 6
161 168
162 /* Basic types. BT_VOID is used by ISO C Binding so funcs like c_f_pointer 169 /* Basic types. BT_VOID is used by ISO C Binding so funcs like c_f_pointer
163 can take any arg with the pointer attribute as a param. These are also 170 can take any arg with the pointer attribute as a param. These are also
164 used in the run-time library for IO. */ 171 used in the run-time library for IO. */
165 typedef enum 172 typedef enum