| 1 | /* Compilation switch flag type definitions for GCC. |
| 2 | Copyright (C) 1987-2026 Free Software Foundation, Inc. |
| 3 | |
| 4 | This file is part of GCC. |
| 5 | |
| 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 |
| 8 | Software Foundation; either version 3, or (at your option) any later |
| 9 | version. |
| 10 | |
| 11 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
| 12 | WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 14 | for more details. |
| 15 | |
| 16 | You should have received a copy of the GNU General Public License |
| 17 | along with GCC; see the file COPYING3. If not see |
| 18 | <http://www.gnu.org/licenses/>. */ |
| 19 | |
| 20 | #ifndef GCC_FLAG_TYPES_H |
| 21 | #define GCC_FLAG_TYPES_H |
| 22 | |
| 23 | #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS) |
| 24 | |
| 25 | enum debug_info_type |
| 26 | { |
| 27 | DINFO_TYPE_NONE, /* No debug info. */ |
| 28 | DINFO_TYPE_DWARF2, /* Dwarf v2 debug info. */ |
| 29 | DINFO_TYPE_VMS, /* VMS debug info. */ |
| 30 | DINFO_TYPE_CTF, /* CTF debug info. */ |
| 31 | DINFO_TYPE_BTF, /* BTF debug info. */ |
| 32 | DINFO_TYPE_CODEVIEW, /* CodeView debug info. */ |
| 33 | DINFO_TYPE_BTF_WITH_CORE, /* BTF debug info with CO-RE relocations. */ |
| 34 | DINFO_TYPE_MAX = DINFO_TYPE_BTF_WITH_CORE /* Marker only. */ |
| 35 | }; |
| 36 | |
| 37 | #define NO_DEBUG (0U) |
| 38 | /* Write DWARF2 debug info (using dwarf2out.cc). */ |
| 39 | #define DWARF2_DEBUG (1U << DINFO_TYPE_DWARF2) |
| 40 | /* Write VMS debug info (using vmsdbgout.cc). */ |
| 41 | #define VMS_DEBUG (1U << DINFO_TYPE_VMS) |
| 42 | /* Write CTF debug info (using ctfout.cc). */ |
| 43 | #define CTF_DEBUG (1U << DINFO_TYPE_CTF) |
| 44 | /* Write BTF debug info (using btfout.cc). */ |
| 45 | #define BTF_DEBUG (1U << DINFO_TYPE_BTF) |
| 46 | /* Write CodeView debug info (using dwarf2codeview.cc). */ |
| 47 | #define CODEVIEW_DEBUG (1U << DINFO_TYPE_CODEVIEW) |
| 48 | /* Write BTF debug info for BPF CO-RE usecase (using btfout.cc). */ |
| 49 | #define BTF_WITH_CORE_DEBUG (1U << DINFO_TYPE_BTF_WITH_CORE) |
| 50 | |
| 51 | /* Note: Adding new definitions to handle -combination- of debug formats, |
| 52 | like VMS_AND_DWARF2_DEBUG is not recommended. This definition remains |
| 53 | here for historical reasons. */ |
| 54 | /* Write VMS debug info (using vmsdbgout.cc) and DWARF v2 debug info (using |
| 55 | dwarf2out.cc). */ |
| 56 | #define VMS_AND_DWARF2_DEBUG ((VMS_DEBUG | DWARF2_DEBUG)) |
| 57 | |
| 58 | enum debug_info_levels |
| 59 | { |
| 60 | DINFO_LEVEL_NONE, /* Write no debugging info. */ |
| 61 | DINFO_LEVEL_TERSE, /* Write minimal info to support tracebacks only. */ |
| 62 | DINFO_LEVEL_NORMAL, /* Write info for all declarations (and line table). */ |
| 63 | DINFO_LEVEL_VERBOSE /* Write normal info plus #define/#undef info. */ |
| 64 | }; |
| 65 | |
| 66 | /* CTF debug info levels. |
| 67 | CTF debug info levels are untied with DWARF debug info levels because CTF |
| 68 | may co-exist with DWARF. */ |
| 69 | enum ctf_debug_info_levels |
| 70 | { |
| 71 | CTFINFO_LEVEL_NONE = 0, /* Write no CTF debug info. */ |
| 72 | CTFINFO_LEVEL_TERSE = 1, /* Write CTF information to support tracebacks |
| 73 | only. Not Implemented. */ |
| 74 | CTFINFO_LEVEL_NORMAL = 2 /* Write CTF type information for all entities |
| 75 | (functions, data objects, variables etc.) |
| 76 | at file-scope or global-scope only. */ |
| 77 | }; |
| 78 | |
| 79 | /* A major contribution to object and executable size is debug |
| 80 | information size. A major contribution to debug information |
| 81 | size is struct descriptions replicated in several object files. |
| 82 | The following function determines whether or not debug information |
| 83 | should be generated for a given struct. The indirect parameter |
| 84 | indicates that the struct is being handled indirectly, via |
| 85 | a pointer. See opts.cc for the implementation. */ |
| 86 | |
| 87 | enum debug_info_usage |
| 88 | { |
| 89 | DINFO_USAGE_DFN, /* A struct definition. */ |
| 90 | DINFO_USAGE_DIR_USE, /* A direct use, such as the type of a variable. */ |
| 91 | DINFO_USAGE_IND_USE, /* An indirect use, such as through a pointer. */ |
| 92 | DINFO_USAGE_NUM_ENUMS /* The number of enumerators. */ |
| 93 | }; |
| 94 | |
| 95 | /* A major contribution to object and executable size is debug |
| 96 | information size. A major contribution to debug information size |
| 97 | is struct descriptions replicated in several object files. The |
| 98 | following flags attempt to reduce this information. The basic |
| 99 | idea is to not emit struct debugging information in the current |
| 100 | compilation unit when that information will be generated by |
| 101 | another compilation unit. |
| 102 | |
| 103 | Debug information for a struct defined in the current source |
| 104 | file should be generated in the object file. Likewise the |
| 105 | debug information for a struct defined in a header should be |
| 106 | generated in the object file of the corresponding source file. |
| 107 | Both of these case are handled when the base name of the file of |
| 108 | the struct definition matches the base name of the source file |
| 109 | of the current compilation unit. This matching emits minimal |
| 110 | struct debugging information. |
| 111 | |
| 112 | The base file name matching rule above will fail to emit debug |
| 113 | information for structs defined in system headers. So a second |
| 114 | category of files includes system headers in addition to files |
| 115 | with matching bases. |
| 116 | |
| 117 | The remaining types of files are library headers and application |
| 118 | headers. We cannot currently distinguish these two types. */ |
| 119 | |
| 120 | enum debug_struct_file |
| 121 | { |
| 122 | DINFO_STRUCT_FILE_NONE, /* Debug no structs. */ |
| 123 | DINFO_STRUCT_FILE_BASE, /* Debug structs defined in files with the |
| 124 | same base name as the compilation unit. */ |
| 125 | DINFO_STRUCT_FILE_SYS, /* Also debug structs defined in system |
| 126 | header files. */ |
| 127 | DINFO_STRUCT_FILE_ANY /* Debug structs defined in all files. */ |
| 128 | }; |
| 129 | |
| 130 | /* Balance between GNAT encodings and standard DWARF to emit. */ |
| 131 | |
| 132 | enum dwarf_gnat_encodings |
| 133 | { |
| 134 | DWARF_GNAT_ENCODINGS_ALL = 0, /* Emit all GNAT encodings, then emit as |
| 135 | much standard DWARF as possible so it |
| 136 | does not conflict with GNAT |
| 137 | encodings. */ |
| 138 | DWARF_GNAT_ENCODINGS_GDB = 1, /* Emit as much standard DWARF as possible |
| 139 | as long as GDB handles them. Emit GNAT |
| 140 | encodings for the rest. */ |
| 141 | DWARF_GNAT_ENCODINGS_MINIMAL = 2 /* Emit all the standard DWARF we can. |
| 142 | Emit GNAT encodings for the rest. */ |
| 143 | }; |
| 144 | |
| 145 | /* Enumerate Objective-c instance variable visibility settings. */ |
| 146 | |
| 147 | enum ivar_visibility |
| 148 | { |
| 149 | IVAR_VISIBILITY_PRIVATE, |
| 150 | IVAR_VISIBILITY_PROTECTED, |
| 151 | IVAR_VISIBILITY_PUBLIC, |
| 152 | IVAR_VISIBILITY_PACKAGE |
| 153 | }; |
| 154 | |
| 155 | /* The stack reuse level. */ |
| 156 | enum stack_reuse_level |
| 157 | { |
| 158 | SR_NONE, |
| 159 | SR_NAMED_VARS, |
| 160 | SR_ALL |
| 161 | }; |
| 162 | |
| 163 | /* Control Flow Redundancy hardening options for noreturn calls. */ |
| 164 | enum hardcfr_noret |
| 165 | { |
| 166 | HCFRNR_NEVER, |
| 167 | HCFRNR_NOTHROW, |
| 168 | HCFRNR_NO_XTHROW, |
| 169 | HCFRNR_UNSPECIFIED, |
| 170 | HCFRNR_ALWAYS, |
| 171 | }; |
| 172 | |
| 173 | /* The live patching level. */ |
| 174 | enum live_patching_level |
| 175 | { |
| 176 | LIVE_PATCHING_NONE = 0, |
| 177 | LIVE_PATCHING_INLINE_ONLY_STATIC, |
| 178 | LIVE_PATCHING_INLINE_CLONE |
| 179 | }; |
| 180 | |
| 181 | /* The algorithm used for basic block reordering. */ |
| 182 | enum reorder_blocks_algorithm |
| 183 | { |
| 184 | REORDER_BLOCKS_ALGORITHM_SIMPLE, |
| 185 | REORDER_BLOCKS_ALGORITHM_STC |
| 186 | }; |
| 187 | |
| 188 | /* The algorithm used for the integrated register allocator (IRA). */ |
| 189 | enum ira_algorithm |
| 190 | { |
| 191 | IRA_ALGORITHM_CB, |
| 192 | IRA_ALGORITHM_PRIORITY |
| 193 | }; |
| 194 | |
| 195 | /* The regions used for the integrated register allocator (IRA). */ |
| 196 | enum ira_region |
| 197 | { |
| 198 | IRA_REGION_ONE, |
| 199 | IRA_REGION_ALL, |
| 200 | IRA_REGION_MIXED, |
| 201 | }; |
| 202 | |
| 203 | /* The options for excess precision. */ |
| 204 | enum excess_precision |
| 205 | { |
| 206 | EXCESS_PRECISION_DEFAULT, |
| 207 | EXCESS_PRECISION_FAST, |
| 208 | EXCESS_PRECISION_STANDARD, |
| 209 | EXCESS_PRECISION_FLOAT16 |
| 210 | }; |
| 211 | |
| 212 | /* The options for which values of FLT_EVAL_METHOD are permissible. */ |
| 213 | enum permitted_flt_eval_methods |
| 214 | { |
| 215 | PERMITTED_FLT_EVAL_METHODS_DEFAULT, |
| 216 | PERMITTED_FLT_EVAL_METHODS_TS_18661, |
| 217 | PERMITTED_FLT_EVAL_METHODS_C11 |
| 218 | }; |
| 219 | |
| 220 | /* Type of stack check. |
| 221 | |
| 222 | Stack checking is designed to detect infinite recursion and stack |
| 223 | overflows for Ada programs. Furthermore stack checking tries to ensure |
| 224 | in that scenario that enough stack space is left to run a signal handler. |
| 225 | |
| 226 | -fstack-check= does not prevent stack-clash style attacks. For that |
| 227 | you want -fstack-clash-protection. */ |
| 228 | enum stack_check_type |
| 229 | { |
| 230 | /* Do not check the stack. */ |
| 231 | NO_STACK_CHECK = 0, |
| 232 | |
| 233 | /* Check the stack generically, i.e. assume no specific support |
| 234 | from the target configuration files. */ |
| 235 | GENERIC_STACK_CHECK, |
| 236 | |
| 237 | /* Check the stack and rely on the target configuration files to |
| 238 | check the static frame of functions, i.e. use the generic |
| 239 | mechanism only for dynamic stack allocations. */ |
| 240 | STATIC_BUILTIN_STACK_CHECK, |
| 241 | |
| 242 | /* Check the stack and entirely rely on the target configuration |
| 243 | files, i.e. do not use the generic mechanism at all. */ |
| 244 | FULL_BUILTIN_STACK_CHECK |
| 245 | }; |
| 246 | |
| 247 | /* Type of callgraph information. */ |
| 248 | enum callgraph_info_type |
| 249 | { |
| 250 | /* No information. */ |
| 251 | NO_CALLGRAPH_INFO = 0, |
| 252 | |
| 253 | /* Naked callgraph. */ |
| 254 | CALLGRAPH_INFO_NAKED = 1, |
| 255 | |
| 256 | /* Callgraph decorated with stack usage information. */ |
| 257 | CALLGRAPH_INFO_STACK_USAGE = 2, |
| 258 | |
| 259 | /* Callgraph decoration with dynamic allocation information. */ |
| 260 | CALLGRAPH_INFO_DYNAMIC_ALLOC = 4 |
| 261 | }; |
| 262 | |
| 263 | /* Floating-point contraction mode. */ |
| 264 | enum fp_contract_mode { |
| 265 | FP_CONTRACT_OFF = 0, |
| 266 | FP_CONTRACT_ON = 1, |
| 267 | FP_CONTRACT_FAST = 2 |
| 268 | }; |
| 269 | |
| 270 | /* Scalar storage order kind. */ |
| 271 | enum scalar_storage_order_kind { |
| 272 | SSO_NATIVE = 0, |
| 273 | SSO_BIG_ENDIAN, |
| 274 | SSO_LITTLE_ENDIAN |
| 275 | }; |
| 276 | |
| 277 | /* Vectorizer cost-model. Except for DEFAULT, the values are ordered from |
| 278 | the most conservative to the least conservative. */ |
| 279 | enum vect_cost_model { |
| 280 | VECT_COST_MODEL_VERY_CHEAP = -3, |
| 281 | VECT_COST_MODEL_CHEAP = -2, |
| 282 | VECT_COST_MODEL_DYNAMIC = -1, |
| 283 | VECT_COST_MODEL_UNLIMITED = 0, |
| 284 | VECT_COST_MODEL_DEFAULT = 1 |
| 285 | }; |
| 286 | |
| 287 | /* Automatic variable initialization type. */ |
| 288 | enum auto_init_type { |
| 289 | AUTO_INIT_UNINITIALIZED = 0, |
| 290 | AUTO_INIT_PATTERN = 1, |
| 291 | AUTO_INIT_ZERO = 2, |
| 292 | AUTO_INIT_CXX26 = 3 |
| 293 | }; |
| 294 | |
| 295 | /* Initialization of padding bits with zeros. */ |
| 296 | enum zero_init_padding_bits_kind { |
| 297 | ZERO_INIT_PADDING_BITS_STANDARD = 0, |
| 298 | ZERO_INIT_PADDING_BITS_UNIONS = 1, |
| 299 | ZERO_INIT_PADDING_BITS_ALL = 2 |
| 300 | }; |
| 301 | |
| 302 | /* Different instrumentation modes. */ |
| 303 | enum sanitize_code { |
| 304 | /* AddressSanitizer. */ |
| 305 | SANITIZE_ADDRESS = 1UL << 0, |
| 306 | SANITIZE_USER_ADDRESS = 1UL << 1, |
| 307 | SANITIZE_KERNEL_ADDRESS = 1UL << 2, |
| 308 | /* ThreadSanitizer. */ |
| 309 | SANITIZE_THREAD = 1UL << 3, |
| 310 | /* LeakSanitizer. */ |
| 311 | SANITIZE_LEAK = 1UL << 4, |
| 312 | /* UndefinedBehaviorSanitizer. */ |
| 313 | SANITIZE_SHIFT_BASE = 1UL << 5, |
| 314 | SANITIZE_SHIFT_EXPONENT = 1UL << 6, |
| 315 | SANITIZE_DIVIDE = 1UL << 7, |
| 316 | SANITIZE_UNREACHABLE = 1UL << 8, |
| 317 | SANITIZE_VLA = 1UL << 9, |
| 318 | SANITIZE_NULL = 1UL << 10, |
| 319 | SANITIZE_RETURN = 1UL << 11, |
| 320 | SANITIZE_SI_OVERFLOW = 1UL << 12, |
| 321 | SANITIZE_BOOL = 1UL << 13, |
| 322 | SANITIZE_ENUM = 1UL << 14, |
| 323 | SANITIZE_FLOAT_DIVIDE = 1UL << 15, |
| 324 | SANITIZE_FLOAT_CAST = 1UL << 16, |
| 325 | SANITIZE_BOUNDS = 1UL << 17, |
| 326 | SANITIZE_ALIGNMENT = 1UL << 18, |
| 327 | SANITIZE_NONNULL_ATTRIBUTE = 1UL << 19, |
| 328 | SANITIZE_RETURNS_NONNULL_ATTRIBUTE = 1UL << 20, |
| 329 | SANITIZE_OBJECT_SIZE = 1UL << 21, |
| 330 | SANITIZE_VPTR = 1UL << 22, |
| 331 | SANITIZE_BOUNDS_STRICT = 1UL << 23, |
| 332 | SANITIZE_POINTER_OVERFLOW = 1UL << 24, |
| 333 | SANITIZE_BUILTIN = 1UL << 25, |
| 334 | SANITIZE_POINTER_COMPARE = 1UL << 26, |
| 335 | SANITIZE_POINTER_SUBTRACT = 1UL << 27, |
| 336 | SANITIZE_HWADDRESS = 1UL << 28, |
| 337 | SANITIZE_USER_HWADDRESS = 1UL << 29, |
| 338 | SANITIZE_KERNEL_HWADDRESS = 1UL << 30, |
| 339 | /* Shadow Call Stack. */ |
| 340 | SANITIZE_SHADOW_CALL_STACK = 1UL << 31, |
| 341 | /* Memory Tagging for Stack. */ |
| 342 | SANITIZE_MEMTAG_STACK = 1ULL << 32, |
| 343 | /* Memory Tagging. */ |
| 344 | SANITIZE_MEMTAG = SANITIZE_MEMTAG_STACK, |
| 345 | SANITIZE_SHIFT = SANITIZE_SHIFT_BASE | SANITIZE_SHIFT_EXPONENT, |
| 346 | SANITIZE_UNDEFINED = SANITIZE_SHIFT | SANITIZE_DIVIDE | SANITIZE_UNREACHABLE |
| 347 | | SANITIZE_VLA | SANITIZE_NULL | SANITIZE_RETURN |
| 348 | | SANITIZE_SI_OVERFLOW | SANITIZE_BOOL | SANITIZE_ENUM |
| 349 | | SANITIZE_BOUNDS | SANITIZE_ALIGNMENT |
| 350 | | SANITIZE_NONNULL_ATTRIBUTE |
| 351 | | SANITIZE_RETURNS_NONNULL_ATTRIBUTE |
| 352 | | SANITIZE_OBJECT_SIZE | SANITIZE_VPTR |
| 353 | | SANITIZE_POINTER_OVERFLOW | SANITIZE_BUILTIN, |
| 354 | SANITIZE_UNDEFINED_NONDEFAULT = SANITIZE_FLOAT_DIVIDE | SANITIZE_FLOAT_CAST |
| 355 | | SANITIZE_BOUNDS_STRICT |
| 356 | }; |
| 357 | |
| 358 | /* Sanitizer flag type. */ |
| 359 | typedef uint64_t sanitize_code_type; |
| 360 | |
| 361 | /* Different settings for zeroing subset of registers. */ |
| 362 | namespace zero_regs_flags { |
| 363 | const unsigned int UNSET = 0; |
| 364 | const unsigned int SKIP = 1UL << 0; |
| 365 | const unsigned int ONLY_USED = 1UL << 1; |
| 366 | const unsigned int ONLY_GPR = 1UL << 2; |
| 367 | const unsigned int ONLY_ARG = 1UL << 3; |
| 368 | const unsigned int ENABLED = 1UL << 4; |
| 369 | const unsigned int LEAFY_MODE = 1UL << 5; |
| 370 | const unsigned int USED_GPR_ARG = ENABLED | ONLY_USED | ONLY_GPR | ONLY_ARG; |
| 371 | const unsigned int USED_GPR = ENABLED | ONLY_USED | ONLY_GPR; |
| 372 | const unsigned int USED_ARG = ENABLED | ONLY_USED | ONLY_ARG; |
| 373 | const unsigned int USED = ENABLED | ONLY_USED; |
| 374 | const unsigned int ALL_GPR_ARG = ENABLED | ONLY_GPR | ONLY_ARG; |
| 375 | const unsigned int ALL_GPR = ENABLED | ONLY_GPR; |
| 376 | const unsigned int ALL_ARG = ENABLED | ONLY_ARG; |
| 377 | const unsigned int ALL = ENABLED; |
| 378 | const unsigned int LEAFY_GPR_ARG = ENABLED | LEAFY_MODE | ONLY_GPR | ONLY_ARG; |
| 379 | const unsigned int LEAFY_GPR = ENABLED | LEAFY_MODE | ONLY_GPR; |
| 380 | const unsigned int LEAFY_ARG = ENABLED | LEAFY_MODE | ONLY_ARG; |
| 381 | const unsigned int LEAFY = ENABLED | LEAFY_MODE; |
| 382 | } |
| 383 | |
| 384 | /* Settings of flag_incremental_link. */ |
| 385 | enum incremental_link { |
| 386 | INCREMENTAL_LINK_NONE, |
| 387 | /* Do incremental linking and produce binary. */ |
| 388 | INCREMENTAL_LINK_NOLTO, |
| 389 | /* Do incremental linking and produce IL. */ |
| 390 | INCREMENTAL_LINK_LTO |
| 391 | }; |
| 392 | |
| 393 | /* Different trace modes. */ |
| 394 | enum sanitize_coverage_code { |
| 395 | /* Trace PC. */ |
| 396 | SANITIZE_COV_TRACE_PC = 1 << 0, |
| 397 | /* Trace Comparison. */ |
| 398 | SANITIZE_COV_TRACE_CMP = 1 << 1 |
| 399 | }; |
| 400 | |
| 401 | /* flag_vtable_verify initialization levels. */ |
| 402 | enum vtv_priority { |
| 403 | VTV_NO_PRIORITY = 0, /* i.E. Do NOT do vtable verification. */ |
| 404 | VTV_STANDARD_PRIORITY = 1, |
| 405 | VTV_PREINIT_PRIORITY = 2 |
| 406 | }; |
| 407 | |
| 408 | /* flag_lto_partition initialization values. */ |
| 409 | enum lto_partition_model { |
| 410 | LTO_PARTITION_NONE = 0, |
| 411 | LTO_PARTITION_ONE = 1, |
| 412 | LTO_PARTITION_BALANCED = 2, |
| 413 | LTO_PARTITION_1TO1 = 3, |
| 414 | LTO_PARTITION_MAX = 4, |
| 415 | LTO_PARTITION_CACHE = 5 |
| 416 | }; |
| 417 | |
| 418 | /* flag_lto_locality_cloning initialization values. */ |
| 419 | enum lto_locality_cloning_model { |
| 420 | LTO_LOCALITY_NO_CLONING = 0, |
| 421 | LTO_LOCALITY_NON_INTERPOSABLE_CLONING = 1, |
| 422 | LTO_LOCALITY_MAXIMAL_CLONING = 2, |
| 423 | }; |
| 424 | |
| 425 | /* flag_lto_locality_heuristics initialization values. */ |
| 426 | enum lto_locality_heuristics { |
| 427 | LTO_LOCALITY_DEFAULT_HEURISTIC = 0, |
| 428 | LTO_LOCALITY_CPP_TEMPLATE = 1, |
| 429 | }; |
| 430 | |
| 431 | /* flag_lto_linker_output initialization values. */ |
| 432 | enum lto_linker_output { |
| 433 | LTO_LINKER_OUTPUT_UNKNOWN, |
| 434 | LTO_LINKER_OUTPUT_REL, |
| 435 | LTO_LINKER_OUTPUT_NOLTOREL, |
| 436 | LTO_LINKER_OUTPUT_DYN, |
| 437 | LTO_LINKER_OUTPUT_PIE, |
| 438 | LTO_LINKER_OUTPUT_EXEC |
| 439 | }; |
| 440 | |
| 441 | /* gfortran -finit-real= values. */ |
| 442 | |
| 443 | enum gfc_init_local_real |
| 444 | { |
| 445 | GFC_INIT_REAL_OFF = 0, |
| 446 | GFC_INIT_REAL_ZERO, |
| 447 | GFC_INIT_REAL_NAN, |
| 448 | GFC_INIT_REAL_SNAN, |
| 449 | GFC_INIT_REAL_INF, |
| 450 | GFC_INIT_REAL_NEG_INF |
| 451 | }; |
| 452 | |
| 453 | /* gfortran -fcoarray= values. */ |
| 454 | |
| 455 | enum gfc_fcoarray |
| 456 | { |
| 457 | GFC_FCOARRAY_NONE = 0, |
| 458 | GFC_FCOARRAY_SINGLE, |
| 459 | GFC_FCOARRAY_LIB |
| 460 | }; |
| 461 | |
| 462 | |
| 463 | /* gfortran -fconvert= values; used for unformatted I/O. |
| 464 | Keep in sync with GFC_CONVERT_* in gcc/fortran/libgfortran.h. */ |
| 465 | enum gfc_convert |
| 466 | { |
| 467 | GFC_FLAG_CONVERT_NATIVE = 0, |
| 468 | GFC_FLAG_CONVERT_SWAP, |
| 469 | GFC_FLAG_CONVERT_BIG, |
| 470 | GFC_FLAG_CONVERT_LITTLE, |
| 471 | GFC_FLAG_CONVERT_R16_IEEE = 4, |
| 472 | GFC_FLAG_CONVERT_R16_IEEE_SWAP, |
| 473 | GFC_FLAG_CONVERT_R16_IEEE_BIG, |
| 474 | GFC_FLAG_CONVERT_R16_IEEE_LITTLE, |
| 475 | GFC_FLAG_CONVERT_R16_IBM = 8, |
| 476 | GFC_FLAG_CONVERT_R16_IBM_SWAP, |
| 477 | GFC_FLAG_CONVERT_R16_IBM_BIG, |
| 478 | GFC_FLAG_CONVERT_R16_IBM_LITTLE, |
| 479 | }; |
| 480 | |
| 481 | |
| 482 | /* gfortran -finline-intrinsics= values; |
| 483 | We use two identical bits for each value, and initialize with alternated |
| 484 | bits, so that we can check whether a value has been set by checking whether |
| 485 | the two bits have identical value. */ |
| 486 | |
| 487 | #define GFC_INL_INTR_VAL(idx) (3 << (2 * idx)) |
| 488 | #define GFC_INL_INTR_UNSET_VAL(val) (0x55555555 & (val)) |
| 489 | |
| 490 | enum gfc_inlineable_intrinsics |
| 491 | { |
| 492 | GFC_FLAG_INLINE_INTRINSIC_NONE = 0, |
| 493 | GFC_FLAG_INLINE_INTRINSIC_MAXLOC = GFC_INL_INTR_VAL (0), |
| 494 | GFC_FLAG_INLINE_INTRINSIC_MINLOC = GFC_INL_INTR_VAL (1), |
| 495 | GFC_FLAG_INLINE_INTRINSIC_ALL = GFC_FLAG_INLINE_INTRINSIC_MAXLOC |
| 496 | | GFC_FLAG_INLINE_INTRINSIC_MINLOC, |
| 497 | |
| 498 | GFC_FLAG_INLINE_INTRINSIC_NONE_UNSET |
| 499 | = GFC_INL_INTR_UNSET_VAL (GFC_FLAG_INLINE_INTRINSIC_NONE), |
| 500 | GFC_FLAG_INLINE_INTRINSIC_MAXLOC_UNSET |
| 501 | = GFC_INL_INTR_UNSET_VAL (GFC_FLAG_INLINE_INTRINSIC_MAXLOC), |
| 502 | GFC_FLAG_INLINE_INTRINSIC_MINLOC_UNSET |
| 503 | = GFC_INL_INTR_UNSET_VAL (GFC_FLAG_INLINE_INTRINSIC_MINLOC), |
| 504 | GFC_FLAG_INLINE_INTRINSIC_ALL_UNSET |
| 505 | = GFC_INL_INTR_UNSET_VAL (GFC_FLAG_INLINE_INTRINSIC_ALL) |
| 506 | }; |
| 507 | |
| 508 | #undef GFC_INL_INTR_UNSET_VAL |
| 509 | #undef GFC_INL_INTR_VAL |
| 510 | |
| 511 | |
| 512 | /* Inline String Operations functions. */ |
| 513 | enum ilsop_fn |
| 514 | { |
| 515 | ILSOP_NONE = 0, |
| 516 | ILSOP_MEMSET = 1 << 0, |
| 517 | ILSOP_MEMCPY = 1 << 1, |
| 518 | ILSOP_MEMMOVE = 1 << 2, |
| 519 | ILSOP_MEMCMP = 1 << 3, |
| 520 | ILSOP_ALL = -1 |
| 521 | }; |
| 522 | |
| 523 | /* Control-Flow Protection values. */ |
| 524 | enum cf_protection_level |
| 525 | { |
| 526 | CF_NONE = 0, |
| 527 | CF_BRANCH = 1 << 0, |
| 528 | CF_RETURN = 1 << 1, |
| 529 | CF_FULL = CF_BRANCH | CF_RETURN, |
| 530 | CF_SET = 1 << 2, |
| 531 | CF_CHECK = 1 << 3 |
| 532 | }; |
| 533 | |
| 534 | /* Parloops schedule type. */ |
| 535 | enum parloops_schedule_type |
| 536 | { |
| 537 | PARLOOPS_SCHEDULE_STATIC = 0, |
| 538 | PARLOOPS_SCHEDULE_DYNAMIC, |
| 539 | PARLOOPS_SCHEDULE_GUIDED, |
| 540 | PARLOOPS_SCHEDULE_AUTO, |
| 541 | PARLOOPS_SCHEDULE_RUNTIME |
| 542 | }; |
| 543 | |
| 544 | /* Ranger debug mode. */ |
| 545 | enum ranger_debug |
| 546 | { |
| 547 | RANGER_DEBUG_NONE = 0, |
| 548 | RANGER_DEBUG_TRACE = 1, |
| 549 | RANGER_DEBUG_CACHE = 2, |
| 550 | RANGER_DEBUG_GORI = 4, |
| 551 | RANGER_DEBUG_TRACE_GORI = (RANGER_DEBUG_TRACE | RANGER_DEBUG_GORI), |
| 552 | RANGER_DEBUG_TRACE_CACHE = (RANGER_DEBUG_TRACE | RANGER_DEBUG_CACHE), |
| 553 | RANGER_DEBUG_ALL = (RANGER_DEBUG_GORI | RANGER_DEBUG_CACHE |
| 554 | | RANGER_DEBUG_TRACE) |
| 555 | }; |
| 556 | |
| 557 | /* Jump threader verbose dumps. */ |
| 558 | enum threader_debug |
| 559 | { |
| 560 | THREADER_DEBUG_NONE = 0, |
| 561 | THREADER_DEBUG_ALL = 1 |
| 562 | }; |
| 563 | |
| 564 | /* Modes of OpenACC 'kernels' constructs handling. */ |
| 565 | enum openacc_kernels |
| 566 | { |
| 567 | OPENACC_KERNELS_DECOMPOSE, |
| 568 | OPENACC_KERNELS_PARLOOPS |
| 569 | }; |
| 570 | |
| 571 | /* Modes of OpenACC privatization diagnostics. */ |
| 572 | enum openacc_privatization |
| 573 | { |
| 574 | OPENACC_PRIVATIZATION_QUIET, |
| 575 | OPENACC_PRIVATIZATION_NOISY |
| 576 | }; |
| 577 | |
| 578 | /* Targets for -fopenmp-target-simd-clone. */ |
| 579 | enum omp_target_simd_clone_device_kind |
| 580 | { |
| 581 | OMP_TARGET_SIMD_CLONE_NONE = 0, |
| 582 | OMP_TARGET_SIMD_CLONE_HOST = 1, |
| 583 | OMP_TARGET_SIMD_CLONE_NOHOST = 2, |
| 584 | OMP_TARGET_SIMD_CLONE_ANY = 3 |
| 585 | }; |
| 586 | |
| 587 | #endif |
| 588 | |
| 589 | #endif /* ! GCC_FLAG_TYPES_H */ |
| 590 | |