Home | History | Annotate | Line # | Download | only in fortran
      1      1.1  mrg /* gfortran header file
      2  1.1.1.3  mrg    Copyright (C) 2000-2022 Free Software Foundation, Inc.
      3      1.1  mrg    Contributed by Andy Vaught
      4      1.1  mrg 
      5      1.1  mrg This file is part of GCC.
      6      1.1  mrg 
      7      1.1  mrg GCC is free software; you can redistribute it and/or modify it under
      8      1.1  mrg the terms of the GNU General Public License as published by the Free
      9      1.1  mrg Software Foundation; either version 3, or (at your option) any later
     10      1.1  mrg version.
     11      1.1  mrg 
     12      1.1  mrg GCC is distributed in the hope that it will be useful, but WITHOUT ANY
     13      1.1  mrg WARRANTY; without even the implied warranty of MERCHANTABILITY or
     14      1.1  mrg FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     15      1.1  mrg for more details.
     16      1.1  mrg 
     17      1.1  mrg You should have received a copy of the GNU General Public License
     18      1.1  mrg along with GCC; see the file COPYING3.  If not see
     19      1.1  mrg <http://www.gnu.org/licenses/>.  */
     20      1.1  mrg 
     21      1.1  mrg #ifndef GCC_GFORTRAN_H
     22      1.1  mrg #define GCC_GFORTRAN_H
     23      1.1  mrg 
     24      1.1  mrg /* It's probably insane to have this large of a header file, but it
     25      1.1  mrg    seemed like everything had to be recompiled anyway when a change
     26      1.1  mrg    was made to a header file, and there were ordering issues with
     27      1.1  mrg    multiple header files.  Besides, Microsoft's winnt.h was 250k last
     28      1.1  mrg    time I looked, so by comparison this is perfectly reasonable.  */
     29      1.1  mrg 
     30      1.1  mrg #ifndef GCC_CORETYPES_H
     31      1.1  mrg #error "gfortran.h must be included after coretypes.h"
     32      1.1  mrg #endif
     33      1.1  mrg 
     34      1.1  mrg /* In order for the format checking to accept the Fortran front end
     35      1.1  mrg    diagnostic framework extensions, you must include this file before
     36      1.1  mrg    diagnostic-core.h, not after.  We override the definition of GCC_DIAG_STYLE
     37      1.1  mrg    in c-common.h.  */
     38      1.1  mrg #undef GCC_DIAG_STYLE
     39      1.1  mrg #define GCC_DIAG_STYLE __gcc_gfc__
     40      1.1  mrg #if defined(GCC_DIAGNOSTIC_CORE_H)
     41      1.1  mrg #error \
     42      1.1  mrg In order for the format checking to accept the Fortran front end diagnostic \
     43      1.1  mrg framework extensions, you must include this file before diagnostic-core.h, \
     44      1.1  mrg not after.
     45      1.1  mrg #endif
     46      1.1  mrg 
     47      1.1  mrg /* Declarations common to the front-end and library are put in
     48      1.1  mrg    libgfortran/libgfortran_frontend.h  */
     49      1.1  mrg #include "libgfortran.h"
     50      1.1  mrg 
     51      1.1  mrg 
     52      1.1  mrg #include "intl.h"
     53      1.1  mrg #include "splay-tree.h"
     54      1.1  mrg 
     55      1.1  mrg /* Major control parameters.  */
     56      1.1  mrg 
     57      1.1  mrg #define GFC_MAX_SYMBOL_LEN 63   /* Must be at least 63 for F2003.  */
     58      1.1  mrg #define GFC_LETTERS 26		/* Number of letters in the alphabet.  */
     59      1.1  mrg 
     60      1.1  mrg #define MAX_SUBRECORD_LENGTH 2147483639   /* 2**31-9 */
     61      1.1  mrg 
     62      1.1  mrg 
     63      1.1  mrg #define gfc_is_whitespace(c) ((c==' ') || (c=='\t') || (c=='\f'))
     64      1.1  mrg 
     65      1.1  mrg /* Macros to check for groups of structure-like types and flavors since
     66      1.1  mrg    derived types, structures, maps, unions are often treated similarly. */
     67      1.1  mrg #define gfc_bt_struct(t) \
     68      1.1  mrg   ((t) == BT_DERIVED || (t) == BT_UNION)
     69      1.1  mrg #define gfc_fl_struct(f) \
     70      1.1  mrg   ((f) == FL_DERIVED || (f) == FL_UNION || (f) == FL_STRUCT)
     71      1.1  mrg #define case_bt_struct case BT_DERIVED: case BT_UNION
     72      1.1  mrg #define case_fl_struct case FL_DERIVED: case FL_UNION: case FL_STRUCT
     73      1.1  mrg 
     74      1.1  mrg /* Stringization.  */
     75      1.1  mrg #define stringize(x) expand_macro(x)
     76      1.1  mrg #define expand_macro(x) # x
     77      1.1  mrg 
     78      1.1  mrg /* For the runtime library, a standard prefix is a requirement to
     79      1.1  mrg    avoid cluttering the namespace with things nobody asked for.  It's
     80      1.1  mrg    ugly to look at and a pain to type when you add the prefix by hand,
     81      1.1  mrg    so we hide it behind a macro.  */
     82      1.1  mrg #define PREFIX(x) "_gfortran_" x
     83      1.1  mrg #define PREFIX_LEN 10
     84      1.1  mrg 
     85      1.1  mrg /* A prefix for internal variables, which are not user-visible.  */
     86      1.1  mrg #if !defined (NO_DOT_IN_LABEL)
     87      1.1  mrg # define GFC_PREFIX(x) "_F." x
     88      1.1  mrg #elif !defined (NO_DOLLAR_IN_LABEL)
     89      1.1  mrg # define GFC_PREFIX(x) "_F$" x
     90      1.1  mrg #else
     91      1.1  mrg # define GFC_PREFIX(x) "_F_" x
     92      1.1  mrg #endif
     93      1.1  mrg 
     94      1.1  mrg #define BLANK_COMMON_NAME "__BLNK__"
     95      1.1  mrg 
     96      1.1  mrg /* Macro to initialize an mstring structure.  */
     97      1.1  mrg #define minit(s, t) { s, NULL, t }
     98      1.1  mrg 
     99      1.1  mrg /* Structure for storing strings to be matched by gfc_match_string.  */
    100      1.1  mrg typedef struct
    101      1.1  mrg {
    102      1.1  mrg   const char *string;
    103      1.1  mrg   const char *mp;
    104      1.1  mrg   int tag;
    105      1.1  mrg }
    106      1.1  mrg mstring;
    107      1.1  mrg 
    108  1.1.1.3  mrg /* ISO_Fortran_binding.h
    109  1.1.1.3  mrg    CAUTION: This has to be kept in sync with libgfortran.  */
    110  1.1.1.3  mrg 
    111  1.1.1.3  mrg #define CFI_type_kind_shift 8
    112  1.1.1.3  mrg #define CFI_type_mask 0xFF
    113  1.1.1.3  mrg #define CFI_type_from_type_kind(t, k) (t + (k << CFI_type_kind_shift))
    114  1.1.1.3  mrg 
    115  1.1.1.3  mrg /* Constants, defined as macros. */
    116  1.1.1.3  mrg #define CFI_VERSION 1
    117  1.1.1.3  mrg #define CFI_MAX_RANK 15
    118  1.1.1.3  mrg 
    119  1.1.1.3  mrg /* Attributes. */
    120  1.1.1.3  mrg #define CFI_attribute_pointer 0
    121  1.1.1.3  mrg #define CFI_attribute_allocatable 1
    122  1.1.1.3  mrg #define CFI_attribute_other 2
    123  1.1.1.3  mrg 
    124  1.1.1.3  mrg #define CFI_type_mask 0xFF
    125  1.1.1.3  mrg #define CFI_type_kind_shift 8
    126  1.1.1.3  mrg 
    127  1.1.1.3  mrg /* Intrinsic types. Their kind number defines their storage size. */
    128  1.1.1.3  mrg #define CFI_type_Integer 1
    129  1.1.1.3  mrg #define CFI_type_Logical 2
    130  1.1.1.3  mrg #define CFI_type_Real 3
    131  1.1.1.3  mrg #define CFI_type_Complex 4
    132  1.1.1.3  mrg #define CFI_type_Character 5
    133  1.1.1.3  mrg 
    134  1.1.1.3  mrg /* Combined type (for more, see ISO_Fortran_binding.h).  */
    135  1.1.1.3  mrg #define CFI_type_ucs4_char (CFI_type_Character + (4 << CFI_type_kind_shift))
    136  1.1.1.3  mrg 
    137  1.1.1.3  mrg /* Types with no kind. */
    138  1.1.1.3  mrg #define CFI_type_struct 6
    139  1.1.1.3  mrg #define CFI_type_cptr 7
    140  1.1.1.3  mrg #define CFI_type_cfunptr 8
    141  1.1.1.3  mrg #define CFI_type_other -1
    142      1.1  mrg 
    143      1.1  mrg 
    144      1.1  mrg /*************************** Enums *****************************/
    145      1.1  mrg 
    146      1.1  mrg /* Used when matching and resolving data I/O transfer statements.  */
    147      1.1  mrg 
    148      1.1  mrg enum io_kind
    149      1.1  mrg { M_READ, M_WRITE, M_PRINT, M_INQUIRE };
    150      1.1  mrg 
    151      1.1  mrg 
    152      1.1  mrg /* These are flags for identifying whether we are reading a character literal
    153      1.1  mrg    between quotes or normal source code.  */
    154      1.1  mrg 
    155      1.1  mrg enum gfc_instring
    156      1.1  mrg { NONSTRING = 0, INSTRING_WARN, INSTRING_NOWARN };
    157      1.1  mrg 
    158      1.1  mrg /* This is returned by gfc_notification_std to know if, given the flags
    159      1.1  mrg    that were given (-std=, -pedantic) we should issue an error, a warning
    160      1.1  mrg    or nothing.  */
    161      1.1  mrg 
    162      1.1  mrg enum notification
    163      1.1  mrg { SILENT, WARNING, ERROR };
    164      1.1  mrg 
    165      1.1  mrg /* Matchers return one of these three values.  The difference between
    166      1.1  mrg    MATCH_NO and MATCH_ERROR is that MATCH_ERROR means that a match was
    167      1.1  mrg    successful, but that something non-syntactic is wrong and an error
    168      1.1  mrg    has already been issued.  */
    169      1.1  mrg 
    170      1.1  mrg enum match
    171      1.1  mrg { MATCH_NO = 1, MATCH_YES, MATCH_ERROR };
    172      1.1  mrg 
    173  1.1.1.3  mrg /* Used for different Fortran source forms in places like scanner.cc.  */
    174      1.1  mrg enum gfc_source_form
    175      1.1  mrg { FORM_FREE, FORM_FIXED, FORM_UNKNOWN };
    176      1.1  mrg 
    177      1.1  mrg /* Expression node types.  */
    178      1.1  mrg enum expr_t
    179      1.1  mrg   { EXPR_UNKNOWN = 0, EXPR_OP = 1, EXPR_FUNCTION, EXPR_CONSTANT, EXPR_VARIABLE,
    180      1.1  mrg   EXPR_SUBSTRING, EXPR_STRUCTURE, EXPR_ARRAY, EXPR_NULL, EXPR_COMPCALL, EXPR_PPC
    181      1.1  mrg };
    182      1.1  mrg 
    183      1.1  mrg /* Array types.  */
    184      1.1  mrg enum array_type
    185      1.1  mrg { AS_EXPLICIT = 1, AS_ASSUMED_SHAPE, AS_DEFERRED,
    186      1.1  mrg   AS_ASSUMED_SIZE, AS_IMPLIED_SHAPE, AS_ASSUMED_RANK,
    187      1.1  mrg   AS_UNKNOWN
    188      1.1  mrg };
    189      1.1  mrg 
    190      1.1  mrg enum ar_type
    191      1.1  mrg { AR_FULL = 1, AR_ELEMENT, AR_SECTION, AR_UNKNOWN };
    192      1.1  mrg 
    193      1.1  mrg /* Statement label types. ST_LABEL_DO_TARGET is used for obsolescent warnings
    194      1.1  mrg    related to shared DO terminations and DO targets which are neither END DO
    195      1.1  mrg    nor CONTINUE; otherwise it is identical to ST_LABEL_TARGET.  */
    196      1.1  mrg enum gfc_sl_type
    197      1.1  mrg { ST_LABEL_UNKNOWN = 1, ST_LABEL_TARGET, ST_LABEL_DO_TARGET,
    198      1.1  mrg   ST_LABEL_BAD_TARGET, ST_LABEL_FORMAT
    199      1.1  mrg };
    200      1.1  mrg 
    201      1.1  mrg /* Intrinsic operators.  */
    202      1.1  mrg enum gfc_intrinsic_op
    203      1.1  mrg { GFC_INTRINSIC_BEGIN = 0,
    204      1.1  mrg   INTRINSIC_NONE = -1, INTRINSIC_UPLUS = GFC_INTRINSIC_BEGIN,
    205      1.1  mrg   INTRINSIC_UMINUS, INTRINSIC_PLUS, INTRINSIC_MINUS, INTRINSIC_TIMES,
    206      1.1  mrg   INTRINSIC_DIVIDE, INTRINSIC_POWER, INTRINSIC_CONCAT,
    207      1.1  mrg   INTRINSIC_AND, INTRINSIC_OR, INTRINSIC_EQV, INTRINSIC_NEQV,
    208      1.1  mrg   /* ==, /=, >, >=, <, <=  */
    209      1.1  mrg   INTRINSIC_EQ, INTRINSIC_NE, INTRINSIC_GT, INTRINSIC_GE,
    210      1.1  mrg   INTRINSIC_LT, INTRINSIC_LE,
    211      1.1  mrg   /* .EQ., .NE., .GT., .GE., .LT., .LE. (OS = Old-Style)  */
    212      1.1  mrg   INTRINSIC_EQ_OS, INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
    213      1.1  mrg   INTRINSIC_LT_OS, INTRINSIC_LE_OS,
    214      1.1  mrg   INTRINSIC_NOT, INTRINSIC_USER, INTRINSIC_ASSIGN, INTRINSIC_PARENTHESES,
    215      1.1  mrg   GFC_INTRINSIC_END, /* Sentinel */
    216      1.1  mrg   /* User defined derived type pseudo operators. These are set beyond the
    217      1.1  mrg      sentinel so that they are excluded from module_read and module_write.  */
    218      1.1  mrg   INTRINSIC_FORMATTED, INTRINSIC_UNFORMATTED
    219      1.1  mrg };
    220      1.1  mrg 
    221      1.1  mrg /* This macro is the number of intrinsic operators that exist.
    222      1.1  mrg    Assumptions are made about the numbering of the interface_op enums.  */
    223      1.1  mrg #define GFC_INTRINSIC_OPS GFC_INTRINSIC_END
    224      1.1  mrg 
    225      1.1  mrg /* Arithmetic results.  */
    226      1.1  mrg enum arith
    227      1.1  mrg { ARITH_OK = 1, ARITH_OVERFLOW, ARITH_UNDERFLOW, ARITH_NAN,
    228      1.1  mrg   ARITH_DIV0, ARITH_INCOMMENSURATE, ARITH_ASYMMETRIC, ARITH_PROHIBIT,
    229      1.1  mrg   ARITH_WRONGCONCAT
    230      1.1  mrg };
    231      1.1  mrg 
    232      1.1  mrg /* Statements.  */
    233      1.1  mrg enum gfc_statement
    234      1.1  mrg {
    235      1.1  mrg   ST_ARITHMETIC_IF, ST_ALLOCATE, ST_ATTR_DECL, ST_ASSOCIATE,
    236      1.1  mrg   ST_BACKSPACE, ST_BLOCK, ST_BLOCK_DATA,
    237      1.1  mrg   ST_CALL, ST_CASE, ST_CLOSE, ST_COMMON, ST_CONTINUE, ST_CONTAINS, ST_CYCLE,
    238      1.1  mrg   ST_DATA, ST_DATA_DECL, ST_DEALLOCATE, ST_DO, ST_ELSE, ST_ELSEIF,
    239      1.1  mrg   ST_ELSEWHERE, ST_END_ASSOCIATE, ST_END_BLOCK, ST_END_BLOCK_DATA,
    240      1.1  mrg   ST_ENDDO, ST_IMPLIED_ENDDO, ST_END_FILE, ST_FINAL, ST_FLUSH, ST_END_FORALL,
    241      1.1  mrg   ST_END_FUNCTION, ST_ENDIF, ST_END_INTERFACE, ST_END_MODULE, ST_END_SUBMODULE,
    242      1.1  mrg   ST_END_PROGRAM, ST_END_SELECT, ST_END_SUBROUTINE, ST_END_WHERE, ST_END_TYPE,
    243      1.1  mrg   ST_ENTRY, ST_EQUIVALENCE, ST_ERROR_STOP, ST_EXIT, ST_FORALL, ST_FORALL_BLOCK,
    244      1.1  mrg   ST_FORMAT, ST_FUNCTION, ST_GOTO, ST_IF_BLOCK, ST_IMPLICIT, ST_IMPLICIT_NONE,
    245      1.1  mrg   ST_IMPORT, ST_INQUIRE, ST_INTERFACE, ST_SYNC_ALL, ST_SYNC_MEMORY,
    246      1.1  mrg   ST_SYNC_IMAGES, ST_PARAMETER, ST_MODULE, ST_SUBMODULE, ST_MODULE_PROC,
    247      1.1  mrg   ST_NAMELIST, ST_NULLIFY, ST_OPEN, ST_PAUSE, ST_PRIVATE, ST_PROGRAM, ST_PUBLIC,
    248      1.1  mrg   ST_READ, ST_RETURN, ST_REWIND, ST_STOP, ST_SUBROUTINE, ST_TYPE, ST_USE,
    249      1.1  mrg   ST_WHERE_BLOCK, ST_WHERE, ST_WAIT, ST_WRITE, ST_ASSIGNMENT,
    250      1.1  mrg   ST_POINTER_ASSIGNMENT, ST_SELECT_CASE, ST_SEQUENCE, ST_SIMPLE_IF,
    251      1.1  mrg   ST_STATEMENT_FUNCTION, ST_DERIVED_DECL, ST_LABEL_ASSIGNMENT, ST_ENUM,
    252      1.1  mrg   ST_ENUMERATOR, ST_END_ENUM, ST_SELECT_TYPE, ST_TYPE_IS, ST_CLASS_IS,
    253  1.1.1.2  mrg   ST_SELECT_RANK, ST_RANK, ST_STRUCTURE_DECL, ST_END_STRUCTURE,
    254      1.1  mrg   ST_UNION, ST_END_UNION, ST_MAP, ST_END_MAP,
    255      1.1  mrg   ST_OACC_PARALLEL_LOOP, ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL,
    256      1.1  mrg   ST_OACC_END_PARALLEL, ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
    257      1.1  mrg   ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
    258      1.1  mrg   ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
    259      1.1  mrg   ST_OACC_CACHE, ST_OACC_KERNELS_LOOP, ST_OACC_END_KERNELS_LOOP,
    260  1.1.1.2  mrg   ST_OACC_SERIAL_LOOP, ST_OACC_END_SERIAL_LOOP, ST_OACC_SERIAL,
    261  1.1.1.2  mrg   ST_OACC_END_SERIAL, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA, ST_OACC_ROUTINE,
    262      1.1  mrg   ST_OACC_ATOMIC, ST_OACC_END_ATOMIC,
    263      1.1  mrg   ST_OMP_ATOMIC, ST_OMP_BARRIER, ST_OMP_CRITICAL, ST_OMP_END_ATOMIC,
    264      1.1  mrg   ST_OMP_END_CRITICAL, ST_OMP_END_DO, ST_OMP_END_MASTER, ST_OMP_END_ORDERED,
    265      1.1  mrg   ST_OMP_END_PARALLEL, ST_OMP_END_PARALLEL_DO, ST_OMP_END_PARALLEL_SECTIONS,
    266      1.1  mrg   ST_OMP_END_PARALLEL_WORKSHARE, ST_OMP_END_SECTIONS, ST_OMP_END_SINGLE,
    267      1.1  mrg   ST_OMP_END_WORKSHARE, ST_OMP_DO, ST_OMP_FLUSH, ST_OMP_MASTER, ST_OMP_ORDERED,
    268      1.1  mrg   ST_OMP_PARALLEL, ST_OMP_PARALLEL_DO, ST_OMP_PARALLEL_SECTIONS,
    269      1.1  mrg   ST_OMP_PARALLEL_WORKSHARE, ST_OMP_SECTIONS, ST_OMP_SECTION, ST_OMP_SINGLE,
    270      1.1  mrg   ST_OMP_THREADPRIVATE, ST_OMP_WORKSHARE, ST_OMP_TASK, ST_OMP_END_TASK,
    271      1.1  mrg   ST_OMP_TASKWAIT, ST_OMP_TASKYIELD, ST_OMP_CANCEL, ST_OMP_CANCELLATION_POINT,
    272      1.1  mrg   ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP, ST_OMP_SIMD, ST_OMP_END_SIMD,
    273      1.1  mrg   ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD, ST_OMP_PARALLEL_DO_SIMD,
    274      1.1  mrg   ST_OMP_END_PARALLEL_DO_SIMD, ST_OMP_DECLARE_SIMD, ST_OMP_DECLARE_REDUCTION,
    275      1.1  mrg   ST_OMP_TARGET, ST_OMP_END_TARGET, ST_OMP_TARGET_DATA, ST_OMP_END_TARGET_DATA,
    276  1.1.1.3  mrg   ST_OMP_TARGET_UPDATE, ST_OMP_DECLARE_TARGET, ST_OMP_DECLARE_VARIANT,
    277      1.1  mrg   ST_OMP_TEAMS, ST_OMP_END_TEAMS, ST_OMP_DISTRIBUTE, ST_OMP_END_DISTRIBUTE,
    278      1.1  mrg   ST_OMP_DISTRIBUTE_SIMD, ST_OMP_END_DISTRIBUTE_SIMD,
    279      1.1  mrg   ST_OMP_DISTRIBUTE_PARALLEL_DO, ST_OMP_END_DISTRIBUTE_PARALLEL_DO,
    280      1.1  mrg   ST_OMP_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_END_DISTRIBUTE_PARALLEL_DO_SIMD,
    281      1.1  mrg   ST_OMP_TARGET_TEAMS, ST_OMP_END_TARGET_TEAMS, ST_OMP_TEAMS_DISTRIBUTE,
    282      1.1  mrg   ST_OMP_END_TEAMS_DISTRIBUTE, ST_OMP_TEAMS_DISTRIBUTE_SIMD,
    283      1.1  mrg   ST_OMP_END_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE,
    284      1.1  mrg   ST_OMP_END_TARGET_TEAMS_DISTRIBUTE, ST_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
    285      1.1  mrg   ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
    286      1.1  mrg   ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO,
    287      1.1  mrg   ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
    288      1.1  mrg   ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
    289      1.1  mrg   ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
    290      1.1  mrg   ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
    291      1.1  mrg   ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
    292      1.1  mrg   ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
    293      1.1  mrg   ST_OMP_TARGET_PARALLEL, ST_OMP_END_TARGET_PARALLEL,
    294      1.1  mrg   ST_OMP_TARGET_PARALLEL_DO, ST_OMP_END_TARGET_PARALLEL_DO,
    295      1.1  mrg   ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_END_TARGET_PARALLEL_DO_SIMD,
    296      1.1  mrg   ST_OMP_TARGET_ENTER_DATA, ST_OMP_TARGET_EXIT_DATA,
    297      1.1  mrg   ST_OMP_TARGET_SIMD, ST_OMP_END_TARGET_SIMD,
    298  1.1.1.3  mrg   ST_OMP_TASKLOOP, ST_OMP_END_TASKLOOP, ST_OMP_SCAN, ST_OMP_DEPOBJ,
    299      1.1  mrg   ST_OMP_TASKLOOP_SIMD, ST_OMP_END_TASKLOOP_SIMD, ST_OMP_ORDERED_DEPEND,
    300  1.1.1.3  mrg   ST_OMP_REQUIRES, ST_PROCEDURE, ST_GENERIC, ST_CRITICAL, ST_END_CRITICAL,
    301      1.1  mrg   ST_GET_FCN_CHARACTERISTICS, ST_LOCK, ST_UNLOCK, ST_EVENT_POST,
    302      1.1  mrg   ST_EVENT_WAIT, ST_FAIL_IMAGE, ST_FORM_TEAM, ST_CHANGE_TEAM,
    303  1.1.1.3  mrg   ST_END_TEAM, ST_SYNC_TEAM,  ST_OMP_PARALLEL_MASTER,
    304  1.1.1.3  mrg   ST_OMP_END_PARALLEL_MASTER, ST_OMP_PARALLEL_MASTER_TASKLOOP,
    305  1.1.1.3  mrg   ST_OMP_END_PARALLEL_MASTER_TASKLOOP, ST_OMP_PARALLEL_MASTER_TASKLOOP_SIMD,
    306  1.1.1.3  mrg   ST_OMP_END_PARALLEL_MASTER_TASKLOOP_SIMD, ST_OMP_MASTER_TASKLOOP,
    307  1.1.1.3  mrg   ST_OMP_END_MASTER_TASKLOOP, ST_OMP_MASTER_TASKLOOP_SIMD,
    308  1.1.1.3  mrg   ST_OMP_END_MASTER_TASKLOOP_SIMD, ST_OMP_LOOP, ST_OMP_END_LOOP,
    309  1.1.1.3  mrg   ST_OMP_PARALLEL_LOOP, ST_OMP_END_PARALLEL_LOOP, ST_OMP_TEAMS_LOOP,
    310  1.1.1.3  mrg   ST_OMP_END_TEAMS_LOOP, ST_OMP_TARGET_PARALLEL_LOOP,
    311  1.1.1.3  mrg   ST_OMP_END_TARGET_PARALLEL_LOOP, ST_OMP_TARGET_TEAMS_LOOP,
    312  1.1.1.3  mrg   ST_OMP_END_TARGET_TEAMS_LOOP, ST_OMP_MASKED, ST_OMP_END_MASKED,
    313  1.1.1.3  mrg   ST_OMP_PARALLEL_MASKED, ST_OMP_END_PARALLEL_MASKED,
    314  1.1.1.3  mrg   ST_OMP_PARALLEL_MASKED_TASKLOOP, ST_OMP_END_PARALLEL_MASKED_TASKLOOP,
    315  1.1.1.3  mrg   ST_OMP_PARALLEL_MASKED_TASKLOOP_SIMD,
    316  1.1.1.3  mrg   ST_OMP_END_PARALLEL_MASKED_TASKLOOP_SIMD, ST_OMP_MASKED_TASKLOOP,
    317  1.1.1.3  mrg   ST_OMP_END_MASKED_TASKLOOP, ST_OMP_MASKED_TASKLOOP_SIMD,
    318  1.1.1.3  mrg   ST_OMP_END_MASKED_TASKLOOP_SIMD, ST_OMP_SCOPE, ST_OMP_END_SCOPE,
    319  1.1.1.3  mrg   ST_OMP_ERROR, ST_NONE
    320      1.1  mrg };
    321      1.1  mrg 
    322      1.1  mrg /* Types of interfaces that we can have.  Assignment interfaces are
    323      1.1  mrg    considered to be intrinsic operators.  */
    324      1.1  mrg enum interface_type
    325      1.1  mrg {
    326      1.1  mrg   INTERFACE_NAMELESS = 1, INTERFACE_GENERIC,
    327      1.1  mrg   INTERFACE_INTRINSIC_OP, INTERFACE_USER_OP, INTERFACE_ABSTRACT,
    328      1.1  mrg   INTERFACE_DTIO
    329      1.1  mrg };
    330      1.1  mrg 
    331      1.1  mrg /* Symbol flavors: these are all mutually exclusive.
    332      1.1  mrg    12 elements = 4 bits.  */
    333      1.1  mrg enum sym_flavor
    334      1.1  mrg {
    335      1.1  mrg   FL_UNKNOWN = 0, FL_PROGRAM, FL_BLOCK_DATA, FL_MODULE, FL_VARIABLE,
    336      1.1  mrg   FL_PARAMETER, FL_LABEL, FL_PROCEDURE, FL_DERIVED, FL_NAMELIST,
    337      1.1  mrg   FL_UNION, FL_STRUCT, FL_VOID
    338      1.1  mrg };
    339      1.1  mrg 
    340      1.1  mrg /* Procedure types.  7 elements = 3 bits.  */
    341      1.1  mrg enum procedure_type
    342      1.1  mrg { PROC_UNKNOWN, PROC_MODULE, PROC_INTERNAL, PROC_DUMMY,
    343      1.1  mrg   PROC_INTRINSIC, PROC_ST_FUNCTION, PROC_EXTERNAL
    344      1.1  mrg };
    345      1.1  mrg 
    346      1.1  mrg /* Intent types. Note that these values are also used in another enum in
    347  1.1.1.3  mrg    decl.cc (match_attr_spec).  */
    348      1.1  mrg enum sym_intent
    349      1.1  mrg { INTENT_UNKNOWN = 0, INTENT_IN, INTENT_OUT, INTENT_INOUT
    350      1.1  mrg };
    351      1.1  mrg 
    352      1.1  mrg /* Access types.  */
    353      1.1  mrg enum gfc_access
    354      1.1  mrg { ACCESS_UNKNOWN = 0, ACCESS_PUBLIC, ACCESS_PRIVATE
    355      1.1  mrg };
    356      1.1  mrg 
    357      1.1  mrg /* Flags to keep track of where an interface came from.
    358      1.1  mrg    3 elements = 2 bits.  */
    359      1.1  mrg enum ifsrc
    360      1.1  mrg { IFSRC_UNKNOWN = 0,	/* Interface unknown, only return type may be known.  */
    361      1.1  mrg   IFSRC_DECL,		/* FUNCTION or SUBROUTINE declaration.  */
    362      1.1  mrg   IFSRC_IFBODY		/* INTERFACE statement or PROCEDURE statement
    363      1.1  mrg 			   with explicit interface.  */
    364      1.1  mrg };
    365      1.1  mrg 
    366      1.1  mrg /* Whether a SAVE attribute was set explicitly or implicitly.  */
    367      1.1  mrg enum save_state
    368      1.1  mrg { SAVE_NONE = 0, SAVE_EXPLICIT, SAVE_IMPLICIT
    369      1.1  mrg };
    370      1.1  mrg 
    371      1.1  mrg /* OpenACC 'routine' directive's level of parallelism.  */
    372      1.1  mrg enum oacc_routine_lop
    373      1.1  mrg { OACC_ROUTINE_LOP_NONE = 0,
    374      1.1  mrg   OACC_ROUTINE_LOP_GANG,
    375      1.1  mrg   OACC_ROUTINE_LOP_WORKER,
    376      1.1  mrg   OACC_ROUTINE_LOP_VECTOR,
    377      1.1  mrg   OACC_ROUTINE_LOP_SEQ,
    378      1.1  mrg   OACC_ROUTINE_LOP_ERROR
    379      1.1  mrg };
    380      1.1  mrg 
    381      1.1  mrg /* Strings for all symbol attributes.  We use these for dumping the
    382      1.1  mrg    parse tree, in error messages, and also when reading and writing
    383  1.1.1.3  mrg    modules.  In symbol.cc.  */
    384      1.1  mrg extern const mstring flavors[];
    385      1.1  mrg extern const mstring procedures[];
    386      1.1  mrg extern const mstring intents[];
    387      1.1  mrg extern const mstring access_types[];
    388      1.1  mrg extern const mstring ifsrc_types[];
    389      1.1  mrg extern const mstring save_status[];
    390      1.1  mrg 
    391  1.1.1.3  mrg /* Strings for DTIO procedure names.  In symbol.cc.  */
    392      1.1  mrg extern const mstring dtio_procs[];
    393      1.1  mrg 
    394      1.1  mrg enum dtio_codes
    395      1.1  mrg { DTIO_RF = 0, DTIO_WF, DTIO_RUF, DTIO_WUF };
    396      1.1  mrg 
    397      1.1  mrg /* Enumeration of all the generic intrinsic functions.  Used by the
    398      1.1  mrg    backend for identification of a function.  */
    399      1.1  mrg 
    400      1.1  mrg enum gfc_isym_id
    401      1.1  mrg {
    402      1.1  mrg   /* GFC_ISYM_NONE is used for intrinsics which will never be seen by
    403      1.1  mrg      the backend (e.g. KIND).  */
    404      1.1  mrg   GFC_ISYM_NONE = 0,
    405      1.1  mrg   GFC_ISYM_ABORT,
    406      1.1  mrg   GFC_ISYM_ABS,
    407      1.1  mrg   GFC_ISYM_ACCESS,
    408      1.1  mrg   GFC_ISYM_ACHAR,
    409      1.1  mrg   GFC_ISYM_ACOS,
    410  1.1.1.2  mrg   GFC_ISYM_ACOSD,
    411      1.1  mrg   GFC_ISYM_ACOSH,
    412      1.1  mrg   GFC_ISYM_ADJUSTL,
    413      1.1  mrg   GFC_ISYM_ADJUSTR,
    414      1.1  mrg   GFC_ISYM_AIMAG,
    415      1.1  mrg   GFC_ISYM_AINT,
    416      1.1  mrg   GFC_ISYM_ALARM,
    417      1.1  mrg   GFC_ISYM_ALL,
    418      1.1  mrg   GFC_ISYM_ALLOCATED,
    419      1.1  mrg   GFC_ISYM_AND,
    420      1.1  mrg   GFC_ISYM_ANINT,
    421      1.1  mrg   GFC_ISYM_ANY,
    422      1.1  mrg   GFC_ISYM_ASIN,
    423  1.1.1.2  mrg   GFC_ISYM_ASIND,
    424      1.1  mrg   GFC_ISYM_ASINH,
    425      1.1  mrg   GFC_ISYM_ASSOCIATED,
    426      1.1  mrg   GFC_ISYM_ATAN,
    427      1.1  mrg   GFC_ISYM_ATAN2,
    428  1.1.1.2  mrg   GFC_ISYM_ATAN2D,
    429  1.1.1.2  mrg   GFC_ISYM_ATAND,
    430      1.1  mrg   GFC_ISYM_ATANH,
    431      1.1  mrg   GFC_ISYM_ATOMIC_ADD,
    432      1.1  mrg   GFC_ISYM_ATOMIC_AND,
    433      1.1  mrg   GFC_ISYM_ATOMIC_CAS,
    434      1.1  mrg   GFC_ISYM_ATOMIC_DEF,
    435      1.1  mrg   GFC_ISYM_ATOMIC_FETCH_ADD,
    436      1.1  mrg   GFC_ISYM_ATOMIC_FETCH_AND,
    437      1.1  mrg   GFC_ISYM_ATOMIC_FETCH_OR,
    438      1.1  mrg   GFC_ISYM_ATOMIC_FETCH_XOR,
    439      1.1  mrg   GFC_ISYM_ATOMIC_OR,
    440      1.1  mrg   GFC_ISYM_ATOMIC_REF,
    441      1.1  mrg   GFC_ISYM_ATOMIC_XOR,
    442      1.1  mrg   GFC_ISYM_BGE,
    443      1.1  mrg   GFC_ISYM_BGT,
    444      1.1  mrg   GFC_ISYM_BIT_SIZE,
    445      1.1  mrg   GFC_ISYM_BLE,
    446      1.1  mrg   GFC_ISYM_BLT,
    447      1.1  mrg   GFC_ISYM_BTEST,
    448      1.1  mrg   GFC_ISYM_CAF_GET,
    449      1.1  mrg   GFC_ISYM_CAF_SEND,
    450      1.1  mrg   GFC_ISYM_CEILING,
    451      1.1  mrg   GFC_ISYM_CHAR,
    452      1.1  mrg   GFC_ISYM_CHDIR,
    453      1.1  mrg   GFC_ISYM_CHMOD,
    454      1.1  mrg   GFC_ISYM_CMPLX,
    455      1.1  mrg   GFC_ISYM_CO_BROADCAST,
    456      1.1  mrg   GFC_ISYM_CO_MAX,
    457      1.1  mrg   GFC_ISYM_CO_MIN,
    458      1.1  mrg   GFC_ISYM_CO_REDUCE,
    459      1.1  mrg   GFC_ISYM_CO_SUM,
    460      1.1  mrg   GFC_ISYM_COMMAND_ARGUMENT_COUNT,
    461      1.1  mrg   GFC_ISYM_COMPILER_OPTIONS,
    462      1.1  mrg   GFC_ISYM_COMPILER_VERSION,
    463      1.1  mrg   GFC_ISYM_COMPLEX,
    464      1.1  mrg   GFC_ISYM_CONJG,
    465      1.1  mrg   GFC_ISYM_CONVERSION,
    466      1.1  mrg   GFC_ISYM_COS,
    467  1.1.1.2  mrg   GFC_ISYM_COSD,
    468      1.1  mrg   GFC_ISYM_COSH,
    469      1.1  mrg   GFC_ISYM_COTAN,
    470  1.1.1.2  mrg   GFC_ISYM_COTAND,
    471      1.1  mrg   GFC_ISYM_COUNT,
    472      1.1  mrg   GFC_ISYM_CPU_TIME,
    473      1.1  mrg   GFC_ISYM_CSHIFT,
    474      1.1  mrg   GFC_ISYM_CTIME,
    475      1.1  mrg   GFC_ISYM_C_ASSOCIATED,
    476      1.1  mrg   GFC_ISYM_C_F_POINTER,
    477      1.1  mrg   GFC_ISYM_C_F_PROCPOINTER,
    478      1.1  mrg   GFC_ISYM_C_FUNLOC,
    479      1.1  mrg   GFC_ISYM_C_LOC,
    480      1.1  mrg   GFC_ISYM_C_SIZEOF,
    481      1.1  mrg   GFC_ISYM_DATE_AND_TIME,
    482      1.1  mrg   GFC_ISYM_DBLE,
    483  1.1.1.2  mrg   GFC_ISYM_DFLOAT,
    484      1.1  mrg   GFC_ISYM_DIGITS,
    485      1.1  mrg   GFC_ISYM_DIM,
    486      1.1  mrg   GFC_ISYM_DOT_PRODUCT,
    487      1.1  mrg   GFC_ISYM_DPROD,
    488      1.1  mrg   GFC_ISYM_DSHIFTL,
    489      1.1  mrg   GFC_ISYM_DSHIFTR,
    490      1.1  mrg   GFC_ISYM_DTIME,
    491      1.1  mrg   GFC_ISYM_EOSHIFT,
    492      1.1  mrg   GFC_ISYM_EPSILON,
    493      1.1  mrg   GFC_ISYM_ERF,
    494      1.1  mrg   GFC_ISYM_ERFC,
    495      1.1  mrg   GFC_ISYM_ERFC_SCALED,
    496      1.1  mrg   GFC_ISYM_ETIME,
    497      1.1  mrg   GFC_ISYM_EVENT_QUERY,
    498      1.1  mrg   GFC_ISYM_EXECUTE_COMMAND_LINE,
    499      1.1  mrg   GFC_ISYM_EXIT,
    500      1.1  mrg   GFC_ISYM_EXP,
    501      1.1  mrg   GFC_ISYM_EXPONENT,
    502      1.1  mrg   GFC_ISYM_EXTENDS_TYPE_OF,
    503      1.1  mrg   GFC_ISYM_FAILED_IMAGES,
    504      1.1  mrg   GFC_ISYM_FDATE,
    505      1.1  mrg   GFC_ISYM_FE_RUNTIME_ERROR,
    506      1.1  mrg   GFC_ISYM_FGET,
    507      1.1  mrg   GFC_ISYM_FGETC,
    508      1.1  mrg   GFC_ISYM_FINDLOC,
    509  1.1.1.2  mrg   GFC_ISYM_FLOAT,
    510      1.1  mrg   GFC_ISYM_FLOOR,
    511      1.1  mrg   GFC_ISYM_FLUSH,
    512      1.1  mrg   GFC_ISYM_FNUM,
    513      1.1  mrg   GFC_ISYM_FPUT,
    514      1.1  mrg   GFC_ISYM_FPUTC,
    515      1.1  mrg   GFC_ISYM_FRACTION,
    516      1.1  mrg   GFC_ISYM_FREE,
    517      1.1  mrg   GFC_ISYM_FSEEK,
    518      1.1  mrg   GFC_ISYM_FSTAT,
    519      1.1  mrg   GFC_ISYM_FTELL,
    520      1.1  mrg   GFC_ISYM_TGAMMA,
    521      1.1  mrg   GFC_ISYM_GERROR,
    522      1.1  mrg   GFC_ISYM_GETARG,
    523      1.1  mrg   GFC_ISYM_GET_COMMAND,
    524      1.1  mrg   GFC_ISYM_GET_COMMAND_ARGUMENT,
    525      1.1  mrg   GFC_ISYM_GETCWD,
    526      1.1  mrg   GFC_ISYM_GETENV,
    527      1.1  mrg   GFC_ISYM_GET_ENVIRONMENT_VARIABLE,
    528      1.1  mrg   GFC_ISYM_GETGID,
    529      1.1  mrg   GFC_ISYM_GETLOG,
    530      1.1  mrg   GFC_ISYM_GETPID,
    531      1.1  mrg   GFC_ISYM_GET_TEAM,
    532      1.1  mrg   GFC_ISYM_GETUID,
    533      1.1  mrg   GFC_ISYM_GMTIME,
    534      1.1  mrg   GFC_ISYM_HOSTNM,
    535      1.1  mrg   GFC_ISYM_HUGE,
    536      1.1  mrg   GFC_ISYM_HYPOT,
    537      1.1  mrg   GFC_ISYM_IACHAR,
    538      1.1  mrg   GFC_ISYM_IALL,
    539      1.1  mrg   GFC_ISYM_IAND,
    540      1.1  mrg   GFC_ISYM_IANY,
    541      1.1  mrg   GFC_ISYM_IARGC,
    542      1.1  mrg   GFC_ISYM_IBCLR,
    543      1.1  mrg   GFC_ISYM_IBITS,
    544      1.1  mrg   GFC_ISYM_IBSET,
    545      1.1  mrg   GFC_ISYM_ICHAR,
    546      1.1  mrg   GFC_ISYM_IDATE,
    547      1.1  mrg   GFC_ISYM_IEOR,
    548      1.1  mrg   GFC_ISYM_IERRNO,
    549      1.1  mrg   GFC_ISYM_IMAGE_INDEX,
    550      1.1  mrg   GFC_ISYM_IMAGE_STATUS,
    551      1.1  mrg   GFC_ISYM_INDEX,
    552      1.1  mrg   GFC_ISYM_INT,
    553      1.1  mrg   GFC_ISYM_INT2,
    554      1.1  mrg   GFC_ISYM_INT8,
    555      1.1  mrg   GFC_ISYM_IOR,
    556      1.1  mrg   GFC_ISYM_IPARITY,
    557      1.1  mrg   GFC_ISYM_IRAND,
    558      1.1  mrg   GFC_ISYM_ISATTY,
    559      1.1  mrg   GFC_ISYM_IS_CONTIGUOUS,
    560      1.1  mrg   GFC_ISYM_IS_IOSTAT_END,
    561      1.1  mrg   GFC_ISYM_IS_IOSTAT_EOR,
    562      1.1  mrg   GFC_ISYM_ISNAN,
    563      1.1  mrg   GFC_ISYM_ISHFT,
    564      1.1  mrg   GFC_ISYM_ISHFTC,
    565      1.1  mrg   GFC_ISYM_ITIME,
    566      1.1  mrg   GFC_ISYM_J0,
    567      1.1  mrg   GFC_ISYM_J1,
    568      1.1  mrg   GFC_ISYM_JN,
    569      1.1  mrg   GFC_ISYM_JN2,
    570      1.1  mrg   GFC_ISYM_KILL,
    571      1.1  mrg   GFC_ISYM_KIND,
    572      1.1  mrg   GFC_ISYM_LBOUND,
    573      1.1  mrg   GFC_ISYM_LCOBOUND,
    574      1.1  mrg   GFC_ISYM_LEADZ,
    575      1.1  mrg   GFC_ISYM_LEN,
    576      1.1  mrg   GFC_ISYM_LEN_TRIM,
    577      1.1  mrg   GFC_ISYM_LGAMMA,
    578      1.1  mrg   GFC_ISYM_LGE,
    579      1.1  mrg   GFC_ISYM_LGT,
    580      1.1  mrg   GFC_ISYM_LINK,
    581      1.1  mrg   GFC_ISYM_LLE,
    582      1.1  mrg   GFC_ISYM_LLT,
    583      1.1  mrg   GFC_ISYM_LOC,
    584      1.1  mrg   GFC_ISYM_LOG,
    585      1.1  mrg   GFC_ISYM_LOG10,
    586      1.1  mrg   GFC_ISYM_LOGICAL,
    587      1.1  mrg   GFC_ISYM_LONG,
    588      1.1  mrg   GFC_ISYM_LSHIFT,
    589      1.1  mrg   GFC_ISYM_LSTAT,
    590      1.1  mrg   GFC_ISYM_LTIME,
    591      1.1  mrg   GFC_ISYM_MALLOC,
    592      1.1  mrg   GFC_ISYM_MASKL,
    593      1.1  mrg   GFC_ISYM_MASKR,
    594      1.1  mrg   GFC_ISYM_MATMUL,
    595      1.1  mrg   GFC_ISYM_MAX,
    596      1.1  mrg   GFC_ISYM_MAXEXPONENT,
    597      1.1  mrg   GFC_ISYM_MAXLOC,
    598      1.1  mrg   GFC_ISYM_MAXVAL,
    599      1.1  mrg   GFC_ISYM_MCLOCK,
    600      1.1  mrg   GFC_ISYM_MCLOCK8,
    601      1.1  mrg   GFC_ISYM_MERGE,
    602      1.1  mrg   GFC_ISYM_MERGE_BITS,
    603      1.1  mrg   GFC_ISYM_MIN,
    604      1.1  mrg   GFC_ISYM_MINEXPONENT,
    605      1.1  mrg   GFC_ISYM_MINLOC,
    606      1.1  mrg   GFC_ISYM_MINVAL,
    607      1.1  mrg   GFC_ISYM_MOD,
    608      1.1  mrg   GFC_ISYM_MODULO,
    609      1.1  mrg   GFC_ISYM_MOVE_ALLOC,
    610      1.1  mrg   GFC_ISYM_MVBITS,
    611      1.1  mrg   GFC_ISYM_NEAREST,
    612      1.1  mrg   GFC_ISYM_NEW_LINE,
    613      1.1  mrg   GFC_ISYM_NINT,
    614      1.1  mrg   GFC_ISYM_NORM2,
    615      1.1  mrg   GFC_ISYM_NOT,
    616      1.1  mrg   GFC_ISYM_NULL,
    617      1.1  mrg   GFC_ISYM_NUM_IMAGES,
    618      1.1  mrg   GFC_ISYM_OR,
    619      1.1  mrg   GFC_ISYM_PACK,
    620      1.1  mrg   GFC_ISYM_PARITY,
    621      1.1  mrg   GFC_ISYM_PERROR,
    622      1.1  mrg   GFC_ISYM_POPCNT,
    623      1.1  mrg   GFC_ISYM_POPPAR,
    624      1.1  mrg   GFC_ISYM_PRECISION,
    625      1.1  mrg   GFC_ISYM_PRESENT,
    626      1.1  mrg   GFC_ISYM_PRODUCT,
    627      1.1  mrg   GFC_ISYM_RADIX,
    628      1.1  mrg   GFC_ISYM_RAND,
    629      1.1  mrg   GFC_ISYM_RANDOM_INIT,
    630      1.1  mrg   GFC_ISYM_RANDOM_NUMBER,
    631      1.1  mrg   GFC_ISYM_RANDOM_SEED,
    632      1.1  mrg   GFC_ISYM_RANGE,
    633      1.1  mrg   GFC_ISYM_RANK,
    634      1.1  mrg   GFC_ISYM_REAL,
    635  1.1.1.2  mrg   GFC_ISYM_REALPART,
    636      1.1  mrg   GFC_ISYM_RENAME,
    637      1.1  mrg   GFC_ISYM_REPEAT,
    638      1.1  mrg   GFC_ISYM_RESHAPE,
    639      1.1  mrg   GFC_ISYM_RRSPACING,
    640      1.1  mrg   GFC_ISYM_RSHIFT,
    641      1.1  mrg   GFC_ISYM_SAME_TYPE_AS,
    642      1.1  mrg   GFC_ISYM_SC_KIND,
    643      1.1  mrg   GFC_ISYM_SCALE,
    644      1.1  mrg   GFC_ISYM_SCAN,
    645      1.1  mrg   GFC_ISYM_SECNDS,
    646      1.1  mrg   GFC_ISYM_SECOND,
    647      1.1  mrg   GFC_ISYM_SET_EXPONENT,
    648      1.1  mrg   GFC_ISYM_SHAPE,
    649      1.1  mrg   GFC_ISYM_SHIFTA,
    650      1.1  mrg   GFC_ISYM_SHIFTL,
    651      1.1  mrg   GFC_ISYM_SHIFTR,
    652      1.1  mrg   GFC_ISYM_BACKTRACE,
    653      1.1  mrg   GFC_ISYM_SIGN,
    654      1.1  mrg   GFC_ISYM_SIGNAL,
    655      1.1  mrg   GFC_ISYM_SI_KIND,
    656      1.1  mrg   GFC_ISYM_SIN,
    657  1.1.1.2  mrg   GFC_ISYM_SIND,
    658      1.1  mrg   GFC_ISYM_SINH,
    659      1.1  mrg   GFC_ISYM_SIZE,
    660      1.1  mrg   GFC_ISYM_SLEEP,
    661      1.1  mrg   GFC_ISYM_SIZEOF,
    662  1.1.1.2  mrg   GFC_ISYM_SNGL,
    663      1.1  mrg   GFC_ISYM_SPACING,
    664      1.1  mrg   GFC_ISYM_SPREAD,
    665      1.1  mrg   GFC_ISYM_SQRT,
    666      1.1  mrg   GFC_ISYM_SRAND,
    667      1.1  mrg   GFC_ISYM_SR_KIND,
    668      1.1  mrg   GFC_ISYM_STAT,
    669      1.1  mrg   GFC_ISYM_STOPPED_IMAGES,
    670      1.1  mrg   GFC_ISYM_STORAGE_SIZE,
    671      1.1  mrg   GFC_ISYM_STRIDE,
    672      1.1  mrg   GFC_ISYM_SUM,
    673      1.1  mrg   GFC_ISYM_SYMLINK,
    674      1.1  mrg   GFC_ISYM_SYMLNK,
    675      1.1  mrg   GFC_ISYM_SYSTEM,
    676      1.1  mrg   GFC_ISYM_SYSTEM_CLOCK,
    677      1.1  mrg   GFC_ISYM_TAN,
    678  1.1.1.2  mrg   GFC_ISYM_TAND,
    679      1.1  mrg   GFC_ISYM_TANH,
    680      1.1  mrg   GFC_ISYM_TEAM_NUMBER,
    681      1.1  mrg   GFC_ISYM_THIS_IMAGE,
    682      1.1  mrg   GFC_ISYM_TIME,
    683      1.1  mrg   GFC_ISYM_TIME8,
    684      1.1  mrg   GFC_ISYM_TINY,
    685      1.1  mrg   GFC_ISYM_TRAILZ,
    686      1.1  mrg   GFC_ISYM_TRANSFER,
    687      1.1  mrg   GFC_ISYM_TRANSPOSE,
    688      1.1  mrg   GFC_ISYM_TRIM,
    689      1.1  mrg   GFC_ISYM_TTYNAM,
    690      1.1  mrg   GFC_ISYM_UBOUND,
    691      1.1  mrg   GFC_ISYM_UCOBOUND,
    692      1.1  mrg   GFC_ISYM_UMASK,
    693      1.1  mrg   GFC_ISYM_UNLINK,
    694      1.1  mrg   GFC_ISYM_UNPACK,
    695      1.1  mrg   GFC_ISYM_VERIFY,
    696      1.1  mrg   GFC_ISYM_XOR,
    697      1.1  mrg   GFC_ISYM_Y0,
    698      1.1  mrg   GFC_ISYM_Y1,
    699      1.1  mrg   GFC_ISYM_YN,
    700      1.1  mrg   GFC_ISYM_YN2
    701      1.1  mrg };
    702      1.1  mrg 
    703      1.1  mrg enum init_local_logical
    704      1.1  mrg {
    705      1.1  mrg   GFC_INIT_LOGICAL_OFF = 0,
    706      1.1  mrg   GFC_INIT_LOGICAL_FALSE,
    707      1.1  mrg   GFC_INIT_LOGICAL_TRUE
    708      1.1  mrg };
    709      1.1  mrg 
    710      1.1  mrg enum init_local_character
    711      1.1  mrg {
    712      1.1  mrg   GFC_INIT_CHARACTER_OFF = 0,
    713      1.1  mrg   GFC_INIT_CHARACTER_ON
    714      1.1  mrg };
    715      1.1  mrg 
    716      1.1  mrg enum init_local_integer
    717      1.1  mrg {
    718      1.1  mrg   GFC_INIT_INTEGER_OFF = 0,
    719      1.1  mrg   GFC_INIT_INTEGER_ON
    720      1.1  mrg };
    721      1.1  mrg 
    722      1.1  mrg enum gfc_reverse
    723      1.1  mrg {
    724      1.1  mrg   GFC_ENABLE_REVERSE,
    725      1.1  mrg   GFC_FORWARD_SET,
    726      1.1  mrg   GFC_REVERSE_SET,
    727      1.1  mrg   GFC_INHIBIT_REVERSE
    728      1.1  mrg };
    729      1.1  mrg 
    730      1.1  mrg enum gfc_param_spec_type
    731      1.1  mrg {
    732      1.1  mrg   SPEC_EXPLICIT,
    733      1.1  mrg   SPEC_ASSUMED,
    734      1.1  mrg   SPEC_DEFERRED
    735      1.1  mrg };
    736      1.1  mrg 
    737      1.1  mrg /************************* Structures *****************************/
    738      1.1  mrg 
    739      1.1  mrg /* Used for keeping things in balanced binary trees.  */
    740      1.1  mrg #define BBT_HEADER(self) int priority; struct self *left, *right
    741      1.1  mrg 
    742      1.1  mrg #define NAMED_INTCST(a,b,c,d) a,
    743      1.1  mrg #define NAMED_KINDARRAY(a,b,c,d) a,
    744      1.1  mrg #define NAMED_FUNCTION(a,b,c,d) a,
    745      1.1  mrg #define NAMED_SUBROUTINE(a,b,c,d) a,
    746      1.1  mrg #define NAMED_DERIVED_TYPE(a,b,c,d) a,
    747      1.1  mrg enum iso_fortran_env_symbol
    748      1.1  mrg {
    749      1.1  mrg   ISOFORTRANENV_INVALID = -1,
    750      1.1  mrg #include "iso-fortran-env.def"
    751      1.1  mrg   ISOFORTRANENV_LAST, ISOFORTRANENV_NUMBER = ISOFORTRANENV_LAST
    752      1.1  mrg };
    753      1.1  mrg #undef NAMED_INTCST
    754      1.1  mrg #undef NAMED_KINDARRAY
    755      1.1  mrg #undef NAMED_FUNCTION
    756      1.1  mrg #undef NAMED_SUBROUTINE
    757      1.1  mrg #undef NAMED_DERIVED_TYPE
    758      1.1  mrg 
    759      1.1  mrg #define NAMED_INTCST(a,b,c,d) a,
    760      1.1  mrg #define NAMED_REALCST(a,b,c,d) a,
    761      1.1  mrg #define NAMED_CMPXCST(a,b,c,d) a,
    762      1.1  mrg #define NAMED_LOGCST(a,b,c) a,
    763      1.1  mrg #define NAMED_CHARKNDCST(a,b,c) a,
    764      1.1  mrg #define NAMED_CHARCST(a,b,c) a,
    765      1.1  mrg #define DERIVED_TYPE(a,b,c) a,
    766      1.1  mrg #define NAMED_FUNCTION(a,b,c,d) a,
    767      1.1  mrg #define NAMED_SUBROUTINE(a,b,c,d) a,
    768      1.1  mrg enum iso_c_binding_symbol
    769      1.1  mrg {
    770      1.1  mrg   ISOCBINDING_INVALID = -1,
    771      1.1  mrg #include "iso-c-binding.def"
    772      1.1  mrg   ISOCBINDING_LAST,
    773      1.1  mrg   ISOCBINDING_NUMBER = ISOCBINDING_LAST
    774      1.1  mrg };
    775      1.1  mrg #undef NAMED_INTCST
    776      1.1  mrg #undef NAMED_REALCST
    777      1.1  mrg #undef NAMED_CMPXCST
    778      1.1  mrg #undef NAMED_LOGCST
    779      1.1  mrg #undef NAMED_CHARKNDCST
    780      1.1  mrg #undef NAMED_CHARCST
    781      1.1  mrg #undef DERIVED_TYPE
    782      1.1  mrg #undef NAMED_FUNCTION
    783      1.1  mrg #undef NAMED_SUBROUTINE
    784      1.1  mrg 
    785      1.1  mrg enum intmod_id
    786      1.1  mrg {
    787      1.1  mrg   INTMOD_NONE = 0, INTMOD_ISO_FORTRAN_ENV, INTMOD_ISO_C_BINDING,
    788      1.1  mrg   INTMOD_IEEE_FEATURES, INTMOD_IEEE_EXCEPTIONS, INTMOD_IEEE_ARITHMETIC
    789      1.1  mrg };
    790      1.1  mrg 
    791      1.1  mrg typedef struct
    792      1.1  mrg {
    793      1.1  mrg   char name[GFC_MAX_SYMBOL_LEN + 1];
    794      1.1  mrg   int value;  /* Used for both integer and character values.  */
    795      1.1  mrg   bt f90_type;
    796      1.1  mrg }
    797      1.1  mrg CInteropKind_t;
    798      1.1  mrg 
    799      1.1  mrg /* Array of structs, where the structs represent the C interop kinds.
    800      1.1  mrg    The list will be implemented based on a hash of the kind name since
    801      1.1  mrg    these could be accessed multiple times.
    802  1.1.1.3  mrg    Declared in trans-types.cc as a global, since it's in that file
    803      1.1  mrg    that the list is initialized.  */
    804      1.1  mrg extern CInteropKind_t c_interop_kinds_table[];
    805      1.1  mrg 
    806  1.1.1.3  mrg enum gfc_omp_device_type
    807  1.1.1.3  mrg {
    808  1.1.1.3  mrg   OMP_DEVICE_TYPE_UNSET,
    809  1.1.1.3  mrg   OMP_DEVICE_TYPE_HOST,
    810  1.1.1.3  mrg   OMP_DEVICE_TYPE_NOHOST,
    811  1.1.1.3  mrg   OMP_DEVICE_TYPE_ANY
    812  1.1.1.3  mrg };
    813  1.1.1.3  mrg 
    814  1.1.1.3  mrg enum gfc_omp_severity_type
    815  1.1.1.3  mrg {
    816  1.1.1.3  mrg   OMP_SEVERITY_UNSET,
    817  1.1.1.3  mrg   OMP_SEVERITY_WARNING,
    818  1.1.1.3  mrg   OMP_SEVERITY_FATAL
    819  1.1.1.3  mrg };
    820  1.1.1.3  mrg 
    821  1.1.1.3  mrg enum gfc_omp_at_type
    822  1.1.1.3  mrg {
    823  1.1.1.3  mrg   OMP_AT_UNSET,
    824  1.1.1.3  mrg   OMP_AT_COMPILATION,
    825  1.1.1.3  mrg   OMP_AT_EXECUTION
    826  1.1.1.3  mrg };
    827      1.1  mrg 
    828      1.1  mrg /* Structure and list of supported extension attributes.  */
    829      1.1  mrg typedef enum
    830      1.1  mrg {
    831      1.1  mrg   EXT_ATTR_DLLIMPORT = 0,
    832      1.1  mrg   EXT_ATTR_DLLEXPORT,
    833      1.1  mrg   EXT_ATTR_STDCALL,
    834      1.1  mrg   EXT_ATTR_CDECL,
    835      1.1  mrg   EXT_ATTR_FASTCALL,
    836      1.1  mrg   EXT_ATTR_NO_ARG_CHECK,
    837  1.1.1.3  mrg   EXT_ATTR_DEPRECATED,
    838      1.1  mrg   EXT_ATTR_LAST, EXT_ATTR_NUM = EXT_ATTR_LAST
    839      1.1  mrg }
    840      1.1  mrg ext_attr_id_t;
    841      1.1  mrg 
    842      1.1  mrg typedef struct
    843      1.1  mrg {
    844      1.1  mrg   const char *name;
    845      1.1  mrg   unsigned id;
    846      1.1  mrg   const char *middle_end_name;
    847      1.1  mrg }
    848      1.1  mrg ext_attr_t;
    849      1.1  mrg 
    850      1.1  mrg extern const ext_attr_t ext_attr_list[];
    851      1.1  mrg 
    852      1.1  mrg /* Symbol attribute structure.  */
    853      1.1  mrg typedef struct
    854      1.1  mrg {
    855      1.1  mrg   /* Variable attributes.  */
    856      1.1  mrg   unsigned allocatable:1, dimension:1, codimension:1, external:1, intrinsic:1,
    857      1.1  mrg     optional:1, pointer:1, target:1, value:1, volatile_:1, temporary:1,
    858      1.1  mrg     dummy:1, result:1, assign:1, threadprivate:1, not_always_present:1,
    859      1.1  mrg     implied_index:1, subref_array_pointer:1, proc_pointer:1, asynchronous:1,
    860      1.1  mrg     contiguous:1, fe_temp: 1, automatic: 1;
    861      1.1  mrg 
    862      1.1  mrg   /* For CLASS containers, the pointer attribute is sometimes set internally
    863      1.1  mrg      even though it was not directly specified.  In this case, keep the
    864      1.1  mrg      "real" (original) value here.  */
    865      1.1  mrg   unsigned class_pointer:1;
    866      1.1  mrg 
    867      1.1  mrg   ENUM_BITFIELD (save_state) save:2;
    868      1.1  mrg 
    869      1.1  mrg   unsigned data:1,		/* Symbol is named in a DATA statement.  */
    870      1.1  mrg     is_protected:1,		/* Symbol has been marked as protected.  */
    871      1.1  mrg     use_assoc:1,		/* Symbol has been use-associated.  */
    872      1.1  mrg     used_in_submodule:1,	/* Symbol has been use-associated in a
    873      1.1  mrg 				   submodule. Needed since these entities must
    874      1.1  mrg 				   be set host associated to be compliant.  */
    875      1.1  mrg     use_only:1,			/* Symbol has been use-associated, with ONLY.  */
    876      1.1  mrg     use_rename:1,		/* Symbol has been use-associated and renamed.  */
    877      1.1  mrg     imported:1,			/* Symbol has been associated by IMPORT.  */
    878      1.1  mrg     host_assoc:1;		/* Symbol has been host associated.  */
    879      1.1  mrg 
    880      1.1  mrg   unsigned in_namelist:1, in_common:1, in_equivalence:1;
    881      1.1  mrg   unsigned function:1, subroutine:1, procedure:1;
    882      1.1  mrg   unsigned generic:1, generic_copy:1;
    883      1.1  mrg   unsigned implicit_type:1;	/* Type defined via implicit rules.  */
    884      1.1  mrg   unsigned untyped:1;		/* No implicit type could be found.  */
    885      1.1  mrg 
    886      1.1  mrg   unsigned is_bind_c:1;		/* say if is bound to C.  */
    887      1.1  mrg   unsigned extension:8;		/* extension level of a derived type.  */
    888      1.1  mrg   unsigned is_class:1;		/* is a CLASS container.  */
    889      1.1  mrg   unsigned class_ok:1;		/* is a CLASS object with correct attributes.  */
    890      1.1  mrg   unsigned vtab:1;		/* is a derived type vtab, pointed to by CLASS objects.  */
    891      1.1  mrg   unsigned vtype:1;		/* is a derived type of a vtab.  */
    892      1.1  mrg 
    893      1.1  mrg   /* These flags are both in the typespec and attribute.  The attribute
    894      1.1  mrg      list is what gets read from/written to a module file.  The typespec
    895      1.1  mrg      is created from a decl being processed.  */
    896      1.1  mrg   unsigned is_c_interop:1;	/* It's c interoperable.  */
    897      1.1  mrg   unsigned is_iso_c:1;		/* Symbol is from iso_c_binding.  */
    898      1.1  mrg 
    899      1.1  mrg   /* Function/subroutine attributes */
    900      1.1  mrg   unsigned sequence:1, elemental:1, pure:1, recursive:1;
    901      1.1  mrg   unsigned unmaskable:1, masked:1, contained:1, mod_proc:1, abstract:1;
    902      1.1  mrg 
    903      1.1  mrg   /* Set if this is a module function or subroutine. Note that it is an
    904      1.1  mrg      attribute because it appears as a prefix in the declaration like
    905      1.1  mrg      PURE, etc..  */
    906      1.1  mrg   unsigned module_procedure:1;
    907      1.1  mrg 
    908      1.1  mrg   /* Set if a (public) symbol [e.g. generic name] exposes this symbol,
    909      1.1  mrg      which is relevant for private module procedures.  */
    910      1.1  mrg   unsigned public_used:1;
    911      1.1  mrg 
    912      1.1  mrg   /* This is set if a contained procedure could be declared pure.  This is
    913      1.1  mrg      used for certain optimizations that require the result or arguments
    914      1.1  mrg      cannot alias.  Note that this is zero for PURE procedures.  */
    915      1.1  mrg   unsigned implicit_pure:1;
    916      1.1  mrg 
    917      1.1  mrg   /* This is set for a procedure that contains expressions referencing
    918      1.1  mrg      arrays coming from outside its namespace.
    919      1.1  mrg      This is used to force the creation of a temporary when the LHS of
    920      1.1  mrg      an array assignment may be used by an elemental procedure appearing
    921      1.1  mrg      on the RHS.  */
    922      1.1  mrg   unsigned array_outer_dependency:1;
    923      1.1  mrg 
    924      1.1  mrg   /* This is set if the subroutine doesn't return.  Currently, this
    925      1.1  mrg      is only possible for intrinsic subroutines.  */
    926      1.1  mrg   unsigned noreturn:1;
    927      1.1  mrg 
    928      1.1  mrg   /* Set if this procedure is an alternate entry point.  These procedures
    929      1.1  mrg      don't have any code associated, and the backend will turn them into
    930      1.1  mrg      thunks to the master function.  */
    931      1.1  mrg   unsigned entry:1;
    932      1.1  mrg 
    933      1.1  mrg   /* Set if this is the master function for a procedure with multiple
    934      1.1  mrg      entry points.  */
    935      1.1  mrg   unsigned entry_master:1;
    936      1.1  mrg 
    937      1.1  mrg   /* Set if this is the master function for a function with multiple
    938      1.1  mrg      entry points where characteristics of the entry points differ.  */
    939      1.1  mrg   unsigned mixed_entry_master:1;
    940      1.1  mrg 
    941      1.1  mrg   /* Set if a function must always be referenced by an explicit interface.  */
    942      1.1  mrg   unsigned always_explicit:1;
    943      1.1  mrg 
    944      1.1  mrg   /* Set if the symbol is generated and, hence, standard violations
    945      1.1  mrg      shouldn't be flaged.  */
    946      1.1  mrg   unsigned artificial:1;
    947      1.1  mrg 
    948      1.1  mrg   /* Set if the symbol has been referenced in an expression.  No further
    949      1.1  mrg      modification of type or type parameters is permitted.  */
    950      1.1  mrg   unsigned referenced:1;
    951      1.1  mrg 
    952      1.1  mrg   /* Set if this is the symbol for the main program.  */
    953      1.1  mrg   unsigned is_main_program:1;
    954      1.1  mrg 
    955      1.1  mrg   /* Mutually exclusive multibit attributes.  */
    956      1.1  mrg   ENUM_BITFIELD (gfc_access) access:2;
    957      1.1  mrg   ENUM_BITFIELD (sym_intent) intent:2;
    958      1.1  mrg   ENUM_BITFIELD (sym_flavor) flavor:4;
    959      1.1  mrg   ENUM_BITFIELD (ifsrc) if_source:2;
    960      1.1  mrg 
    961      1.1  mrg   ENUM_BITFIELD (procedure_type) proc:3;
    962      1.1  mrg 
    963      1.1  mrg   /* Special attributes for Cray pointers, pointees.  */
    964      1.1  mrg   unsigned cray_pointer:1, cray_pointee:1;
    965      1.1  mrg 
    966      1.1  mrg   /* The symbol is a derived type with allocatable components, pointer
    967      1.1  mrg      components or private components, procedure pointer components,
    968      1.1  mrg      possibly nested.  zero_comp is true if the derived type has no
    969      1.1  mrg      component at all.  defined_assign_comp is true if the derived
    970      1.1  mrg      type or a (sub-)component has a typebound defined assignment.
    971      1.1  mrg      unlimited_polymorphic flags the type of the container for these
    972      1.1  mrg      entities.  */
    973      1.1  mrg   unsigned alloc_comp:1, pointer_comp:1, proc_pointer_comp:1,
    974      1.1  mrg 	   private_comp:1, zero_comp:1, coarray_comp:1, lock_comp:1,
    975      1.1  mrg 	   event_comp:1, defined_assign_comp:1, unlimited_polymorphic:1,
    976      1.1  mrg 	   has_dtio_procs:1, caf_token:1;
    977      1.1  mrg 
    978  1.1.1.2  mrg   /* This is a temporary selector for SELECT TYPE/RANK or an associate
    979  1.1.1.2  mrg      variable for SELECT TYPE/RANK or ASSOCIATE.  */
    980  1.1.1.2  mrg   unsigned select_type_temporary:1, select_rank_temporary:1, associate_var:1;
    981      1.1  mrg 
    982      1.1  mrg   /* These are the attributes required for parameterized derived
    983      1.1  mrg      types.  */
    984      1.1  mrg   unsigned pdt_kind:1, pdt_len:1, pdt_type:1, pdt_template:1,
    985      1.1  mrg 	   pdt_array:1, pdt_string:1;
    986      1.1  mrg 
    987      1.1  mrg   /* This is omp_{out,in,priv,orig} artificial variable in
    988      1.1  mrg      !$OMP DECLARE REDUCTION.  */
    989      1.1  mrg   unsigned omp_udr_artificial_var:1;
    990      1.1  mrg 
    991      1.1  mrg   /* Mentioned in OMP DECLARE TARGET.  */
    992      1.1  mrg   unsigned omp_declare_target:1;
    993      1.1  mrg   unsigned omp_declare_target_link:1;
    994  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_device_type) omp_device_type:2;
    995      1.1  mrg 
    996      1.1  mrg   /* Mentioned in OACC DECLARE.  */
    997      1.1  mrg   unsigned oacc_declare_create:1;
    998      1.1  mrg   unsigned oacc_declare_copyin:1;
    999      1.1  mrg   unsigned oacc_declare_deviceptr:1;
   1000      1.1  mrg   unsigned oacc_declare_device_resident:1;
   1001      1.1  mrg   unsigned oacc_declare_link:1;
   1002      1.1  mrg 
   1003      1.1  mrg   /* OpenACC 'routine' directive's level of parallelism.  */
   1004      1.1  mrg   ENUM_BITFIELD (oacc_routine_lop) oacc_routine_lop:3;
   1005  1.1.1.3  mrg   unsigned oacc_routine_nohost:1;
   1006      1.1  mrg 
   1007      1.1  mrg   /* Attributes set by compiler extensions (!GCC$ ATTRIBUTES).  */
   1008      1.1  mrg   unsigned ext_attr:EXT_ATTR_NUM;
   1009      1.1  mrg 
   1010      1.1  mrg   /* The namespace where the attribute has been set.  */
   1011      1.1  mrg   struct gfc_namespace *volatile_ns, *asynchronous_ns;
   1012      1.1  mrg }
   1013      1.1  mrg symbol_attribute;
   1014      1.1  mrg 
   1015      1.1  mrg 
   1016      1.1  mrg /* We need to store source lines as sequences of multibyte source
   1017      1.1  mrg    characters. We define here a type wide enough to hold any multibyte
   1018      1.1  mrg    source character, just like libcpp does.  A 32-bit type is enough.  */
   1019      1.1  mrg 
   1020      1.1  mrg #if HOST_BITS_PER_INT >= 32
   1021      1.1  mrg typedef unsigned int gfc_char_t;
   1022      1.1  mrg #elif HOST_BITS_PER_LONG >= 32
   1023      1.1  mrg typedef unsigned long gfc_char_t;
   1024      1.1  mrg #elif defined(HAVE_LONG_LONG) && (HOST_BITS_PER_LONGLONG >= 32)
   1025      1.1  mrg typedef unsigned long long gfc_char_t;
   1026      1.1  mrg #else
   1027      1.1  mrg # error "Cannot find an integer type with at least 32 bits"
   1028      1.1  mrg #endif
   1029      1.1  mrg 
   1030      1.1  mrg 
   1031      1.1  mrg /* The following three structures are used to identify a location in
   1032      1.1  mrg    the sources.
   1033      1.1  mrg 
   1034      1.1  mrg    gfc_file is used to maintain a tree of the source files and how
   1035      1.1  mrg    they include each other
   1036      1.1  mrg 
   1037      1.1  mrg    gfc_linebuf holds a single line of source code and information
   1038      1.1  mrg    which file it resides in
   1039      1.1  mrg 
   1040      1.1  mrg    locus point to the sourceline and the character in the source
   1041      1.1  mrg    line.
   1042      1.1  mrg */
   1043      1.1  mrg 
   1044      1.1  mrg typedef struct gfc_file
   1045      1.1  mrg {
   1046      1.1  mrg   struct gfc_file *next, *up;
   1047      1.1  mrg   int inclusion_line, line;
   1048      1.1  mrg   char *filename;
   1049      1.1  mrg } gfc_file;
   1050      1.1  mrg 
   1051      1.1  mrg typedef struct gfc_linebuf
   1052      1.1  mrg {
   1053      1.1  mrg   location_t location;
   1054      1.1  mrg   struct gfc_file *file;
   1055      1.1  mrg   struct gfc_linebuf *next;
   1056      1.1  mrg 
   1057      1.1  mrg   int truncated;
   1058      1.1  mrg   bool dbg_emitted;
   1059      1.1  mrg 
   1060      1.1  mrg   gfc_char_t line[1];
   1061      1.1  mrg } gfc_linebuf;
   1062      1.1  mrg 
   1063      1.1  mrg #define gfc_linebuf_header_size (offsetof (gfc_linebuf, line))
   1064      1.1  mrg 
   1065      1.1  mrg #define gfc_linebuf_linenum(LBUF) (LOCATION_LINE ((LBUF)->location))
   1066      1.1  mrg 
   1067      1.1  mrg typedef struct
   1068      1.1  mrg {
   1069      1.1  mrg   gfc_char_t *nextc;
   1070      1.1  mrg   gfc_linebuf *lb;
   1071      1.1  mrg } locus;
   1072      1.1  mrg 
   1073      1.1  mrg /* In order for the "gfc" format checking to work correctly, you must
   1074      1.1  mrg    have declared a typedef locus first.  */
   1075      1.1  mrg #if GCC_VERSION >= 4001
   1076      1.1  mrg #define ATTRIBUTE_GCC_GFC(m, n) __attribute__ ((__format__ (__gcc_gfc__, m, n))) ATTRIBUTE_NONNULL(m)
   1077      1.1  mrg #else
   1078      1.1  mrg #define ATTRIBUTE_GCC_GFC(m, n) ATTRIBUTE_NONNULL(m)
   1079      1.1  mrg #endif
   1080      1.1  mrg 
   1081      1.1  mrg 
   1082      1.1  mrg /* Suppress error messages or re-enable them.  */
   1083      1.1  mrg 
   1084      1.1  mrg void gfc_push_suppress_errors (void);
   1085      1.1  mrg void gfc_pop_suppress_errors (void);
   1086  1.1.1.3  mrg bool gfc_query_suppress_errors (void);
   1087      1.1  mrg 
   1088      1.1  mrg 
   1089      1.1  mrg /* Character length structures hold the expression that gives the
   1090      1.1  mrg    length of a character variable.  We avoid putting these into
   1091      1.1  mrg    gfc_typespec because doing so prevents us from doing structure
   1092      1.1  mrg    copies and forces us to deallocate any typespecs we create, as well
   1093      1.1  mrg    as structures that contain typespecs.  They also can have multiple
   1094      1.1  mrg    character typespecs pointing to them.
   1095      1.1  mrg 
   1096      1.1  mrg    These structures form a singly linked list within the current
   1097      1.1  mrg    namespace and are deallocated with the namespace.  It is possible to
   1098      1.1  mrg    end up with gfc_charlen structures that have nothing pointing to them.  */
   1099      1.1  mrg 
   1100      1.1  mrg typedef struct gfc_charlen
   1101      1.1  mrg {
   1102      1.1  mrg   struct gfc_expr *length;
   1103      1.1  mrg   struct gfc_charlen *next;
   1104      1.1  mrg   bool length_from_typespec; /* Length from explicit array ctor typespec?  */
   1105      1.1  mrg   tree backend_decl;
   1106      1.1  mrg   tree passed_length; /* Length argument explicitly passed.  */
   1107      1.1  mrg 
   1108      1.1  mrg   int resolved;
   1109      1.1  mrg }
   1110      1.1  mrg gfc_charlen;
   1111      1.1  mrg 
   1112      1.1  mrg #define gfc_get_charlen() XCNEW (gfc_charlen)
   1113      1.1  mrg 
   1114      1.1  mrg /* Type specification structure.  */
   1115      1.1  mrg typedef struct
   1116      1.1  mrg {
   1117      1.1  mrg   bt type;
   1118      1.1  mrg   int kind;
   1119      1.1  mrg 
   1120      1.1  mrg   union
   1121      1.1  mrg   {
   1122      1.1  mrg     struct gfc_symbol *derived;	/* For derived types only.  */
   1123      1.1  mrg     gfc_charlen *cl;		/* For character types only.  */
   1124      1.1  mrg     int pad;			/* For hollerith types only.  */
   1125      1.1  mrg   }
   1126      1.1  mrg   u;
   1127      1.1  mrg 
   1128      1.1  mrg   struct gfc_symbol *interface;	/* For PROCEDURE declarations.  */
   1129      1.1  mrg   int is_c_interop;
   1130      1.1  mrg   int is_iso_c;
   1131      1.1  mrg   bt f90_type;
   1132      1.1  mrg   bool deferred;
   1133      1.1  mrg   gfc_symbol *interop_kind;
   1134      1.1  mrg }
   1135      1.1  mrg gfc_typespec;
   1136      1.1  mrg 
   1137      1.1  mrg /* Array specification.  */
   1138      1.1  mrg typedef struct
   1139      1.1  mrg {
   1140      1.1  mrg   int rank;	/* A scalar has a rank of 0, an assumed-rank array has -1.  */
   1141      1.1  mrg   int corank;
   1142      1.1  mrg   array_type type, cotype;
   1143      1.1  mrg   struct gfc_expr *lower[GFC_MAX_DIMENSIONS], *upper[GFC_MAX_DIMENSIONS];
   1144      1.1  mrg 
   1145      1.1  mrg   /* These two fields are used with the Cray Pointer extension.  */
   1146      1.1  mrg   bool cray_pointee; /* True iff this spec belongs to a cray pointee.  */
   1147      1.1  mrg   bool cp_was_assumed; /* AS_ASSUMED_SIZE cp arrays are converted to
   1148      1.1  mrg 			AS_EXPLICIT, but we want to remember that we
   1149      1.1  mrg 			did this.  */
   1150      1.1  mrg 
   1151      1.1  mrg   bool resolved;
   1152      1.1  mrg }
   1153      1.1  mrg gfc_array_spec;
   1154      1.1  mrg 
   1155      1.1  mrg #define gfc_get_array_spec() XCNEW (gfc_array_spec)
   1156      1.1  mrg 
   1157      1.1  mrg 
   1158      1.1  mrg /* Components of derived types.  */
   1159      1.1  mrg typedef struct gfc_component
   1160      1.1  mrg {
   1161      1.1  mrg   const char *name;
   1162      1.1  mrg   gfc_typespec ts;
   1163      1.1  mrg 
   1164      1.1  mrg   symbol_attribute attr;
   1165      1.1  mrg   gfc_array_spec *as;
   1166      1.1  mrg 
   1167      1.1  mrg   tree backend_decl;
   1168      1.1  mrg   /* Used to cache a FIELD_DECL matching this same component
   1169      1.1  mrg      but applied to a different backend containing type that was
   1170      1.1  mrg      generated by gfc_nonrestricted_type.  */
   1171      1.1  mrg   tree norestrict_decl;
   1172      1.1  mrg   locus loc;
   1173      1.1  mrg   struct gfc_expr *initializer;
   1174      1.1  mrg   /* Used in parameterized derived type declarations to store parameterized
   1175      1.1  mrg      kind expressions.  */
   1176      1.1  mrg   struct gfc_expr *kind_expr;
   1177      1.1  mrg   struct gfc_actual_arglist *param_list;
   1178      1.1  mrg 
   1179      1.1  mrg   struct gfc_component *next;
   1180      1.1  mrg 
   1181      1.1  mrg   /* Needed for procedure pointer components.  */
   1182      1.1  mrg   struct gfc_typebound_proc *tb;
   1183      1.1  mrg   /* When allocatable/pointer and in a coarray the associated token.  */
   1184      1.1  mrg   tree caf_token;
   1185      1.1  mrg }
   1186      1.1  mrg gfc_component;
   1187      1.1  mrg 
   1188      1.1  mrg #define gfc_get_component() XCNEW (gfc_component)
   1189      1.1  mrg 
   1190      1.1  mrg /* Formal argument lists are lists of symbols.  */
   1191      1.1  mrg typedef struct gfc_formal_arglist
   1192      1.1  mrg {
   1193      1.1  mrg   /* Symbol representing the argument at this position in the arglist.  */
   1194      1.1  mrg   struct gfc_symbol *sym;
   1195      1.1  mrg   /* Points to the next formal argument.  */
   1196      1.1  mrg   struct gfc_formal_arglist *next;
   1197      1.1  mrg }
   1198      1.1  mrg gfc_formal_arglist;
   1199      1.1  mrg 
   1200      1.1  mrg #define gfc_get_formal_arglist() XCNEW (gfc_formal_arglist)
   1201      1.1  mrg 
   1202      1.1  mrg 
   1203  1.1.1.3  mrg struct gfc_dummy_arg;
   1204  1.1.1.3  mrg 
   1205  1.1.1.3  mrg 
   1206      1.1  mrg /* The gfc_actual_arglist structure is for actual arguments and
   1207      1.1  mrg    for type parameter specification lists.  */
   1208      1.1  mrg typedef struct gfc_actual_arglist
   1209      1.1  mrg {
   1210      1.1  mrg   const char *name;
   1211      1.1  mrg   /* Alternate return label when the expr member is null.  */
   1212      1.1  mrg   struct gfc_st_label *label;
   1213      1.1  mrg 
   1214      1.1  mrg   gfc_param_spec_type spec_type;
   1215      1.1  mrg 
   1216      1.1  mrg   struct gfc_expr *expr;
   1217  1.1.1.3  mrg 
   1218  1.1.1.3  mrg   /*  The dummy arg this actual arg is associated with, if the interface
   1219  1.1.1.3  mrg       is explicit.  NULL otherwise.  */
   1220  1.1.1.3  mrg   gfc_dummy_arg *associated_dummy;
   1221  1.1.1.3  mrg 
   1222      1.1  mrg   struct gfc_actual_arglist *next;
   1223      1.1  mrg }
   1224      1.1  mrg gfc_actual_arglist;
   1225      1.1  mrg 
   1226      1.1  mrg #define gfc_get_actual_arglist() XCNEW (gfc_actual_arglist)
   1227      1.1  mrg 
   1228      1.1  mrg 
   1229      1.1  mrg /* Because a symbol can belong to multiple namelists, they must be
   1230      1.1  mrg    linked externally to the symbol itself.  */
   1231      1.1  mrg typedef struct gfc_namelist
   1232      1.1  mrg {
   1233      1.1  mrg   struct gfc_symbol *sym;
   1234      1.1  mrg   struct gfc_namelist *next;
   1235      1.1  mrg }
   1236      1.1  mrg gfc_namelist;
   1237      1.1  mrg 
   1238      1.1  mrg #define gfc_get_namelist() XCNEW (gfc_namelist)
   1239      1.1  mrg 
   1240      1.1  mrg /* Likewise to gfc_namelist, but contains expressions.  */
   1241      1.1  mrg typedef struct gfc_expr_list
   1242      1.1  mrg {
   1243      1.1  mrg   struct gfc_expr *expr;
   1244      1.1  mrg   struct gfc_expr_list *next;
   1245      1.1  mrg }
   1246      1.1  mrg gfc_expr_list;
   1247      1.1  mrg 
   1248      1.1  mrg #define gfc_get_expr_list() XCNEW (gfc_expr_list)
   1249      1.1  mrg 
   1250      1.1  mrg enum gfc_omp_reduction_op
   1251      1.1  mrg {
   1252      1.1  mrg   OMP_REDUCTION_NONE = -1,
   1253      1.1  mrg   OMP_REDUCTION_PLUS = INTRINSIC_PLUS,
   1254      1.1  mrg   OMP_REDUCTION_MINUS = INTRINSIC_MINUS,
   1255      1.1  mrg   OMP_REDUCTION_TIMES = INTRINSIC_TIMES,
   1256      1.1  mrg   OMP_REDUCTION_AND = INTRINSIC_AND,
   1257      1.1  mrg   OMP_REDUCTION_OR = INTRINSIC_OR,
   1258      1.1  mrg   OMP_REDUCTION_EQV = INTRINSIC_EQV,
   1259      1.1  mrg   OMP_REDUCTION_NEQV = INTRINSIC_NEQV,
   1260      1.1  mrg   OMP_REDUCTION_MAX = GFC_INTRINSIC_END,
   1261      1.1  mrg   OMP_REDUCTION_MIN,
   1262      1.1  mrg   OMP_REDUCTION_IAND,
   1263      1.1  mrg   OMP_REDUCTION_IOR,
   1264      1.1  mrg   OMP_REDUCTION_IEOR,
   1265      1.1  mrg   OMP_REDUCTION_USER
   1266      1.1  mrg };
   1267      1.1  mrg 
   1268      1.1  mrg enum gfc_omp_depend_op
   1269      1.1  mrg {
   1270  1.1.1.3  mrg   OMP_DEPEND_UNSET,
   1271      1.1  mrg   OMP_DEPEND_IN,
   1272      1.1  mrg   OMP_DEPEND_OUT,
   1273      1.1  mrg   OMP_DEPEND_INOUT,
   1274  1.1.1.3  mrg   OMP_DEPEND_MUTEXINOUTSET,
   1275  1.1.1.3  mrg   OMP_DEPEND_DEPOBJ,
   1276      1.1  mrg   OMP_DEPEND_SINK_FIRST,
   1277      1.1  mrg   OMP_DEPEND_SINK
   1278      1.1  mrg };
   1279      1.1  mrg 
   1280      1.1  mrg enum gfc_omp_map_op
   1281      1.1  mrg {
   1282      1.1  mrg   OMP_MAP_ALLOC,
   1283  1.1.1.2  mrg   OMP_MAP_IF_PRESENT,
   1284  1.1.1.2  mrg   OMP_MAP_ATTACH,
   1285      1.1  mrg   OMP_MAP_TO,
   1286      1.1  mrg   OMP_MAP_FROM,
   1287      1.1  mrg   OMP_MAP_TOFROM,
   1288      1.1  mrg   OMP_MAP_DELETE,
   1289  1.1.1.2  mrg   OMP_MAP_DETACH,
   1290      1.1  mrg   OMP_MAP_FORCE_ALLOC,
   1291      1.1  mrg   OMP_MAP_FORCE_TO,
   1292      1.1  mrg   OMP_MAP_FORCE_FROM,
   1293      1.1  mrg   OMP_MAP_FORCE_TOFROM,
   1294      1.1  mrg   OMP_MAP_FORCE_PRESENT,
   1295      1.1  mrg   OMP_MAP_FORCE_DEVICEPTR,
   1296      1.1  mrg   OMP_MAP_DEVICE_RESIDENT,
   1297      1.1  mrg   OMP_MAP_LINK,
   1298      1.1  mrg   OMP_MAP_RELEASE,
   1299      1.1  mrg   OMP_MAP_ALWAYS_TO,
   1300      1.1  mrg   OMP_MAP_ALWAYS_FROM,
   1301      1.1  mrg   OMP_MAP_ALWAYS_TOFROM
   1302      1.1  mrg };
   1303      1.1  mrg 
   1304  1.1.1.3  mrg enum gfc_omp_defaultmap
   1305  1.1.1.3  mrg {
   1306  1.1.1.3  mrg   OMP_DEFAULTMAP_UNSET,
   1307  1.1.1.3  mrg   OMP_DEFAULTMAP_ALLOC,
   1308  1.1.1.3  mrg   OMP_DEFAULTMAP_TO,
   1309  1.1.1.3  mrg   OMP_DEFAULTMAP_FROM,
   1310  1.1.1.3  mrg   OMP_DEFAULTMAP_TOFROM,
   1311  1.1.1.3  mrg   OMP_DEFAULTMAP_FIRSTPRIVATE,
   1312  1.1.1.3  mrg   OMP_DEFAULTMAP_NONE,
   1313  1.1.1.3  mrg   OMP_DEFAULTMAP_DEFAULT,
   1314  1.1.1.3  mrg   OMP_DEFAULTMAP_PRESENT
   1315  1.1.1.3  mrg };
   1316  1.1.1.3  mrg 
   1317  1.1.1.3  mrg enum gfc_omp_defaultmap_category
   1318  1.1.1.3  mrg {
   1319  1.1.1.3  mrg   OMP_DEFAULTMAP_CAT_UNCATEGORIZED,
   1320  1.1.1.3  mrg   OMP_DEFAULTMAP_CAT_SCALAR,
   1321  1.1.1.3  mrg   OMP_DEFAULTMAP_CAT_AGGREGATE,
   1322  1.1.1.3  mrg   OMP_DEFAULTMAP_CAT_ALLOCATABLE,
   1323  1.1.1.3  mrg   OMP_DEFAULTMAP_CAT_POINTER,
   1324  1.1.1.3  mrg   OMP_DEFAULTMAP_CAT_NUM
   1325  1.1.1.3  mrg };
   1326  1.1.1.3  mrg 
   1327      1.1  mrg enum gfc_omp_linear_op
   1328      1.1  mrg {
   1329      1.1  mrg   OMP_LINEAR_DEFAULT,
   1330      1.1  mrg   OMP_LINEAR_REF,
   1331      1.1  mrg   OMP_LINEAR_VAL,
   1332      1.1  mrg   OMP_LINEAR_UVAL
   1333      1.1  mrg };
   1334      1.1  mrg 
   1335      1.1  mrg /* For use in OpenMP clauses in case we need extra information
   1336      1.1  mrg    (aligned clause alignment, linear clause step, etc.).  */
   1337      1.1  mrg 
   1338      1.1  mrg typedef struct gfc_omp_namelist
   1339      1.1  mrg {
   1340      1.1  mrg   struct gfc_symbol *sym;
   1341      1.1  mrg   struct gfc_expr *expr;
   1342      1.1  mrg   union
   1343      1.1  mrg     {
   1344      1.1  mrg       gfc_omp_reduction_op reduction_op;
   1345      1.1  mrg       gfc_omp_depend_op depend_op;
   1346      1.1  mrg       gfc_omp_map_op map_op;
   1347      1.1  mrg       gfc_omp_linear_op linear_op;
   1348      1.1  mrg       struct gfc_common_head *common;
   1349  1.1.1.3  mrg       bool lastprivate_conditional;
   1350      1.1  mrg     } u;
   1351  1.1.1.3  mrg   union
   1352  1.1.1.3  mrg     {
   1353  1.1.1.3  mrg       struct gfc_omp_namelist_udr *udr;
   1354  1.1.1.3  mrg       gfc_namespace *ns;
   1355  1.1.1.3  mrg     } u2;
   1356      1.1  mrg   struct gfc_omp_namelist *next;
   1357      1.1  mrg   locus where;
   1358      1.1  mrg }
   1359      1.1  mrg gfc_omp_namelist;
   1360      1.1  mrg 
   1361      1.1  mrg #define gfc_get_omp_namelist() XCNEW (gfc_omp_namelist)
   1362      1.1  mrg 
   1363      1.1  mrg enum
   1364      1.1  mrg {
   1365      1.1  mrg   OMP_LIST_FIRST,
   1366      1.1  mrg   OMP_LIST_PRIVATE = OMP_LIST_FIRST,
   1367      1.1  mrg   OMP_LIST_FIRSTPRIVATE,
   1368      1.1  mrg   OMP_LIST_LASTPRIVATE,
   1369      1.1  mrg   OMP_LIST_COPYPRIVATE,
   1370      1.1  mrg   OMP_LIST_SHARED,
   1371      1.1  mrg   OMP_LIST_COPYIN,
   1372      1.1  mrg   OMP_LIST_UNIFORM,
   1373  1.1.1.3  mrg   OMP_LIST_AFFINITY,
   1374      1.1  mrg   OMP_LIST_ALIGNED,
   1375      1.1  mrg   OMP_LIST_LINEAR,
   1376      1.1  mrg   OMP_LIST_DEPEND,
   1377      1.1  mrg   OMP_LIST_MAP,
   1378      1.1  mrg   OMP_LIST_TO,
   1379      1.1  mrg   OMP_LIST_FROM,
   1380  1.1.1.3  mrg   OMP_LIST_SCAN_IN,
   1381  1.1.1.3  mrg   OMP_LIST_SCAN_EX,
   1382      1.1  mrg   OMP_LIST_REDUCTION,
   1383  1.1.1.3  mrg   OMP_LIST_REDUCTION_INSCAN,
   1384  1.1.1.3  mrg   OMP_LIST_REDUCTION_TASK,
   1385  1.1.1.3  mrg   OMP_LIST_IN_REDUCTION,
   1386  1.1.1.3  mrg   OMP_LIST_TASK_REDUCTION,
   1387      1.1  mrg   OMP_LIST_DEVICE_RESIDENT,
   1388      1.1  mrg   OMP_LIST_LINK,
   1389      1.1  mrg   OMP_LIST_USE_DEVICE,
   1390      1.1  mrg   OMP_LIST_CACHE,
   1391      1.1  mrg   OMP_LIST_IS_DEVICE_PTR,
   1392      1.1  mrg   OMP_LIST_USE_DEVICE_PTR,
   1393  1.1.1.2  mrg   OMP_LIST_USE_DEVICE_ADDR,
   1394  1.1.1.3  mrg   OMP_LIST_NONTEMPORAL,
   1395  1.1.1.3  mrg   OMP_LIST_ALLOCATE,
   1396  1.1.1.3  mrg   OMP_LIST_HAS_DEVICE_ADDR,
   1397  1.1.1.3  mrg   OMP_LIST_NUM /* Must be the last.  */
   1398      1.1  mrg };
   1399      1.1  mrg 
   1400      1.1  mrg /* Because a symbol can belong to multiple namelists, they must be
   1401      1.1  mrg    linked externally to the symbol itself.  */
   1402      1.1  mrg 
   1403      1.1  mrg enum gfc_omp_sched_kind
   1404      1.1  mrg {
   1405      1.1  mrg   OMP_SCHED_NONE,
   1406      1.1  mrg   OMP_SCHED_STATIC,
   1407      1.1  mrg   OMP_SCHED_DYNAMIC,
   1408      1.1  mrg   OMP_SCHED_GUIDED,
   1409      1.1  mrg   OMP_SCHED_RUNTIME,
   1410      1.1  mrg   OMP_SCHED_AUTO
   1411      1.1  mrg };
   1412      1.1  mrg 
   1413      1.1  mrg enum gfc_omp_default_sharing
   1414      1.1  mrg {
   1415      1.1  mrg   OMP_DEFAULT_UNKNOWN,
   1416      1.1  mrg   OMP_DEFAULT_NONE,
   1417      1.1  mrg   OMP_DEFAULT_PRIVATE,
   1418      1.1  mrg   OMP_DEFAULT_SHARED,
   1419      1.1  mrg   OMP_DEFAULT_FIRSTPRIVATE,
   1420      1.1  mrg   OMP_DEFAULT_PRESENT
   1421      1.1  mrg };
   1422      1.1  mrg 
   1423      1.1  mrg enum gfc_omp_proc_bind_kind
   1424      1.1  mrg {
   1425      1.1  mrg   OMP_PROC_BIND_UNKNOWN,
   1426  1.1.1.3  mrg   OMP_PROC_BIND_PRIMARY,
   1427      1.1  mrg   OMP_PROC_BIND_MASTER,
   1428      1.1  mrg   OMP_PROC_BIND_SPREAD,
   1429      1.1  mrg   OMP_PROC_BIND_CLOSE
   1430      1.1  mrg };
   1431      1.1  mrg 
   1432      1.1  mrg enum gfc_omp_cancel_kind
   1433      1.1  mrg {
   1434      1.1  mrg   OMP_CANCEL_UNKNOWN,
   1435      1.1  mrg   OMP_CANCEL_PARALLEL,
   1436      1.1  mrg   OMP_CANCEL_SECTIONS,
   1437      1.1  mrg   OMP_CANCEL_DO,
   1438      1.1  mrg   OMP_CANCEL_TASKGROUP
   1439      1.1  mrg };
   1440      1.1  mrg 
   1441      1.1  mrg enum gfc_omp_if_kind
   1442      1.1  mrg {
   1443  1.1.1.3  mrg   OMP_IF_CANCEL,
   1444      1.1  mrg   OMP_IF_PARALLEL,
   1445  1.1.1.3  mrg   OMP_IF_SIMD,
   1446      1.1  mrg   OMP_IF_TASK,
   1447      1.1  mrg   OMP_IF_TASKLOOP,
   1448      1.1  mrg   OMP_IF_TARGET,
   1449      1.1  mrg   OMP_IF_TARGET_DATA,
   1450      1.1  mrg   OMP_IF_TARGET_UPDATE,
   1451      1.1  mrg   OMP_IF_TARGET_ENTER_DATA,
   1452      1.1  mrg   OMP_IF_TARGET_EXIT_DATA,
   1453      1.1  mrg   OMP_IF_LAST
   1454      1.1  mrg };
   1455      1.1  mrg 
   1456  1.1.1.3  mrg enum gfc_omp_atomic_op
   1457  1.1.1.3  mrg {
   1458  1.1.1.3  mrg   GFC_OMP_ATOMIC_UNSET = 0,
   1459  1.1.1.3  mrg   GFC_OMP_ATOMIC_UPDATE = 1,
   1460  1.1.1.3  mrg   GFC_OMP_ATOMIC_READ = 2,
   1461  1.1.1.3  mrg   GFC_OMP_ATOMIC_WRITE = 3,
   1462  1.1.1.3  mrg   GFC_OMP_ATOMIC_MASK = 3,
   1463  1.1.1.3  mrg   GFC_OMP_ATOMIC_SWAP = 16
   1464  1.1.1.3  mrg };
   1465  1.1.1.3  mrg 
   1466  1.1.1.3  mrg enum gfc_omp_requires_kind
   1467  1.1.1.3  mrg {
   1468  1.1.1.3  mrg   /* Keep in sync with gfc_namespace, esp. with omp_req_mem_order.  */
   1469  1.1.1.3  mrg   OMP_REQ_ATOMIC_MEM_ORDER_SEQ_CST = 1,  /* 01 */
   1470  1.1.1.3  mrg   OMP_REQ_ATOMIC_MEM_ORDER_ACQ_REL = 2,  /* 10 */
   1471  1.1.1.3  mrg   OMP_REQ_ATOMIC_MEM_ORDER_RELAXED = 3,  /* 11 */
   1472  1.1.1.3  mrg   OMP_REQ_REVERSE_OFFLOAD = (1 << 2),
   1473  1.1.1.3  mrg   OMP_REQ_UNIFIED_ADDRESS = (1 << 3),
   1474  1.1.1.3  mrg   OMP_REQ_UNIFIED_SHARED_MEMORY = (1 << 4),
   1475  1.1.1.3  mrg   OMP_REQ_DYNAMIC_ALLOCATORS = (1 << 5),
   1476  1.1.1.3  mrg   OMP_REQ_TARGET_MASK = (OMP_REQ_REVERSE_OFFLOAD
   1477  1.1.1.3  mrg 			 | OMP_REQ_UNIFIED_ADDRESS
   1478  1.1.1.3  mrg 			 | OMP_REQ_UNIFIED_SHARED_MEMORY),
   1479  1.1.1.3  mrg   OMP_REQ_ATOMIC_MEM_ORDER_MASK = (OMP_REQ_ATOMIC_MEM_ORDER_SEQ_CST
   1480  1.1.1.3  mrg 				   | OMP_REQ_ATOMIC_MEM_ORDER_ACQ_REL
   1481  1.1.1.3  mrg 				   | OMP_REQ_ATOMIC_MEM_ORDER_RELAXED)
   1482  1.1.1.3  mrg };
   1483  1.1.1.3  mrg 
   1484  1.1.1.3  mrg enum gfc_omp_memorder
   1485  1.1.1.3  mrg {
   1486  1.1.1.3  mrg   OMP_MEMORDER_UNSET,
   1487  1.1.1.3  mrg   OMP_MEMORDER_SEQ_CST,
   1488  1.1.1.3  mrg   OMP_MEMORDER_ACQ_REL,
   1489  1.1.1.3  mrg   OMP_MEMORDER_RELEASE,
   1490  1.1.1.3  mrg   OMP_MEMORDER_ACQUIRE,
   1491  1.1.1.3  mrg   OMP_MEMORDER_RELAXED
   1492  1.1.1.3  mrg };
   1493  1.1.1.3  mrg 
   1494  1.1.1.3  mrg enum gfc_omp_bind_type
   1495  1.1.1.3  mrg {
   1496  1.1.1.3  mrg   OMP_BIND_UNSET,
   1497  1.1.1.3  mrg   OMP_BIND_TEAMS,
   1498  1.1.1.3  mrg   OMP_BIND_PARALLEL,
   1499  1.1.1.3  mrg   OMP_BIND_THREAD
   1500  1.1.1.3  mrg };
   1501  1.1.1.3  mrg 
   1502      1.1  mrg typedef struct gfc_omp_clauses
   1503      1.1  mrg {
   1504  1.1.1.3  mrg   gfc_omp_namelist *lists[OMP_LIST_NUM];
   1505      1.1  mrg   struct gfc_expr *if_expr;
   1506      1.1  mrg   struct gfc_expr *final_expr;
   1507      1.1  mrg   struct gfc_expr *num_threads;
   1508      1.1  mrg   struct gfc_expr *chunk_size;
   1509      1.1  mrg   struct gfc_expr *safelen_expr;
   1510      1.1  mrg   struct gfc_expr *simdlen_expr;
   1511  1.1.1.3  mrg   struct gfc_expr *num_teams_lower;
   1512  1.1.1.3  mrg   struct gfc_expr *num_teams_upper;
   1513      1.1  mrg   struct gfc_expr *device;
   1514      1.1  mrg   struct gfc_expr *thread_limit;
   1515      1.1  mrg   struct gfc_expr *grainsize;
   1516  1.1.1.3  mrg   struct gfc_expr *filter;
   1517      1.1  mrg   struct gfc_expr *hint;
   1518      1.1  mrg   struct gfc_expr *num_tasks;
   1519      1.1  mrg   struct gfc_expr *priority;
   1520  1.1.1.3  mrg   struct gfc_expr *detach;
   1521  1.1.1.3  mrg   struct gfc_expr *depobj;
   1522      1.1  mrg   struct gfc_expr *if_exprs[OMP_IF_LAST];
   1523      1.1  mrg   struct gfc_expr *dist_chunk_size;
   1524  1.1.1.3  mrg   struct gfc_expr *message;
   1525      1.1  mrg   const char *critical_name;
   1526  1.1.1.3  mrg   enum gfc_omp_default_sharing default_sharing;
   1527  1.1.1.3  mrg   enum gfc_omp_atomic_op atomic_op;
   1528  1.1.1.3  mrg   enum gfc_omp_defaultmap defaultmap[OMP_DEFAULTMAP_CAT_NUM];
   1529  1.1.1.3  mrg   int collapse, orderedc;
   1530  1.1.1.3  mrg   unsigned nowait:1, ordered:1, untied:1, mergeable:1, ancestor:1;
   1531  1.1.1.3  mrg   unsigned inbranch:1, notinbranch:1, nogroup:1;
   1532  1.1.1.3  mrg   unsigned sched_simd:1, sched_monotonic:1, sched_nonmonotonic:1;
   1533  1.1.1.3  mrg   unsigned simd:1, threads:1, depend_source:1, destroy:1, order_concurrent:1;
   1534  1.1.1.3  mrg   unsigned order_unconstrained:1, order_reproducible:1, capture:1;
   1535  1.1.1.3  mrg   unsigned grainsize_strict:1, num_tasks_strict:1, compare:1, weak:1;
   1536  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_sched_kind) sched_kind:3;
   1537  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_device_type) device_type:2;
   1538  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_memorder) memorder:3;
   1539  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_memorder) fail:3;
   1540  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_cancel_kind) cancel:3;
   1541  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_proc_bind_kind) proc_bind:3;
   1542  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_depend_op) depobj_update:3;
   1543  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_bind_type) bind:2;
   1544  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_at_type) at:2;
   1545  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_severity_type) severity:2;
   1546  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_sched_kind) dist_sched_kind:3;
   1547      1.1  mrg 
   1548      1.1  mrg   /* OpenACC. */
   1549      1.1  mrg   struct gfc_expr *async_expr;
   1550      1.1  mrg   struct gfc_expr *gang_static_expr;
   1551      1.1  mrg   struct gfc_expr *gang_num_expr;
   1552      1.1  mrg   struct gfc_expr *worker_expr;
   1553      1.1  mrg   struct gfc_expr *vector_expr;
   1554      1.1  mrg   struct gfc_expr *num_gangs_expr;
   1555      1.1  mrg   struct gfc_expr *num_workers_expr;
   1556      1.1  mrg   struct gfc_expr *vector_length_expr;
   1557      1.1  mrg   gfc_expr_list *wait_list;
   1558      1.1  mrg   gfc_expr_list *tile_list;
   1559      1.1  mrg   unsigned async:1, gang:1, worker:1, vector:1, seq:1, independent:1;
   1560      1.1  mrg   unsigned par_auto:1, gang_static:1;
   1561      1.1  mrg   unsigned if_present:1, finalize:1;
   1562  1.1.1.3  mrg   unsigned nohost:1;
   1563      1.1  mrg   locus loc;
   1564      1.1  mrg }
   1565      1.1  mrg gfc_omp_clauses;
   1566      1.1  mrg 
   1567      1.1  mrg #define gfc_get_omp_clauses() XCNEW (gfc_omp_clauses)
   1568      1.1  mrg 
   1569      1.1  mrg 
   1570      1.1  mrg /* Node in the linked list used for storing !$oacc declare constructs.  */
   1571      1.1  mrg 
   1572      1.1  mrg typedef struct gfc_oacc_declare
   1573      1.1  mrg {
   1574      1.1  mrg   struct gfc_oacc_declare *next;
   1575      1.1  mrg   bool module_var;
   1576      1.1  mrg   gfc_omp_clauses *clauses;
   1577      1.1  mrg   locus loc;
   1578      1.1  mrg }
   1579      1.1  mrg gfc_oacc_declare;
   1580      1.1  mrg 
   1581      1.1  mrg #define gfc_get_oacc_declare() XCNEW (gfc_oacc_declare)
   1582      1.1  mrg 
   1583      1.1  mrg 
   1584      1.1  mrg /* Node in the linked list used for storing !$omp declare simd constructs.  */
   1585      1.1  mrg 
   1586      1.1  mrg typedef struct gfc_omp_declare_simd
   1587      1.1  mrg {
   1588      1.1  mrg   struct gfc_omp_declare_simd *next;
   1589      1.1  mrg   locus where; /* Where the !$omp declare simd construct occurred.  */
   1590      1.1  mrg 
   1591      1.1  mrg   gfc_symbol *proc_name;
   1592      1.1  mrg 
   1593      1.1  mrg   gfc_omp_clauses *clauses;
   1594      1.1  mrg }
   1595      1.1  mrg gfc_omp_declare_simd;
   1596      1.1  mrg #define gfc_get_omp_declare_simd() XCNEW (gfc_omp_declare_simd)
   1597      1.1  mrg 
   1598  1.1.1.3  mrg 
   1599  1.1.1.3  mrg enum gfc_omp_trait_property_kind
   1600  1.1.1.3  mrg {
   1601  1.1.1.3  mrg   CTX_PROPERTY_NONE,
   1602  1.1.1.3  mrg   CTX_PROPERTY_USER,
   1603  1.1.1.3  mrg   CTX_PROPERTY_NAME_LIST,
   1604  1.1.1.3  mrg   CTX_PROPERTY_ID,
   1605  1.1.1.3  mrg   CTX_PROPERTY_EXPR,
   1606  1.1.1.3  mrg   CTX_PROPERTY_SIMD
   1607  1.1.1.3  mrg };
   1608  1.1.1.3  mrg 
   1609  1.1.1.3  mrg typedef struct gfc_omp_trait_property
   1610  1.1.1.3  mrg {
   1611  1.1.1.3  mrg   struct gfc_omp_trait_property *next;
   1612  1.1.1.3  mrg   enum gfc_omp_trait_property_kind property_kind;
   1613  1.1.1.3  mrg   bool is_name : 1;
   1614  1.1.1.3  mrg 
   1615  1.1.1.3  mrg   union
   1616  1.1.1.3  mrg     {
   1617  1.1.1.3  mrg       gfc_expr *expr;
   1618  1.1.1.3  mrg       gfc_symbol *sym;
   1619  1.1.1.3  mrg       gfc_omp_clauses *clauses;
   1620  1.1.1.3  mrg       char *name;
   1621  1.1.1.3  mrg     };
   1622  1.1.1.3  mrg } gfc_omp_trait_property;
   1623  1.1.1.3  mrg #define gfc_get_omp_trait_property() XCNEW (gfc_omp_trait_property)
   1624  1.1.1.3  mrg 
   1625  1.1.1.3  mrg typedef struct gfc_omp_selector
   1626  1.1.1.3  mrg {
   1627  1.1.1.3  mrg   struct gfc_omp_selector *next;
   1628  1.1.1.3  mrg 
   1629  1.1.1.3  mrg   char *trait_selector_name;
   1630  1.1.1.3  mrg   gfc_expr *score;
   1631  1.1.1.3  mrg   struct gfc_omp_trait_property *properties;
   1632  1.1.1.3  mrg } gfc_omp_selector;
   1633  1.1.1.3  mrg #define gfc_get_omp_selector() XCNEW (gfc_omp_selector)
   1634  1.1.1.3  mrg 
   1635  1.1.1.3  mrg typedef struct gfc_omp_set_selector
   1636  1.1.1.3  mrg {
   1637  1.1.1.3  mrg   struct gfc_omp_set_selector *next;
   1638  1.1.1.3  mrg 
   1639  1.1.1.3  mrg   const char *trait_set_selector_name;
   1640  1.1.1.3  mrg   struct gfc_omp_selector *trait_selectors;
   1641  1.1.1.3  mrg } gfc_omp_set_selector;
   1642  1.1.1.3  mrg #define gfc_get_omp_set_selector() XCNEW (gfc_omp_set_selector)
   1643  1.1.1.3  mrg 
   1644  1.1.1.3  mrg 
   1645  1.1.1.3  mrg /* Node in the linked list used for storing !$omp declare variant
   1646  1.1.1.3  mrg    constructs.  */
   1647  1.1.1.3  mrg 
   1648  1.1.1.3  mrg typedef struct gfc_omp_declare_variant
   1649  1.1.1.3  mrg {
   1650  1.1.1.3  mrg   struct gfc_omp_declare_variant *next;
   1651  1.1.1.3  mrg   locus where; /* Where the !$omp declare variant construct occurred.  */
   1652  1.1.1.3  mrg 
   1653  1.1.1.3  mrg   struct gfc_symtree *base_proc_symtree;
   1654  1.1.1.3  mrg   struct gfc_symtree *variant_proc_symtree;
   1655  1.1.1.3  mrg 
   1656  1.1.1.3  mrg   gfc_omp_set_selector *set_selectors;
   1657  1.1.1.3  mrg 
   1658  1.1.1.3  mrg   bool checked_p : 1; /* Set if previously checked for errors.  */
   1659  1.1.1.3  mrg   bool error_p : 1; /* Set if error found in directive.  */
   1660  1.1.1.3  mrg }
   1661  1.1.1.3  mrg gfc_omp_declare_variant;
   1662  1.1.1.3  mrg #define gfc_get_omp_declare_variant() XCNEW (gfc_omp_declare_variant)
   1663  1.1.1.3  mrg 
   1664  1.1.1.3  mrg 
   1665      1.1  mrg typedef struct gfc_omp_udr
   1666      1.1  mrg {
   1667      1.1  mrg   struct gfc_omp_udr *next;
   1668      1.1  mrg   locus where; /* Where the !$omp declare reduction construct occurred.  */
   1669      1.1  mrg 
   1670      1.1  mrg   const char *name;
   1671      1.1  mrg   gfc_typespec ts;
   1672      1.1  mrg   gfc_omp_reduction_op rop;
   1673      1.1  mrg 
   1674      1.1  mrg   struct gfc_symbol *omp_out;
   1675      1.1  mrg   struct gfc_symbol *omp_in;
   1676      1.1  mrg   struct gfc_namespace *combiner_ns;
   1677      1.1  mrg 
   1678      1.1  mrg   struct gfc_symbol *omp_priv;
   1679      1.1  mrg   struct gfc_symbol *omp_orig;
   1680      1.1  mrg   struct gfc_namespace *initializer_ns;
   1681      1.1  mrg }
   1682      1.1  mrg gfc_omp_udr;
   1683      1.1  mrg #define gfc_get_omp_udr() XCNEW (gfc_omp_udr)
   1684      1.1  mrg 
   1685      1.1  mrg typedef struct gfc_omp_namelist_udr
   1686      1.1  mrg {
   1687      1.1  mrg   struct gfc_omp_udr *udr;
   1688      1.1  mrg   struct gfc_code *combiner;
   1689      1.1  mrg   struct gfc_code *initializer;
   1690      1.1  mrg }
   1691      1.1  mrg gfc_omp_namelist_udr;
   1692      1.1  mrg #define gfc_get_omp_namelist_udr() XCNEW (gfc_omp_namelist_udr)
   1693      1.1  mrg 
   1694      1.1  mrg /* The gfc_st_label structure is a BBT attached to a namespace that
   1695      1.1  mrg    records the usage of statement labels within that space.  */
   1696      1.1  mrg 
   1697      1.1  mrg typedef struct gfc_st_label
   1698      1.1  mrg {
   1699      1.1  mrg   BBT_HEADER(gfc_st_label);
   1700      1.1  mrg 
   1701      1.1  mrg   int value;
   1702      1.1  mrg 
   1703      1.1  mrg   gfc_sl_type defined, referenced;
   1704      1.1  mrg 
   1705      1.1  mrg   struct gfc_expr *format;
   1706      1.1  mrg 
   1707      1.1  mrg   tree backend_decl;
   1708      1.1  mrg 
   1709      1.1  mrg   locus where;
   1710      1.1  mrg 
   1711      1.1  mrg   gfc_namespace *ns;
   1712      1.1  mrg }
   1713      1.1  mrg gfc_st_label;
   1714      1.1  mrg 
   1715      1.1  mrg 
   1716      1.1  mrg /* gfc_interface()-- Interfaces are lists of symbols strung together.  */
   1717      1.1  mrg typedef struct gfc_interface
   1718      1.1  mrg {
   1719      1.1  mrg   struct gfc_symbol *sym;
   1720      1.1  mrg   locus where;
   1721      1.1  mrg   struct gfc_interface *next;
   1722      1.1  mrg }
   1723      1.1  mrg gfc_interface;
   1724      1.1  mrg 
   1725      1.1  mrg #define gfc_get_interface() XCNEW (gfc_interface)
   1726      1.1  mrg 
   1727      1.1  mrg /* User operator nodes.  These are like stripped down symbols.  */
   1728      1.1  mrg typedef struct
   1729      1.1  mrg {
   1730      1.1  mrg   const char *name;
   1731      1.1  mrg 
   1732      1.1  mrg   gfc_interface *op;
   1733      1.1  mrg   struct gfc_namespace *ns;
   1734      1.1  mrg   gfc_access access;
   1735      1.1  mrg }
   1736      1.1  mrg gfc_user_op;
   1737      1.1  mrg 
   1738      1.1  mrg 
   1739      1.1  mrg /* A list of specific bindings that are associated with a generic spec.  */
   1740      1.1  mrg typedef struct gfc_tbp_generic
   1741      1.1  mrg {
   1742      1.1  mrg   /* The parser sets specific_st, upon resolution we look for the corresponding
   1743      1.1  mrg      gfc_typebound_proc and set specific for further use.  */
   1744      1.1  mrg   struct gfc_symtree* specific_st;
   1745      1.1  mrg   struct gfc_typebound_proc* specific;
   1746      1.1  mrg 
   1747      1.1  mrg   struct gfc_tbp_generic* next;
   1748      1.1  mrg   bool is_operator;
   1749      1.1  mrg }
   1750      1.1  mrg gfc_tbp_generic;
   1751      1.1  mrg 
   1752      1.1  mrg #define gfc_get_tbp_generic() XCNEW (gfc_tbp_generic)
   1753      1.1  mrg 
   1754      1.1  mrg 
   1755      1.1  mrg /* Data needed for type-bound procedures.  */
   1756      1.1  mrg typedef struct gfc_typebound_proc
   1757      1.1  mrg {
   1758      1.1  mrg   locus where; /* Where the PROCEDURE/GENERIC definition was.  */
   1759      1.1  mrg 
   1760      1.1  mrg   union
   1761      1.1  mrg   {
   1762      1.1  mrg     struct gfc_symtree* specific; /* The interface if DEFERRED.  */
   1763      1.1  mrg     gfc_tbp_generic* generic;
   1764      1.1  mrg   }
   1765      1.1  mrg   u;
   1766      1.1  mrg 
   1767      1.1  mrg   gfc_access access;
   1768      1.1  mrg   const char* pass_arg; /* Argument-name for PASS.  NULL if not specified.  */
   1769      1.1  mrg 
   1770      1.1  mrg   /* The overridden type-bound proc (or GENERIC with this name in the
   1771      1.1  mrg      parent-type) or NULL if non.  */
   1772      1.1  mrg   struct gfc_typebound_proc* overridden;
   1773      1.1  mrg 
   1774      1.1  mrg   /* Once resolved, we use the position of pass_arg in the formal arglist of
   1775      1.1  mrg      the binding-target procedure to identify it.  The first argument has
   1776      1.1  mrg      number 1 here, the second 2, and so on.  */
   1777      1.1  mrg   unsigned pass_arg_num;
   1778      1.1  mrg 
   1779      1.1  mrg   unsigned nopass:1; /* Whether we have NOPASS (PASS otherwise).  */
   1780      1.1  mrg   unsigned non_overridable:1;
   1781      1.1  mrg   unsigned deferred:1;
   1782      1.1  mrg   unsigned is_generic:1;
   1783      1.1  mrg   unsigned function:1, subroutine:1;
   1784      1.1  mrg   unsigned error:1; /* Ignore it, when an error occurred during resolution.  */
   1785      1.1  mrg   unsigned ppc:1;
   1786      1.1  mrg }
   1787      1.1  mrg gfc_typebound_proc;
   1788      1.1  mrg 
   1789      1.1  mrg 
   1790      1.1  mrg /* Symbol nodes.  These are important things.  They are what the
   1791      1.1  mrg    standard refers to as "entities".  The possibly multiple names that
   1792      1.1  mrg    refer to the same entity are accomplished by a binary tree of
   1793      1.1  mrg    symtree structures that is balanced by the red-black method-- more
   1794      1.1  mrg    than one symtree node can point to any given symbol.  */
   1795      1.1  mrg 
   1796      1.1  mrg typedef struct gfc_symbol
   1797      1.1  mrg {
   1798      1.1  mrg   const char *name;	/* Primary name, before renaming */
   1799      1.1  mrg   const char *module;	/* Module this symbol came from */
   1800      1.1  mrg   locus declared_at;
   1801      1.1  mrg 
   1802      1.1  mrg   gfc_typespec ts;
   1803      1.1  mrg   symbol_attribute attr;
   1804      1.1  mrg 
   1805      1.1  mrg   /* The formal member points to the formal argument list if the
   1806      1.1  mrg      symbol is a function or subroutine name.  If the symbol is a
   1807      1.1  mrg      generic name, the generic member points to the list of
   1808      1.1  mrg      interfaces.  */
   1809      1.1  mrg 
   1810      1.1  mrg   gfc_interface *generic;
   1811      1.1  mrg   gfc_access component_access;
   1812      1.1  mrg 
   1813      1.1  mrg   gfc_formal_arglist *formal;
   1814      1.1  mrg   struct gfc_namespace *formal_ns;
   1815      1.1  mrg   struct gfc_namespace *f2k_derived;
   1816      1.1  mrg 
   1817      1.1  mrg   /* List of PDT parameter expressions  */
   1818      1.1  mrg   struct gfc_actual_arglist *param_list;
   1819      1.1  mrg 
   1820      1.1  mrg   struct gfc_expr *value;	/* Parameter/Initializer value */
   1821      1.1  mrg   gfc_array_spec *as;
   1822      1.1  mrg   struct gfc_symbol *result;	/* function result symbol */
   1823      1.1  mrg   gfc_component *components;	/* Derived type components */
   1824      1.1  mrg 
   1825      1.1  mrg   /* Defined only for Cray pointees; points to their pointer.  */
   1826      1.1  mrg   struct gfc_symbol *cp_pointer;
   1827      1.1  mrg 
   1828  1.1.1.3  mrg   int entry_id;			/* Used in resolve.cc for entries.  */
   1829      1.1  mrg 
   1830      1.1  mrg   /* CLASS hashed name for declared and dynamic types in the class.  */
   1831      1.1  mrg   int hash_value;
   1832      1.1  mrg 
   1833      1.1  mrg   struct gfc_symbol *common_next;	/* Links for COMMON syms */
   1834      1.1  mrg 
   1835      1.1  mrg   /* This is only used for pointer comparisons to check if symbols
   1836      1.1  mrg      are in the same common block.
   1837      1.1  mrg      In opposition to common_block, the common_head pointer takes into account
   1838      1.1  mrg      equivalences: if A is in a common block C and A and B are in equivalence,
   1839      1.1  mrg      then both A and B have common_head pointing to C, while A's common_block
   1840      1.1  mrg      points to C and B's is NULL.  */
   1841      1.1  mrg   struct gfc_common_head* common_head;
   1842      1.1  mrg 
   1843      1.1  mrg   /* Make sure setup code for dummy arguments is generated in the correct
   1844      1.1  mrg      order.  */
   1845      1.1  mrg   int dummy_order;
   1846      1.1  mrg 
   1847      1.1  mrg   gfc_namelist *namelist, *namelist_tail;
   1848      1.1  mrg 
   1849      1.1  mrg   /* Change management fields.  Symbols that might be modified by the
   1850      1.1  mrg      current statement have the mark member nonzero.  Of these symbols,
   1851      1.1  mrg      symbols with old_symbol equal to NULL are symbols created within
   1852      1.1  mrg      the current statement.  Otherwise, old_symbol points to a copy of
   1853  1.1.1.3  mrg      the old symbol. gfc_new is used in symbol.cc to flag new symbols.
   1854  1.1.1.2  mrg      comp_mark is used to indicate variables which have component accesses
   1855  1.1.1.2  mrg      in OpenMP/OpenACC directive clauses.  */
   1856      1.1  mrg   struct gfc_symbol *old_symbol;
   1857  1.1.1.2  mrg   unsigned mark:1, comp_mark:1, gfc_new:1;
   1858      1.1  mrg 
   1859      1.1  mrg   /* The tlink field is used in the front end to carry the module
   1860      1.1  mrg      declaration of separate module procedures so that the characteristics
   1861      1.1  mrg      can be compared with the corresponding declaration in a submodule. In
   1862      1.1  mrg      translation this field carries a linked list of symbols that require
   1863      1.1  mrg      deferred initialization.  */
   1864      1.1  mrg   struct gfc_symbol *tlink;
   1865      1.1  mrg 
   1866      1.1  mrg   /* Nonzero if all equivalences associated with this symbol have been
   1867      1.1  mrg      processed.  */
   1868      1.1  mrg   unsigned equiv_built:1;
   1869      1.1  mrg   /* Set if this variable is used as an index name in a FORALL.  */
   1870      1.1  mrg   unsigned forall_index:1;
   1871      1.1  mrg   /* Set if the symbol is used in a function result specification .  */
   1872      1.1  mrg   unsigned fn_result_spec:1;
   1873      1.1  mrg   /* Used to avoid multiple resolutions of a single symbol.  */
   1874  1.1.1.2  mrg   /* = 2 if this has already been resolved as an intrinsic,
   1875  1.1.1.2  mrg        in gfc_resolve_intrinsic,
   1876  1.1.1.2  mrg      = 1 if it has been resolved in resolve_symbol.  */
   1877  1.1.1.2  mrg   unsigned resolve_symbol_called:2;
   1878      1.1  mrg   /* Set if this is a module function or subroutine with the
   1879      1.1  mrg      abreviated declaration in a submodule.  */
   1880      1.1  mrg   unsigned abr_modproc_decl:1;
   1881  1.1.1.2  mrg   /* Set if a previous error or warning has occurred and no other
   1882  1.1.1.2  mrg      should be reported.  */
   1883  1.1.1.2  mrg   unsigned error:1;
   1884  1.1.1.2  mrg   /* Set if the dummy argument of a procedure could be an array despite
   1885  1.1.1.2  mrg      being called with a scalar actual argument. */
   1886  1.1.1.2  mrg   unsigned maybe_array:1;
   1887  1.1.1.3  mrg   /* Set if this should be passed by value, but is not a VALUE argument
   1888  1.1.1.3  mrg      according to the Fortran standard.  */
   1889  1.1.1.3  mrg   unsigned pass_as_value:1;
   1890  1.1.1.3  mrg   /* Set if an allocatable array variable has been allocated in the current
   1891  1.1.1.3  mrg      scope. Used in the suppression of uninitialized warnings in reallocation
   1892  1.1.1.3  mrg      on assignment.  */
   1893  1.1.1.3  mrg   unsigned allocated_in_scope:1;
   1894      1.1  mrg 
   1895      1.1  mrg   int refs;
   1896      1.1  mrg   struct gfc_namespace *ns;	/* namespace containing this symbol */
   1897      1.1  mrg 
   1898      1.1  mrg   tree backend_decl;
   1899      1.1  mrg 
   1900      1.1  mrg   /* Identity of the intrinsic module the symbol comes from, or
   1901      1.1  mrg      INTMOD_NONE if it's not imported from a intrinsic module.  */
   1902      1.1  mrg   intmod_id from_intmod;
   1903      1.1  mrg   /* Identity of the symbol from intrinsic modules, from enums maintained
   1904      1.1  mrg      separately by each intrinsic module.  Used together with from_intmod,
   1905      1.1  mrg      it uniquely identifies a symbol from an intrinsic module.  */
   1906      1.1  mrg   int intmod_sym_id;
   1907      1.1  mrg 
   1908      1.1  mrg   /* This may be repetitive, since the typespec now has a binding
   1909      1.1  mrg      label field.  */
   1910      1.1  mrg   const char* binding_label;
   1911      1.1  mrg   /* Store a reference to the common_block, if this symbol is in one.  */
   1912      1.1  mrg   struct gfc_common_head *common_block;
   1913      1.1  mrg 
   1914      1.1  mrg   /* Link to corresponding association-list if this is an associate name.  */
   1915      1.1  mrg   struct gfc_association_list *assoc;
   1916      1.1  mrg 
   1917      1.1  mrg   /* Link to next entry in derived type list */
   1918      1.1  mrg   struct gfc_symbol *dt_next;
   1919      1.1  mrg }
   1920      1.1  mrg gfc_symbol;
   1921      1.1  mrg 
   1922      1.1  mrg 
   1923      1.1  mrg struct gfc_undo_change_set
   1924      1.1  mrg {
   1925      1.1  mrg   vec<gfc_symbol *> syms;
   1926      1.1  mrg   vec<gfc_typebound_proc *> tbps;
   1927      1.1  mrg   gfc_undo_change_set *previous;
   1928      1.1  mrg };
   1929      1.1  mrg 
   1930      1.1  mrg 
   1931      1.1  mrg /* This structure is used to keep track of symbols in common blocks.  */
   1932      1.1  mrg typedef struct gfc_common_head
   1933      1.1  mrg {
   1934      1.1  mrg   locus where;
   1935      1.1  mrg   char use_assoc, saved, threadprivate;
   1936      1.1  mrg   unsigned char omp_declare_target : 1;
   1937      1.1  mrg   unsigned char omp_declare_target_link : 1;
   1938  1.1.1.3  mrg   ENUM_BITFIELD (gfc_omp_device_type) omp_device_type:2;
   1939  1.1.1.2  mrg   /* Provide sufficient space to hold "symbol.symbol.eq.1234567890".  */
   1940  1.1.1.2  mrg   char name[2*GFC_MAX_SYMBOL_LEN + 1 + 14 + 1];
   1941      1.1  mrg   struct gfc_symbol *head;
   1942      1.1  mrg   const char* binding_label;
   1943      1.1  mrg   int is_bind_c;
   1944      1.1  mrg   int refs;
   1945      1.1  mrg }
   1946      1.1  mrg gfc_common_head;
   1947      1.1  mrg 
   1948      1.1  mrg #define gfc_get_common_head() XCNEW (gfc_common_head)
   1949      1.1  mrg 
   1950      1.1  mrg 
   1951      1.1  mrg /* A list of all the alternate entry points for a procedure.  */
   1952      1.1  mrg 
   1953      1.1  mrg typedef struct gfc_entry_list
   1954      1.1  mrg {
   1955      1.1  mrg   /* The symbol for this entry point.  */
   1956      1.1  mrg   gfc_symbol *sym;
   1957      1.1  mrg   /* The zero-based id of this entry point.  */
   1958      1.1  mrg   int id;
   1959      1.1  mrg   /* The LABEL_EXPR marking this entry point.  */
   1960      1.1  mrg   tree label;
   1961      1.1  mrg   /* The next item in the list.  */
   1962      1.1  mrg   struct gfc_entry_list *next;
   1963      1.1  mrg }
   1964      1.1  mrg gfc_entry_list;
   1965      1.1  mrg 
   1966      1.1  mrg #define gfc_get_entry_list() XCNEW (gfc_entry_list)
   1967      1.1  mrg 
   1968      1.1  mrg /* Lists of rename info for the USE statement.  */
   1969      1.1  mrg 
   1970      1.1  mrg typedef struct gfc_use_rename
   1971      1.1  mrg {
   1972      1.1  mrg   char local_name[GFC_MAX_SYMBOL_LEN + 1], use_name[GFC_MAX_SYMBOL_LEN + 1];
   1973      1.1  mrg   struct gfc_use_rename *next;
   1974      1.1  mrg   int found;
   1975      1.1  mrg   gfc_intrinsic_op op;
   1976      1.1  mrg   locus where;
   1977      1.1  mrg }
   1978      1.1  mrg gfc_use_rename;
   1979      1.1  mrg 
   1980      1.1  mrg #define gfc_get_use_rename() XCNEW (gfc_use_rename);
   1981      1.1  mrg 
   1982      1.1  mrg /* A list of all USE statements in a namespace.  */
   1983      1.1  mrg 
   1984      1.1  mrg typedef struct gfc_use_list
   1985      1.1  mrg {
   1986      1.1  mrg   const char *module_name;
   1987      1.1  mrg   const char *submodule_name;
   1988      1.1  mrg   bool intrinsic;
   1989      1.1  mrg   bool non_intrinsic;
   1990      1.1  mrg   bool only_flag;
   1991      1.1  mrg   struct gfc_use_rename *rename;
   1992      1.1  mrg   locus where;
   1993      1.1  mrg   /* Next USE statement.  */
   1994      1.1  mrg   struct gfc_use_list *next;
   1995      1.1  mrg }
   1996      1.1  mrg gfc_use_list;
   1997      1.1  mrg 
   1998      1.1  mrg #define gfc_get_use_list() XCNEW (gfc_use_list)
   1999      1.1  mrg 
   2000      1.1  mrg /* Within a namespace, symbols are pointed to by symtree nodes that
   2001      1.1  mrg    are linked together in a balanced binary tree.  There can be
   2002      1.1  mrg    several symtrees pointing to the same symbol node via USE
   2003      1.1  mrg    statements.  */
   2004      1.1  mrg 
   2005      1.1  mrg typedef struct gfc_symtree
   2006      1.1  mrg {
   2007      1.1  mrg   BBT_HEADER (gfc_symtree);
   2008      1.1  mrg   const char *name;
   2009      1.1  mrg   int ambiguous;
   2010      1.1  mrg   union
   2011      1.1  mrg   {
   2012      1.1  mrg     gfc_symbol *sym;		/* Symbol associated with this node */
   2013      1.1  mrg     gfc_user_op *uop;
   2014      1.1  mrg     gfc_common_head *common;
   2015      1.1  mrg     gfc_typebound_proc *tb;
   2016      1.1  mrg     gfc_omp_udr *omp_udr;
   2017      1.1  mrg   }
   2018      1.1  mrg   n;
   2019      1.1  mrg }
   2020      1.1  mrg gfc_symtree;
   2021      1.1  mrg 
   2022      1.1  mrg /* A list of all derived types.  */
   2023      1.1  mrg extern gfc_symbol *gfc_derived_types;
   2024      1.1  mrg 
   2025      1.1  mrg typedef struct gfc_oacc_routine_name
   2026      1.1  mrg {
   2027      1.1  mrg   struct gfc_symbol *sym;
   2028      1.1  mrg   struct gfc_omp_clauses *clauses;
   2029      1.1  mrg   struct gfc_oacc_routine_name *next;
   2030      1.1  mrg   locus loc;
   2031      1.1  mrg }
   2032      1.1  mrg gfc_oacc_routine_name;
   2033      1.1  mrg 
   2034      1.1  mrg #define gfc_get_oacc_routine_name() XCNEW (gfc_oacc_routine_name)
   2035      1.1  mrg 
   2036  1.1.1.2  mrg /* Node in linked list to see what has already been finalized
   2037  1.1.1.2  mrg    earlier.  */
   2038  1.1.1.2  mrg 
   2039  1.1.1.2  mrg typedef struct gfc_was_finalized {
   2040  1.1.1.2  mrg   gfc_expr *e;
   2041  1.1.1.2  mrg   gfc_component *c;
   2042  1.1.1.2  mrg   struct gfc_was_finalized *next;
   2043  1.1.1.2  mrg }
   2044  1.1.1.2  mrg gfc_was_finalized;
   2045  1.1.1.2  mrg 
   2046      1.1  mrg /* A namespace describes the contents of procedure, module, interface block
   2047      1.1  mrg    or BLOCK construct.  */
   2048      1.1  mrg /* ??? Anything else use these?  */
   2049      1.1  mrg 
   2050      1.1  mrg typedef struct gfc_namespace
   2051      1.1  mrg {
   2052      1.1  mrg   /* Tree containing all the symbols in this namespace.  */
   2053      1.1  mrg   gfc_symtree *sym_root;
   2054      1.1  mrg   /* Tree containing all the user-defined operators in the namespace.  */
   2055      1.1  mrg   gfc_symtree *uop_root;
   2056      1.1  mrg   /* Tree containing all the common blocks.  */
   2057      1.1  mrg   gfc_symtree *common_root;
   2058      1.1  mrg   /* Tree containing all the OpenMP user defined reductions.  */
   2059      1.1  mrg   gfc_symtree *omp_udr_root;
   2060      1.1  mrg 
   2061      1.1  mrg   /* Tree containing type-bound procedures.  */
   2062      1.1  mrg   gfc_symtree *tb_sym_root;
   2063      1.1  mrg   /* Type-bound user operators.  */
   2064      1.1  mrg   gfc_symtree *tb_uop_root;
   2065      1.1  mrg   /* For derived-types, store type-bound intrinsic operators here.  */
   2066      1.1  mrg   gfc_typebound_proc *tb_op[GFC_INTRINSIC_OPS];
   2067      1.1  mrg   /* Linked list of finalizer procedures.  */
   2068      1.1  mrg   struct gfc_finalizer *finalizers;
   2069      1.1  mrg 
   2070      1.1  mrg   /* If set_flag[letter] is set, an implicit type has been set for letter.  */
   2071      1.1  mrg   int set_flag[GFC_LETTERS];
   2072      1.1  mrg   /* Keeps track of the implicit types associated with the letters.  */
   2073      1.1  mrg   gfc_typespec default_type[GFC_LETTERS];
   2074      1.1  mrg   /* Store the positions of IMPLICIT statements.  */
   2075      1.1  mrg   locus implicit_loc[GFC_LETTERS];
   2076      1.1  mrg 
   2077      1.1  mrg   /* If this is a namespace of a procedure, this points to the procedure.  */
   2078      1.1  mrg   struct gfc_symbol *proc_name;
   2079      1.1  mrg   /* If this is the namespace of a unit which contains executable
   2080      1.1  mrg      code, this points to it.  */
   2081      1.1  mrg   struct gfc_code *code;
   2082      1.1  mrg 
   2083      1.1  mrg   /* Points to the equivalences set up in this namespace.  */
   2084      1.1  mrg   struct gfc_equiv *equiv, *old_equiv;
   2085      1.1  mrg 
   2086      1.1  mrg   /* Points to the equivalence groups produced by trans_common.  */
   2087      1.1  mrg   struct gfc_equiv_list *equiv_lists;
   2088      1.1  mrg 
   2089      1.1  mrg   gfc_interface *op[GFC_INTRINSIC_OPS];
   2090      1.1  mrg 
   2091      1.1  mrg   /* Points to the parent namespace, i.e. the namespace of a module or
   2092      1.1  mrg      procedure in which the procedure belonging to this namespace is
   2093      1.1  mrg      contained. The parent namespace points to this namespace either
   2094      1.1  mrg      directly via CONTAINED, or indirectly via the chain built by
   2095      1.1  mrg      SIBLING.  */
   2096      1.1  mrg   struct gfc_namespace *parent;
   2097      1.1  mrg   /* CONTAINED points to the first contained namespace. Sibling
   2098      1.1  mrg      namespaces are chained via SIBLING.  */
   2099      1.1  mrg   struct gfc_namespace  *contained, *sibling;
   2100      1.1  mrg 
   2101      1.1  mrg   gfc_common_head blank_common;
   2102      1.1  mrg   gfc_access default_access, operator_access[GFC_INTRINSIC_OPS];
   2103      1.1  mrg 
   2104      1.1  mrg   gfc_st_label *st_labels;
   2105      1.1  mrg   /* This list holds information about all the data initializers in
   2106      1.1  mrg      this namespace.  */
   2107      1.1  mrg   struct gfc_data *data, *old_data;
   2108      1.1  mrg 
   2109      1.1  mrg   /* !$ACC DECLARE.  */
   2110      1.1  mrg   gfc_oacc_declare *oacc_declare;
   2111      1.1  mrg 
   2112      1.1  mrg   /* !$ACC ROUTINE clauses.  */
   2113      1.1  mrg   gfc_omp_clauses *oacc_routine_clauses;
   2114      1.1  mrg 
   2115  1.1.1.3  mrg   /* !$ACC TASK AFFINITY iterator symbols.  */
   2116  1.1.1.3  mrg   gfc_symbol *omp_affinity_iterators;
   2117  1.1.1.3  mrg 
   2118      1.1  mrg   /* !$ACC ROUTINE names.  */
   2119      1.1  mrg   gfc_oacc_routine_name *oacc_routine_names;
   2120      1.1  mrg 
   2121      1.1  mrg   gfc_charlen *cl_list;
   2122      1.1  mrg 
   2123      1.1  mrg   gfc_symbol *derived_types;
   2124      1.1  mrg 
   2125      1.1  mrg   int save_all, seen_save, seen_implicit_none;
   2126      1.1  mrg 
   2127      1.1  mrg   /* Normally we don't need to refcount namespaces.  However when we read
   2128      1.1  mrg      a module containing a function with multiple entry points, this
   2129      1.1  mrg      will appear as several functions with the same formal namespace.  */
   2130      1.1  mrg   int refs;
   2131      1.1  mrg 
   2132      1.1  mrg   /* A list of all alternate entry points to this procedure (or NULL).  */
   2133      1.1  mrg   gfc_entry_list *entries;
   2134      1.1  mrg 
   2135      1.1  mrg   /* A list of USE statements in this namespace.  */
   2136      1.1  mrg   gfc_use_list *use_stmts;
   2137      1.1  mrg 
   2138      1.1  mrg   /* Linked list of !$omp declare simd constructs.  */
   2139      1.1  mrg   struct gfc_omp_declare_simd *omp_declare_simd;
   2140      1.1  mrg 
   2141  1.1.1.3  mrg   /* Linked list of !$omp declare variant constructs.  */
   2142  1.1.1.3  mrg   struct gfc_omp_declare_variant *omp_declare_variant;
   2143  1.1.1.3  mrg 
   2144  1.1.1.3  mrg   /* A hash set for the gfc expressions that have already
   2145  1.1.1.2  mrg      been finalized in this namespace.  */
   2146  1.1.1.2  mrg 
   2147  1.1.1.2  mrg   gfc_was_finalized *was_finalized;
   2148  1.1.1.2  mrg 
   2149      1.1  mrg   /* Set to 1 if namespace is a BLOCK DATA program unit.  */
   2150      1.1  mrg   unsigned is_block_data:1;
   2151      1.1  mrg 
   2152      1.1  mrg   /* Set to 1 if namespace is an interface body with "IMPORT" used.  */
   2153      1.1  mrg   unsigned has_import_set:1;
   2154      1.1  mrg 
   2155      1.1  mrg   /* Set to 1 if the namespace uses "IMPLICT NONE (export)".  */
   2156      1.1  mrg   unsigned has_implicit_none_export:1;
   2157      1.1  mrg 
   2158      1.1  mrg   /* Set to 1 if resolved has been called for this namespace.
   2159      1.1  mrg      Holds -1 during resolution.  */
   2160      1.1  mrg   signed resolved:2;
   2161      1.1  mrg 
   2162      1.1  mrg   /* Set when resolve_types has been called for this namespace.  */
   2163      1.1  mrg   unsigned types_resolved:1;
   2164      1.1  mrg 
   2165      1.1  mrg   /* Set to 1 if code has been generated for this namespace.  */
   2166      1.1  mrg   unsigned translated:1;
   2167      1.1  mrg 
   2168      1.1  mrg   /* Set to 1 if symbols in this namespace should be 'construct entities',
   2169      1.1  mrg      i.e. for BLOCK local variables.  */
   2170      1.1  mrg   unsigned construct_entities:1;
   2171      1.1  mrg 
   2172      1.1  mrg   /* Set to 1 for !$OMP DECLARE REDUCTION namespaces.  */
   2173      1.1  mrg   unsigned omp_udr_ns:1;
   2174      1.1  mrg 
   2175      1.1  mrg   /* Set to 1 for !$ACC ROUTINE namespaces.  */
   2176      1.1  mrg   unsigned oacc_routine:1;
   2177      1.1  mrg 
   2178      1.1  mrg   /* Set to 1 if there are any calls to procedures with implicit interface.  */
   2179      1.1  mrg   unsigned implicit_interface_calls:1;
   2180  1.1.1.3  mrg 
   2181  1.1.1.3  mrg   /* OpenMP requires. */
   2182  1.1.1.3  mrg   unsigned omp_requires:6;
   2183  1.1.1.3  mrg   unsigned omp_target_seen:1;
   2184      1.1  mrg }
   2185      1.1  mrg gfc_namespace;
   2186      1.1  mrg 
   2187      1.1  mrg extern gfc_namespace *gfc_current_ns;
   2188      1.1  mrg extern gfc_namespace *gfc_global_ns_list;
   2189      1.1  mrg 
   2190      1.1  mrg /* Global symbols are symbols of global scope. Currently we only use
   2191      1.1  mrg    this to detect collisions already when parsing.
   2192      1.1  mrg    TODO: Extend to verify procedure calls.  */
   2193      1.1  mrg 
   2194      1.1  mrg enum gfc_symbol_type
   2195      1.1  mrg {
   2196      1.1  mrg   GSYM_UNKNOWN=1, GSYM_PROGRAM, GSYM_FUNCTION, GSYM_SUBROUTINE,
   2197      1.1  mrg   GSYM_MODULE, GSYM_COMMON, GSYM_BLOCK_DATA
   2198      1.1  mrg };
   2199      1.1  mrg 
   2200      1.1  mrg typedef struct gfc_gsymbol
   2201      1.1  mrg {
   2202      1.1  mrg   BBT_HEADER(gfc_gsymbol);
   2203      1.1  mrg 
   2204      1.1  mrg   const char *name;
   2205      1.1  mrg   const char *sym_name;
   2206      1.1  mrg   const char *mod_name;
   2207      1.1  mrg   const char *binding_label;
   2208      1.1  mrg   enum gfc_symbol_type type;
   2209      1.1  mrg 
   2210      1.1  mrg   int defined, used;
   2211      1.1  mrg   bool bind_c;
   2212      1.1  mrg   locus where;
   2213      1.1  mrg   gfc_namespace *ns;
   2214      1.1  mrg }
   2215      1.1  mrg gfc_gsymbol;
   2216      1.1  mrg 
   2217      1.1  mrg extern gfc_gsymbol *gfc_gsym_root;
   2218      1.1  mrg 
   2219      1.1  mrg /* Information on interfaces being built.  */
   2220      1.1  mrg typedef struct
   2221      1.1  mrg {
   2222      1.1  mrg   interface_type type;
   2223      1.1  mrg   gfc_symbol *sym;
   2224      1.1  mrg   gfc_namespace *ns;
   2225      1.1  mrg   gfc_user_op *uop;
   2226      1.1  mrg   gfc_intrinsic_op op;
   2227      1.1  mrg }
   2228      1.1  mrg gfc_interface_info;
   2229      1.1  mrg 
   2230      1.1  mrg extern gfc_interface_info current_interface;
   2231      1.1  mrg 
   2232      1.1  mrg 
   2233      1.1  mrg /* Array reference.  */
   2234      1.1  mrg 
   2235      1.1  mrg enum gfc_array_ref_dimen_type
   2236      1.1  mrg {
   2237      1.1  mrg   DIMEN_ELEMENT = 1, DIMEN_RANGE, DIMEN_VECTOR, DIMEN_STAR, DIMEN_THIS_IMAGE, DIMEN_UNKNOWN
   2238      1.1  mrg };
   2239      1.1  mrg 
   2240      1.1  mrg typedef struct gfc_array_ref
   2241      1.1  mrg {
   2242      1.1  mrg   ar_type type;
   2243      1.1  mrg   int dimen;			/* # of components in the reference */
   2244      1.1  mrg   int codimen;
   2245      1.1  mrg   bool in_allocate;		/* For coarray checks. */
   2246      1.1  mrg   gfc_expr *team;
   2247      1.1  mrg   gfc_expr *stat;
   2248      1.1  mrg   locus where;
   2249      1.1  mrg   gfc_array_spec *as;
   2250      1.1  mrg 
   2251      1.1  mrg   locus c_where[GFC_MAX_DIMENSIONS];	/* All expressions can be NULL */
   2252      1.1  mrg   struct gfc_expr *start[GFC_MAX_DIMENSIONS], *end[GFC_MAX_DIMENSIONS],
   2253      1.1  mrg     *stride[GFC_MAX_DIMENSIONS];
   2254      1.1  mrg 
   2255      1.1  mrg   enum gfc_array_ref_dimen_type dimen_type[GFC_MAX_DIMENSIONS];
   2256      1.1  mrg }
   2257      1.1  mrg gfc_array_ref;
   2258      1.1  mrg 
   2259      1.1  mrg #define gfc_get_array_ref() XCNEW (gfc_array_ref)
   2260      1.1  mrg 
   2261      1.1  mrg 
   2262      1.1  mrg /* Component reference nodes.  A variable is stored as an expression
   2263      1.1  mrg    node that points to the base symbol.  After that, a singly linked
   2264      1.1  mrg    list of component reference nodes gives the variable's complete
   2265      1.1  mrg    resolution.  The array_ref component may be present and comes
   2266      1.1  mrg    before the component component.  */
   2267      1.1  mrg 
   2268      1.1  mrg enum ref_type
   2269      1.1  mrg   { REF_ARRAY, REF_COMPONENT, REF_SUBSTRING, REF_INQUIRY };
   2270      1.1  mrg 
   2271      1.1  mrg enum inquiry_type
   2272      1.1  mrg   { INQUIRY_RE, INQUIRY_IM, INQUIRY_KIND, INQUIRY_LEN };
   2273      1.1  mrg 
   2274      1.1  mrg typedef struct gfc_ref
   2275      1.1  mrg {
   2276      1.1  mrg   ref_type type;
   2277      1.1  mrg 
   2278      1.1  mrg   union
   2279      1.1  mrg   {
   2280      1.1  mrg     struct gfc_array_ref ar;
   2281      1.1  mrg 
   2282      1.1  mrg     struct
   2283      1.1  mrg     {
   2284      1.1  mrg       gfc_component *component;
   2285      1.1  mrg       gfc_symbol *sym;
   2286      1.1  mrg     }
   2287      1.1  mrg     c;
   2288      1.1  mrg 
   2289      1.1  mrg     struct
   2290      1.1  mrg     {
   2291      1.1  mrg       struct gfc_expr *start, *end;	/* Substring */
   2292      1.1  mrg       gfc_charlen *length;
   2293      1.1  mrg     }
   2294      1.1  mrg     ss;
   2295      1.1  mrg 
   2296      1.1  mrg     inquiry_type i;
   2297      1.1  mrg 
   2298      1.1  mrg   }
   2299      1.1  mrg   u;
   2300      1.1  mrg 
   2301      1.1  mrg   struct gfc_ref *next;
   2302      1.1  mrg }
   2303      1.1  mrg gfc_ref;
   2304      1.1  mrg 
   2305      1.1  mrg #define gfc_get_ref() XCNEW (gfc_ref)
   2306      1.1  mrg 
   2307      1.1  mrg 
   2308      1.1  mrg /* Structures representing intrinsic symbols and their arguments lists.  */
   2309      1.1  mrg typedef struct gfc_intrinsic_arg
   2310      1.1  mrg {
   2311      1.1  mrg   char name[GFC_MAX_SYMBOL_LEN + 1];
   2312      1.1  mrg 
   2313      1.1  mrg   gfc_typespec ts;
   2314      1.1  mrg   unsigned optional:1, value:1;
   2315      1.1  mrg   ENUM_BITFIELD (sym_intent) intent:2;
   2316      1.1  mrg 
   2317      1.1  mrg   struct gfc_intrinsic_arg *next;
   2318      1.1  mrg }
   2319      1.1  mrg gfc_intrinsic_arg;
   2320      1.1  mrg 
   2321      1.1  mrg 
   2322  1.1.1.3  mrg typedef enum {
   2323  1.1.1.3  mrg   GFC_UNDEFINED_DUMMY_ARG = 0,
   2324  1.1.1.3  mrg   GFC_INTRINSIC_DUMMY_ARG,
   2325  1.1.1.3  mrg   GFC_NON_INTRINSIC_DUMMY_ARG
   2326  1.1.1.3  mrg }
   2327  1.1.1.3  mrg gfc_dummy_arg_intrinsicness;
   2328  1.1.1.3  mrg 
   2329  1.1.1.3  mrg /* dummy arg of either an intrinsic or a user-defined procedure.  */
   2330  1.1.1.3  mrg struct gfc_dummy_arg
   2331  1.1.1.3  mrg {
   2332  1.1.1.3  mrg   gfc_dummy_arg_intrinsicness intrinsicness;
   2333  1.1.1.3  mrg 
   2334  1.1.1.3  mrg   union {
   2335  1.1.1.3  mrg     gfc_intrinsic_arg *intrinsic;
   2336  1.1.1.3  mrg     gfc_formal_arglist *non_intrinsic;
   2337  1.1.1.3  mrg   } u;
   2338  1.1.1.3  mrg };
   2339  1.1.1.3  mrg 
   2340  1.1.1.3  mrg #define gfc_get_dummy_arg() XCNEW (gfc_dummy_arg)
   2341  1.1.1.3  mrg 
   2342  1.1.1.3  mrg 
   2343  1.1.1.3  mrg const char * gfc_dummy_arg_get_name (gfc_dummy_arg &);
   2344  1.1.1.3  mrg const gfc_typespec & gfc_dummy_arg_get_typespec (gfc_dummy_arg &);
   2345  1.1.1.3  mrg bool gfc_dummy_arg_is_optional (gfc_dummy_arg &);
   2346  1.1.1.3  mrg 
   2347  1.1.1.3  mrg 
   2348      1.1  mrg /* Specifies the various kinds of check functions used to verify the
   2349      1.1  mrg    argument lists of intrinsic functions. fX with X an integer refer
   2350      1.1  mrg    to check functions of intrinsics with X arguments. f1m is used for
   2351      1.1  mrg    the MAX and MIN intrinsics which can have an arbitrary number of
   2352      1.1  mrg    arguments, f4ml is used for the MINLOC and MAXLOC intrinsics as
   2353      1.1  mrg    these have special semantics.  */
   2354      1.1  mrg 
   2355      1.1  mrg typedef union
   2356      1.1  mrg {
   2357      1.1  mrg   bool (*f0)(void);
   2358      1.1  mrg   bool (*f1)(struct gfc_expr *);
   2359      1.1  mrg   bool (*f1m)(gfc_actual_arglist *);
   2360      1.1  mrg   bool (*f2)(struct gfc_expr *, struct gfc_expr *);
   2361      1.1  mrg   bool (*f3)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *);
   2362      1.1  mrg   bool (*f5ml)(gfc_actual_arglist *);
   2363      1.1  mrg   bool (*f6fl)(gfc_actual_arglist *);
   2364      1.1  mrg   bool (*f3red)(gfc_actual_arglist *);
   2365      1.1  mrg   bool (*f4)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
   2366      1.1  mrg 	    struct gfc_expr *);
   2367      1.1  mrg   bool (*f5)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
   2368      1.1  mrg 	    struct gfc_expr *, struct gfc_expr *);
   2369      1.1  mrg }
   2370      1.1  mrg gfc_check_f;
   2371      1.1  mrg 
   2372      1.1  mrg /* Like gfc_check_f, these specify the type of the simplification
   2373      1.1  mrg    function associated with an intrinsic. The fX are just like in
   2374      1.1  mrg    gfc_check_f. cc is used for type conversion functions.  */
   2375      1.1  mrg 
   2376      1.1  mrg typedef union
   2377      1.1  mrg {
   2378      1.1  mrg   struct gfc_expr *(*f0)(void);
   2379      1.1  mrg   struct gfc_expr *(*f1)(struct gfc_expr *);
   2380      1.1  mrg   struct gfc_expr *(*f2)(struct gfc_expr *, struct gfc_expr *);
   2381      1.1  mrg   struct gfc_expr *(*f3)(struct gfc_expr *, struct gfc_expr *,
   2382      1.1  mrg 			 struct gfc_expr *);
   2383      1.1  mrg   struct gfc_expr *(*f4)(struct gfc_expr *, struct gfc_expr *,
   2384      1.1  mrg 			 struct gfc_expr *, struct gfc_expr *);
   2385      1.1  mrg   struct gfc_expr *(*f5)(struct gfc_expr *, struct gfc_expr *,
   2386      1.1  mrg 			 struct gfc_expr *, struct gfc_expr *,
   2387      1.1  mrg 			 struct gfc_expr *);
   2388      1.1  mrg   struct gfc_expr *(*f6)(struct gfc_expr *, struct gfc_expr *,
   2389      1.1  mrg 			 struct gfc_expr *, struct gfc_expr *,
   2390      1.1  mrg 			 struct gfc_expr *, struct gfc_expr *);
   2391      1.1  mrg   struct gfc_expr *(*cc)(struct gfc_expr *, bt, int);
   2392      1.1  mrg }
   2393      1.1  mrg gfc_simplify_f;
   2394      1.1  mrg 
   2395      1.1  mrg /* Again like gfc_check_f, these specify the type of the resolution
   2396      1.1  mrg    function associated with an intrinsic. The fX are just like in
   2397      1.1  mrg    gfc_check_f. f1m is used for MIN and MAX, s1 is used for abort().  */
   2398      1.1  mrg 
   2399      1.1  mrg typedef union
   2400      1.1  mrg {
   2401      1.1  mrg   void (*f0)(struct gfc_expr *);
   2402      1.1  mrg   void (*f1)(struct gfc_expr *, struct gfc_expr *);
   2403      1.1  mrg   void (*f1m)(struct gfc_expr *, struct gfc_actual_arglist *);
   2404      1.1  mrg   void (*f2)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *);
   2405      1.1  mrg   void (*f3)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
   2406      1.1  mrg 	     struct gfc_expr *);
   2407      1.1  mrg   void (*f4)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
   2408      1.1  mrg 	     struct gfc_expr *, struct gfc_expr *);
   2409      1.1  mrg   void (*f5)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
   2410      1.1  mrg 	     struct gfc_expr *, struct gfc_expr *, struct gfc_expr *);
   2411      1.1  mrg   void (*f6)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
   2412      1.1  mrg 	     struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
   2413      1.1  mrg 	     struct gfc_expr *);
   2414      1.1  mrg   void (*s1)(struct gfc_code *);
   2415      1.1  mrg }
   2416      1.1  mrg gfc_resolve_f;
   2417      1.1  mrg 
   2418      1.1  mrg 
   2419      1.1  mrg typedef struct gfc_intrinsic_sym
   2420      1.1  mrg {
   2421      1.1  mrg   const char *name, *lib_name;
   2422      1.1  mrg   gfc_intrinsic_arg *formal;
   2423      1.1  mrg   gfc_typespec ts;
   2424      1.1  mrg   unsigned elemental:1, inquiry:1, transformational:1, pure:1,
   2425      1.1  mrg     generic:1, specific:1, actual_ok:1, noreturn:1, conversion:1,
   2426      1.1  mrg     from_module:1, vararg:1;
   2427      1.1  mrg 
   2428      1.1  mrg   int standard;
   2429      1.1  mrg 
   2430      1.1  mrg   gfc_simplify_f simplify;
   2431      1.1  mrg   gfc_check_f check;
   2432      1.1  mrg   gfc_resolve_f resolve;
   2433      1.1  mrg   struct gfc_intrinsic_sym *specific_head, *next;
   2434      1.1  mrg   gfc_isym_id id;
   2435      1.1  mrg 
   2436      1.1  mrg }
   2437      1.1  mrg gfc_intrinsic_sym;
   2438      1.1  mrg 
   2439      1.1  mrg 
   2440      1.1  mrg /* Expression nodes.  The expression node types deserve explanations,
   2441      1.1  mrg    since the last couple can be easily misconstrued:
   2442      1.1  mrg 
   2443      1.1  mrg    EXPR_OP         Operator node pointing to one or two other nodes
   2444      1.1  mrg    EXPR_FUNCTION   Function call, symbol points to function's name
   2445      1.1  mrg    EXPR_CONSTANT   A scalar constant: Logical, String, Real, Int or Complex
   2446      1.1  mrg    EXPR_VARIABLE   An Lvalue with a root symbol and possible reference list
   2447      1.1  mrg 		   which expresses structure, array and substring refs.
   2448      1.1  mrg    EXPR_NULL       The NULL pointer value (which also has a basic type).
   2449      1.1  mrg    EXPR_SUBSTRING  A substring of a constant string
   2450      1.1  mrg    EXPR_STRUCTURE  A structure constructor
   2451      1.1  mrg    EXPR_ARRAY      An array constructor.
   2452      1.1  mrg    EXPR_COMPCALL   Function (or subroutine) call of a procedure pointer
   2453      1.1  mrg 		   component or type-bound procedure.  */
   2454      1.1  mrg 
   2455      1.1  mrg #include <mpfr.h>
   2456      1.1  mrg #include <mpc.h>
   2457  1.1.1.2  mrg #define GFC_RND_MODE MPFR_RNDN
   2458      1.1  mrg #define GFC_MPC_RND_MODE MPC_RNDNN
   2459      1.1  mrg 
   2460      1.1  mrg typedef splay_tree gfc_constructor_base;
   2461      1.1  mrg 
   2462      1.1  mrg 
   2463      1.1  mrg /* This should be an unsigned variable of type size_t.  But to handle
   2464      1.1  mrg    compiling to a 64-bit target from a 32-bit host, we need to use a
   2465      1.1  mrg    HOST_WIDE_INT.  Also, occasionally the string length field is used
   2466      1.1  mrg    as a flag with values -1 and -2, see e.g. gfc_add_assign_aux_vars.
   2467      1.1  mrg    So it needs to be signed.  */
   2468      1.1  mrg typedef HOST_WIDE_INT gfc_charlen_t;
   2469      1.1  mrg 
   2470      1.1  mrg typedef struct gfc_expr
   2471      1.1  mrg {
   2472      1.1  mrg   expr_t expr_type;
   2473      1.1  mrg 
   2474      1.1  mrg   gfc_typespec ts;	/* These two refer to the overall expression */
   2475      1.1  mrg 
   2476      1.1  mrg   int rank;		/* 0 indicates a scalar, -1 an assumed-rank array.  */
   2477      1.1  mrg   mpz_t *shape;		/* Can be NULL if shape is unknown at compile time */
   2478      1.1  mrg 
   2479      1.1  mrg   /* Nonnull for functions and structure constructors, may also used to hold the
   2480      1.1  mrg      base-object for component calls.  */
   2481      1.1  mrg   gfc_symtree *symtree;
   2482      1.1  mrg 
   2483      1.1  mrg   gfc_ref *ref;
   2484      1.1  mrg 
   2485      1.1  mrg   locus where;
   2486      1.1  mrg 
   2487      1.1  mrg   /* Used to store the base expression in component calls, when the expression
   2488      1.1  mrg      is not a variable.  */
   2489      1.1  mrg   struct gfc_expr *base_expr;
   2490      1.1  mrg 
   2491  1.1.1.2  mrg   /* is_snan denotes a signalling not-a-number.  */
   2492  1.1.1.2  mrg   unsigned int is_snan : 1;
   2493      1.1  mrg 
   2494      1.1  mrg   /* Sometimes, when an error has been emitted, it is necessary to prevent
   2495      1.1  mrg       it from recurring.  */
   2496      1.1  mrg   unsigned int error : 1;
   2497      1.1  mrg 
   2498      1.1  mrg   /* Mark an expression where a user operator has been substituted by
   2499  1.1.1.3  mrg      a function call in interface.cc(gfc_extend_expr).  */
   2500      1.1  mrg   unsigned int user_operator : 1;
   2501      1.1  mrg 
   2502      1.1  mrg   /* Mark an expression as being a MOLD argument of ALLOCATE.  */
   2503      1.1  mrg   unsigned int mold : 1;
   2504      1.1  mrg 
   2505      1.1  mrg   /* Will require finalization after use.  */
   2506      1.1  mrg   unsigned int must_finalize : 1;
   2507      1.1  mrg 
   2508      1.1  mrg   /* Set this if no range check should be performed on this expression.  */
   2509      1.1  mrg 
   2510      1.1  mrg   unsigned int no_bounds_check : 1;
   2511      1.1  mrg 
   2512      1.1  mrg   /* Set this if a matmul expression has already been evaluated for conversion
   2513      1.1  mrg      to a BLAS call.  */
   2514      1.1  mrg 
   2515      1.1  mrg   unsigned int external_blas : 1;
   2516      1.1  mrg 
   2517      1.1  mrg   /* Set this if resolution has already happened. It could be harmful
   2518      1.1  mrg      if done again.  */
   2519      1.1  mrg 
   2520      1.1  mrg   unsigned int do_not_resolve_again : 1;
   2521      1.1  mrg 
   2522      1.1  mrg   /* Set this if no warning should be given somewhere in a lower level.  */
   2523      1.1  mrg 
   2524      1.1  mrg   unsigned int do_not_warn : 1;
   2525  1.1.1.2  mrg 
   2526  1.1.1.2  mrg   /* Set this if the expression came from expanding an array constructor.  */
   2527  1.1.1.2  mrg   unsigned int from_constructor : 1;
   2528  1.1.1.2  mrg 
   2529      1.1  mrg   /* If an expression comes from a Hollerith constant or compile-time
   2530      1.1  mrg      evaluation of a transfer statement, it may have a prescribed target-
   2531      1.1  mrg      memory representation, and these cannot always be backformed from
   2532      1.1  mrg      the value.  */
   2533      1.1  mrg   struct
   2534      1.1  mrg   {
   2535      1.1  mrg     gfc_charlen_t length;
   2536      1.1  mrg     char *string;
   2537      1.1  mrg   }
   2538      1.1  mrg   representation;
   2539      1.1  mrg 
   2540  1.1.1.2  mrg   struct
   2541  1.1.1.2  mrg   {
   2542  1.1.1.2  mrg     int len;	/* Length of BOZ string without terminating NULL.  */
   2543  1.1.1.2  mrg     int rdx;	/* Radix of BOZ.  */
   2544  1.1.1.2  mrg     char *str;	/* BOZ string with NULL terminating character.  */
   2545  1.1.1.2  mrg   }
   2546  1.1.1.2  mrg   boz;
   2547  1.1.1.2  mrg 
   2548      1.1  mrg   union
   2549      1.1  mrg   {
   2550      1.1  mrg     int logical;
   2551      1.1  mrg 
   2552      1.1  mrg     io_kind iokind;
   2553      1.1  mrg 
   2554      1.1  mrg     mpz_t integer;
   2555      1.1  mrg 
   2556      1.1  mrg     mpfr_t real;
   2557      1.1  mrg 
   2558      1.1  mrg     mpc_t complex;
   2559      1.1  mrg 
   2560      1.1  mrg     struct
   2561      1.1  mrg     {
   2562      1.1  mrg       gfc_intrinsic_op op;
   2563      1.1  mrg       gfc_user_op *uop;
   2564      1.1  mrg       struct gfc_expr *op1, *op2;
   2565      1.1  mrg     }
   2566      1.1  mrg     op;
   2567      1.1  mrg 
   2568      1.1  mrg     struct
   2569      1.1  mrg     {
   2570      1.1  mrg       gfc_actual_arglist *actual;
   2571      1.1  mrg       const char *name;	/* Points to the ultimate name of the function */
   2572      1.1  mrg       gfc_intrinsic_sym *isym;
   2573      1.1  mrg       gfc_symbol *esym;
   2574      1.1  mrg     }
   2575      1.1  mrg     function;
   2576      1.1  mrg 
   2577      1.1  mrg     struct
   2578      1.1  mrg     {
   2579      1.1  mrg       gfc_actual_arglist* actual;
   2580      1.1  mrg       const char* name;
   2581      1.1  mrg       /* Base-object, whose component was called.  NULL means that it should
   2582      1.1  mrg 	 be taken from symtree/ref.  */
   2583      1.1  mrg       struct gfc_expr* base_object;
   2584      1.1  mrg       gfc_typebound_proc* tbp; /* Should overlap with esym.  */
   2585      1.1  mrg 
   2586      1.1  mrg       /* For type-bound operators, we want to call PASS procedures but already
   2587      1.1  mrg 	 have the full arglist; mark this, so that it is not extended by the
   2588      1.1  mrg 	 PASS argument.  */
   2589      1.1  mrg       unsigned ignore_pass:1;
   2590      1.1  mrg 
   2591      1.1  mrg       /* Do assign-calls rather than calls, that is appropriate dependency
   2592      1.1  mrg 	 checking.  */
   2593      1.1  mrg       unsigned assign:1;
   2594      1.1  mrg     }
   2595      1.1  mrg     compcall;
   2596      1.1  mrg 
   2597      1.1  mrg     struct
   2598      1.1  mrg     {
   2599      1.1  mrg       gfc_charlen_t length;
   2600      1.1  mrg       gfc_char_t *string;
   2601      1.1  mrg     }
   2602      1.1  mrg     character;
   2603      1.1  mrg 
   2604      1.1  mrg     gfc_constructor_base constructor;
   2605      1.1  mrg   }
   2606      1.1  mrg   value;
   2607      1.1  mrg 
   2608      1.1  mrg   /* Used to store PDT expression lists associated with expressions.  */
   2609      1.1  mrg   gfc_actual_arglist *param_list;
   2610      1.1  mrg 
   2611      1.1  mrg }
   2612      1.1  mrg gfc_expr;
   2613      1.1  mrg 
   2614      1.1  mrg 
   2615      1.1  mrg #define gfc_get_shape(rank) (XCNEWVEC (mpz_t, (rank)))
   2616      1.1  mrg 
   2617      1.1  mrg /* Structures for information associated with different kinds of
   2618      1.1  mrg    numbers.  The first set of integer parameters define all there is
   2619      1.1  mrg    to know about a particular kind.  The rest of the elements are
   2620      1.1  mrg    computed from the first elements.  */
   2621      1.1  mrg 
   2622      1.1  mrg typedef struct
   2623      1.1  mrg {
   2624      1.1  mrg   /* Values really representable by the target.  */
   2625      1.1  mrg   mpz_t huge, pedantic_min_int, min_int;
   2626      1.1  mrg 
   2627      1.1  mrg   int kind, radix, digits, bit_size, range;
   2628      1.1  mrg 
   2629      1.1  mrg   /* True if the C type of the given name maps to this precision.
   2630      1.1  mrg      Note that more than one bit can be set.  */
   2631      1.1  mrg   unsigned int c_char : 1;
   2632      1.1  mrg   unsigned int c_short : 1;
   2633      1.1  mrg   unsigned int c_int : 1;
   2634      1.1  mrg   unsigned int c_long : 1;
   2635      1.1  mrg   unsigned int c_long_long : 1;
   2636      1.1  mrg }
   2637      1.1  mrg gfc_integer_info;
   2638      1.1  mrg 
   2639      1.1  mrg extern gfc_integer_info gfc_integer_kinds[];
   2640      1.1  mrg 
   2641      1.1  mrg 
   2642      1.1  mrg typedef struct
   2643      1.1  mrg {
   2644      1.1  mrg   int kind, bit_size;
   2645      1.1  mrg 
   2646      1.1  mrg   /* True if the C++ type bool, C99 type _Bool, maps to this precision.  */
   2647      1.1  mrg   unsigned int c_bool : 1;
   2648      1.1  mrg }
   2649      1.1  mrg gfc_logical_info;
   2650      1.1  mrg 
   2651      1.1  mrg extern gfc_logical_info gfc_logical_kinds[];
   2652      1.1  mrg 
   2653      1.1  mrg 
   2654      1.1  mrg typedef struct
   2655      1.1  mrg {
   2656      1.1  mrg   mpfr_t epsilon, huge, tiny, subnormal;
   2657  1.1.1.3  mrg   int kind, abi_kind, radix, digits, min_exponent, max_exponent;
   2658      1.1  mrg   int range, precision;
   2659      1.1  mrg 
   2660      1.1  mrg   /* The precision of the type as reported by GET_MODE_PRECISION.  */
   2661      1.1  mrg   int mode_precision;
   2662      1.1  mrg 
   2663      1.1  mrg   /* True if the C type of the given name maps to this precision.
   2664      1.1  mrg      Note that more than one bit can be set.  */
   2665      1.1  mrg   unsigned int c_float : 1;
   2666      1.1  mrg   unsigned int c_double : 1;
   2667      1.1  mrg   unsigned int c_long_double : 1;
   2668      1.1  mrg   unsigned int c_float128 : 1;
   2669      1.1  mrg }
   2670      1.1  mrg gfc_real_info;
   2671      1.1  mrg 
   2672      1.1  mrg extern gfc_real_info gfc_real_kinds[];
   2673      1.1  mrg 
   2674      1.1  mrg typedef struct
   2675      1.1  mrg {
   2676      1.1  mrg   int kind, bit_size;
   2677      1.1  mrg   const char *name;
   2678      1.1  mrg }
   2679      1.1  mrg gfc_character_info;
   2680      1.1  mrg 
   2681      1.1  mrg extern gfc_character_info gfc_character_kinds[];
   2682      1.1  mrg 
   2683      1.1  mrg 
   2684      1.1  mrg /* Equivalence structures.  Equivalent lvalues are linked along the
   2685      1.1  mrg    *eq pointer, equivalence sets are strung along the *next node.  */
   2686      1.1  mrg typedef struct gfc_equiv
   2687      1.1  mrg {
   2688      1.1  mrg   struct gfc_equiv *next, *eq;
   2689      1.1  mrg   gfc_expr *expr;
   2690      1.1  mrg   const char *module;
   2691      1.1  mrg   int used;
   2692      1.1  mrg }
   2693      1.1  mrg gfc_equiv;
   2694      1.1  mrg 
   2695      1.1  mrg #define gfc_get_equiv() XCNEW (gfc_equiv)
   2696      1.1  mrg 
   2697      1.1  mrg /* Holds a single equivalence member after processing.  */
   2698      1.1  mrg typedef struct gfc_equiv_info
   2699      1.1  mrg {
   2700      1.1  mrg   gfc_symbol *sym;
   2701      1.1  mrg   HOST_WIDE_INT offset;
   2702      1.1  mrg   HOST_WIDE_INT length;
   2703      1.1  mrg   struct gfc_equiv_info *next;
   2704      1.1  mrg } gfc_equiv_info;
   2705      1.1  mrg 
   2706      1.1  mrg /* Holds equivalence groups, after they have been processed.  */
   2707      1.1  mrg typedef struct gfc_equiv_list
   2708      1.1  mrg {
   2709      1.1  mrg   gfc_equiv_info *equiv;
   2710      1.1  mrg   struct gfc_equiv_list *next;
   2711      1.1  mrg } gfc_equiv_list;
   2712      1.1  mrg 
   2713      1.1  mrg /* gfc_case stores the selector list of a case statement.  The *low
   2714      1.1  mrg    and *high pointers can point to the same expression in the case of
   2715      1.1  mrg    a single value.  If *high is NULL, the selection is from *low
   2716      1.1  mrg    upwards, if *low is NULL the selection is *high downwards.
   2717      1.1  mrg 
   2718      1.1  mrg    This structure has separate fields to allow single and double linked
   2719      1.1  mrg    lists of CASEs at the same time.  The singe linked list along the NEXT
   2720      1.1  mrg    field is a list of cases for a single CASE label.  The double linked
   2721      1.1  mrg    list along the LEFT/RIGHT fields is used to detect overlap and to
   2722      1.1  mrg    build a table of the cases for SELECT constructs with a CHARACTER
   2723      1.1  mrg    case expression.  */
   2724      1.1  mrg 
   2725      1.1  mrg typedef struct gfc_case
   2726      1.1  mrg {
   2727      1.1  mrg   /* Where we saw this case.  */
   2728      1.1  mrg   locus where;
   2729      1.1  mrg   int n;
   2730      1.1  mrg 
   2731      1.1  mrg   /* Case range values.  If (low == high), it's a single value.  If one of
   2732      1.1  mrg      the labels is NULL, it's an unbounded case.  If both are NULL, this
   2733      1.1  mrg      represents the default case.  */
   2734      1.1  mrg   gfc_expr *low, *high;
   2735      1.1  mrg 
   2736      1.1  mrg   /* Only used for SELECT TYPE.  */
   2737      1.1  mrg   gfc_typespec ts;
   2738      1.1  mrg 
   2739      1.1  mrg   /* Next case label in the list of cases for a single CASE label.  */
   2740      1.1  mrg   struct gfc_case *next;
   2741      1.1  mrg 
   2742      1.1  mrg   /* Used for detecting overlap, and for code generation.  */
   2743      1.1  mrg   struct gfc_case *left, *right;
   2744      1.1  mrg 
   2745      1.1  mrg   /* True if this case label can never be matched.  */
   2746      1.1  mrg   int unreachable;
   2747      1.1  mrg }
   2748      1.1  mrg gfc_case;
   2749      1.1  mrg 
   2750      1.1  mrg #define gfc_get_case() XCNEW (gfc_case)
   2751      1.1  mrg 
   2752      1.1  mrg 
   2753      1.1  mrg typedef struct
   2754      1.1  mrg {
   2755      1.1  mrg   gfc_expr *var, *start, *end, *step;
   2756      1.1  mrg   unsigned short unroll;
   2757      1.1  mrg   bool ivdep;
   2758      1.1  mrg   bool vector;
   2759      1.1  mrg   bool novector;
   2760      1.1  mrg }
   2761      1.1  mrg gfc_iterator;
   2762      1.1  mrg 
   2763      1.1  mrg #define gfc_get_iterator() XCNEW (gfc_iterator)
   2764      1.1  mrg 
   2765      1.1  mrg 
   2766      1.1  mrg /* Allocation structure for ALLOCATE, DEALLOCATE and NULLIFY statements.  */
   2767      1.1  mrg 
   2768      1.1  mrg typedef struct gfc_alloc
   2769      1.1  mrg {
   2770      1.1  mrg   gfc_expr *expr;
   2771      1.1  mrg   struct gfc_alloc *next;
   2772      1.1  mrg }
   2773      1.1  mrg gfc_alloc;
   2774      1.1  mrg 
   2775      1.1  mrg #define gfc_get_alloc() XCNEW (gfc_alloc)
   2776      1.1  mrg 
   2777      1.1  mrg 
   2778      1.1  mrg typedef struct
   2779      1.1  mrg {
   2780      1.1  mrg   gfc_expr *unit, *file, *status, *access, *form, *recl,
   2781      1.1  mrg     *blank, *position, *action, *delim, *pad, *iostat, *iomsg, *convert,
   2782      1.1  mrg     *decimal, *encoding, *round, *sign, *asynchronous, *id, *newunit,
   2783      1.1  mrg     *share, *cc;
   2784      1.1  mrg   char readonly;
   2785      1.1  mrg   gfc_st_label *err;
   2786      1.1  mrg }
   2787      1.1  mrg gfc_open;
   2788      1.1  mrg 
   2789      1.1  mrg 
   2790      1.1  mrg typedef struct
   2791      1.1  mrg {
   2792      1.1  mrg   gfc_expr *unit, *status, *iostat, *iomsg;
   2793      1.1  mrg   gfc_st_label *err;
   2794      1.1  mrg }
   2795      1.1  mrg gfc_close;
   2796      1.1  mrg 
   2797      1.1  mrg 
   2798      1.1  mrg typedef struct
   2799      1.1  mrg {
   2800      1.1  mrg   gfc_expr *unit, *iostat, *iomsg;
   2801      1.1  mrg   gfc_st_label *err;
   2802      1.1  mrg }
   2803      1.1  mrg gfc_filepos;
   2804      1.1  mrg 
   2805      1.1  mrg 
   2806      1.1  mrg typedef struct
   2807      1.1  mrg {
   2808      1.1  mrg   gfc_expr *unit, *file, *iostat, *exist, *opened, *number, *named,
   2809      1.1  mrg     *name, *access, *sequential, *direct, *form, *formatted,
   2810      1.1  mrg     *unformatted, *recl, *nextrec, *blank, *position, *action, *read,
   2811      1.1  mrg     *write, *readwrite, *delim, *pad, *iolength, *iomsg, *convert, *strm_pos,
   2812      1.1  mrg     *asynchronous, *decimal, *encoding, *pending, *round, *sign, *size, *id,
   2813      1.1  mrg     *iqstream, *share, *cc;
   2814      1.1  mrg 
   2815      1.1  mrg   gfc_st_label *err;
   2816      1.1  mrg 
   2817      1.1  mrg }
   2818      1.1  mrg gfc_inquire;
   2819      1.1  mrg 
   2820      1.1  mrg 
   2821      1.1  mrg typedef struct
   2822      1.1  mrg {
   2823      1.1  mrg   gfc_expr *unit, *iostat, *iomsg, *id;
   2824      1.1  mrg   gfc_st_label *err, *end, *eor;
   2825      1.1  mrg }
   2826      1.1  mrg gfc_wait;
   2827      1.1  mrg 
   2828      1.1  mrg 
   2829      1.1  mrg typedef struct
   2830      1.1  mrg {
   2831      1.1  mrg   gfc_expr *io_unit, *format_expr, *rec, *advance, *iostat, *size, *iomsg,
   2832      1.1  mrg 	   *id, *pos, *asynchronous, *blank, *decimal, *delim, *pad, *round,
   2833      1.1  mrg 	   *sign, *extra_comma, *dt_io_kind, *udtio;
   2834      1.1  mrg   char dec_ext;
   2835      1.1  mrg 
   2836      1.1  mrg   gfc_symbol *namelist;
   2837      1.1  mrg   /* A format_label of `format_asterisk' indicates the "*" format */
   2838      1.1  mrg   gfc_st_label *format_label;
   2839      1.1  mrg   gfc_st_label *err, *end, *eor;
   2840      1.1  mrg 
   2841      1.1  mrg   locus eor_where, end_where, err_where;
   2842      1.1  mrg }
   2843      1.1  mrg gfc_dt;
   2844      1.1  mrg 
   2845      1.1  mrg 
   2846      1.1  mrg typedef struct gfc_forall_iterator
   2847      1.1  mrg {
   2848      1.1  mrg   gfc_expr *var, *start, *end, *stride;
   2849      1.1  mrg   struct gfc_forall_iterator *next;
   2850      1.1  mrg }
   2851      1.1  mrg gfc_forall_iterator;
   2852      1.1  mrg 
   2853      1.1  mrg 
   2854      1.1  mrg /* Linked list to store associations in an ASSOCIATE statement.  */
   2855      1.1  mrg 
   2856      1.1  mrg typedef struct gfc_association_list
   2857      1.1  mrg {
   2858      1.1  mrg   struct gfc_association_list *next;
   2859      1.1  mrg 
   2860      1.1  mrg   /* Whether this is association to a variable that can be changed; otherwise,
   2861      1.1  mrg      it's association to an expression and the name may not be used as
   2862      1.1  mrg      lvalue.  */
   2863      1.1  mrg   unsigned variable:1;
   2864      1.1  mrg 
   2865      1.1  mrg   /* True if this struct is currently only linked to from a gfc_symbol rather
   2866      1.1  mrg      than as part of a real list in gfc_code->ext.block.assoc.  This may
   2867      1.1  mrg      happen for SELECT TYPE temporaries and must be considered
   2868      1.1  mrg      for memory handling.  */
   2869      1.1  mrg   unsigned dangling:1;
   2870      1.1  mrg 
   2871      1.1  mrg   /* True when the rank of the target expression is guessed during parsing.  */
   2872      1.1  mrg   unsigned rankguessed:1;
   2873      1.1  mrg 
   2874      1.1  mrg   char name[GFC_MAX_SYMBOL_LEN + 1];
   2875      1.1  mrg   gfc_symtree *st; /* Symtree corresponding to name.  */
   2876      1.1  mrg   locus where;
   2877      1.1  mrg 
   2878      1.1  mrg   gfc_expr *target;
   2879      1.1  mrg }
   2880      1.1  mrg gfc_association_list;
   2881      1.1  mrg #define gfc_get_association_list() XCNEW (gfc_association_list)
   2882      1.1  mrg 
   2883      1.1  mrg 
   2884      1.1  mrg /* Executable statements that fill gfc_code structures.  */
   2885      1.1  mrg enum gfc_exec_op
   2886      1.1  mrg {
   2887      1.1  mrg   EXEC_NOP = 1, EXEC_END_NESTED_BLOCK, EXEC_END_BLOCK, EXEC_ASSIGN,
   2888      1.1  mrg   EXEC_LABEL_ASSIGN, EXEC_POINTER_ASSIGN, EXEC_CRITICAL, EXEC_ERROR_STOP,
   2889      1.1  mrg   EXEC_GOTO, EXEC_CALL, EXEC_COMPCALL, EXEC_ASSIGN_CALL, EXEC_RETURN,
   2890      1.1  mrg   EXEC_ENTRY, EXEC_PAUSE, EXEC_STOP, EXEC_CONTINUE, EXEC_INIT_ASSIGN,
   2891      1.1  mrg   EXEC_IF, EXEC_ARITHMETIC_IF, EXEC_DO, EXEC_DO_CONCURRENT, EXEC_DO_WHILE,
   2892      1.1  mrg   EXEC_SELECT, EXEC_BLOCK, EXEC_FORALL, EXEC_WHERE, EXEC_CYCLE, EXEC_EXIT,
   2893      1.1  mrg   EXEC_CALL_PPC, EXEC_ALLOCATE, EXEC_DEALLOCATE, EXEC_END_PROCEDURE,
   2894  1.1.1.2  mrg   EXEC_SELECT_TYPE, EXEC_SELECT_RANK, EXEC_SYNC_ALL, EXEC_SYNC_MEMORY,
   2895  1.1.1.2  mrg   EXEC_SYNC_IMAGES, EXEC_OPEN, EXEC_CLOSE, EXEC_WAIT,
   2896      1.1  mrg   EXEC_READ, EXEC_WRITE, EXEC_IOLENGTH, EXEC_TRANSFER, EXEC_DT_END,
   2897      1.1  mrg   EXEC_BACKSPACE, EXEC_ENDFILE, EXEC_INQUIRE, EXEC_REWIND, EXEC_FLUSH,
   2898      1.1  mrg   EXEC_FORM_TEAM, EXEC_CHANGE_TEAM, EXEC_END_TEAM, EXEC_SYNC_TEAM,
   2899      1.1  mrg   EXEC_LOCK, EXEC_UNLOCK, EXEC_EVENT_POST, EXEC_EVENT_WAIT, EXEC_FAIL_IMAGE,
   2900  1.1.1.2  mrg   EXEC_OACC_KERNELS_LOOP, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_SERIAL_LOOP,
   2901  1.1.1.2  mrg   EXEC_OACC_ROUTINE, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS, EXEC_OACC_SERIAL,
   2902  1.1.1.2  mrg   EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
   2903  1.1.1.2  mrg   EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA,
   2904  1.1.1.2  mrg   EXEC_OACC_ATOMIC, EXEC_OACC_DECLARE,
   2905      1.1  mrg   EXEC_OMP_CRITICAL, EXEC_OMP_DO, EXEC_OMP_FLUSH, EXEC_OMP_MASTER,
   2906      1.1  mrg   EXEC_OMP_ORDERED, EXEC_OMP_PARALLEL, EXEC_OMP_PARALLEL_DO,
   2907      1.1  mrg   EXEC_OMP_PARALLEL_SECTIONS, EXEC_OMP_PARALLEL_WORKSHARE,
   2908      1.1  mrg   EXEC_OMP_SECTIONS, EXEC_OMP_SINGLE, EXEC_OMP_WORKSHARE,
   2909      1.1  mrg   EXEC_OMP_ATOMIC, EXEC_OMP_BARRIER, EXEC_OMP_END_NOWAIT,
   2910      1.1  mrg   EXEC_OMP_END_SINGLE, EXEC_OMP_TASK, EXEC_OMP_TASKWAIT,
   2911      1.1  mrg   EXEC_OMP_TASKYIELD, EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT,
   2912      1.1  mrg   EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD,
   2913      1.1  mrg   EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_TARGET, EXEC_OMP_TARGET_DATA,
   2914      1.1  mrg   EXEC_OMP_TEAMS, EXEC_OMP_DISTRIBUTE, EXEC_OMP_DISTRIBUTE_SIMD,
   2915      1.1  mrg   EXEC_OMP_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_DISTRIBUTE_PARALLEL_DO_SIMD,
   2916      1.1  mrg   EXEC_OMP_TARGET_TEAMS, EXEC_OMP_TEAMS_DISTRIBUTE,
   2917      1.1  mrg   EXEC_OMP_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE,
   2918      1.1  mrg   EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD,
   2919      1.1  mrg   EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO,
   2920      1.1  mrg   EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO,
   2921      1.1  mrg   EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
   2922      1.1  mrg   EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
   2923      1.1  mrg   EXEC_OMP_TARGET_UPDATE, EXEC_OMP_END_CRITICAL,
   2924      1.1  mrg   EXEC_OMP_TARGET_ENTER_DATA, EXEC_OMP_TARGET_EXIT_DATA,
   2925      1.1  mrg   EXEC_OMP_TARGET_PARALLEL, EXEC_OMP_TARGET_PARALLEL_DO,
   2926      1.1  mrg   EXEC_OMP_TARGET_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_SIMD,
   2927  1.1.1.3  mrg   EXEC_OMP_TASKLOOP, EXEC_OMP_TASKLOOP_SIMD, EXEC_OMP_SCAN, EXEC_OMP_DEPOBJ,
   2928  1.1.1.3  mrg   EXEC_OMP_PARALLEL_MASTER, EXEC_OMP_PARALLEL_MASTER_TASKLOOP,
   2929  1.1.1.3  mrg   EXEC_OMP_PARALLEL_MASTER_TASKLOOP_SIMD, EXEC_OMP_MASTER_TASKLOOP,
   2930  1.1.1.3  mrg   EXEC_OMP_MASTER_TASKLOOP_SIMD, EXEC_OMP_LOOP, EXEC_OMP_PARALLEL_LOOP,
   2931  1.1.1.3  mrg   EXEC_OMP_TEAMS_LOOP, EXEC_OMP_TARGET_PARALLEL_LOOP,
   2932  1.1.1.3  mrg   EXEC_OMP_TARGET_TEAMS_LOOP, EXEC_OMP_MASKED, EXEC_OMP_PARALLEL_MASKED,
   2933  1.1.1.3  mrg   EXEC_OMP_PARALLEL_MASKED_TASKLOOP, EXEC_OMP_PARALLEL_MASKED_TASKLOOP_SIMD,
   2934  1.1.1.3  mrg   EXEC_OMP_MASKED_TASKLOOP, EXEC_OMP_MASKED_TASKLOOP_SIMD, EXEC_OMP_SCOPE,
   2935  1.1.1.3  mrg   EXEC_OMP_ERROR
   2936      1.1  mrg };
   2937      1.1  mrg 
   2938      1.1  mrg typedef struct gfc_code
   2939      1.1  mrg {
   2940      1.1  mrg   gfc_exec_op op;
   2941      1.1  mrg 
   2942      1.1  mrg   struct gfc_code *block, *next;
   2943      1.1  mrg   locus loc;
   2944      1.1  mrg 
   2945      1.1  mrg   gfc_st_label *here, *label1, *label2, *label3;
   2946      1.1  mrg   gfc_symtree *symtree;
   2947      1.1  mrg   gfc_expr *expr1, *expr2, *expr3, *expr4;
   2948      1.1  mrg   /* A name isn't sufficient to identify a subroutine, we need the actual
   2949      1.1  mrg      symbol for the interface definition.
   2950      1.1  mrg   const char *sub_name;  */
   2951      1.1  mrg   gfc_symbol *resolved_sym;
   2952      1.1  mrg   gfc_intrinsic_sym *resolved_isym;
   2953      1.1  mrg 
   2954      1.1  mrg   union
   2955      1.1  mrg   {
   2956      1.1  mrg     gfc_actual_arglist *actual;
   2957      1.1  mrg     gfc_iterator *iterator;
   2958      1.1  mrg 
   2959      1.1  mrg     struct
   2960      1.1  mrg     {
   2961      1.1  mrg       gfc_typespec ts;
   2962      1.1  mrg       gfc_alloc *list;
   2963      1.1  mrg       /* Take the array specification from expr3 to allocate arrays
   2964      1.1  mrg 	 without an explicit array specification.  */
   2965      1.1  mrg       unsigned arr_spec_from_expr3:1;
   2966      1.1  mrg     }
   2967      1.1  mrg     alloc;
   2968      1.1  mrg 
   2969      1.1  mrg     struct
   2970      1.1  mrg     {
   2971      1.1  mrg       gfc_namespace *ns;
   2972      1.1  mrg       gfc_association_list *assoc;
   2973      1.1  mrg       gfc_case *case_list;
   2974      1.1  mrg     }
   2975      1.1  mrg     block;
   2976      1.1  mrg 
   2977      1.1  mrg     gfc_open *open;
   2978      1.1  mrg     gfc_close *close;
   2979      1.1  mrg     gfc_filepos *filepos;
   2980      1.1  mrg     gfc_inquire *inquire;
   2981      1.1  mrg     gfc_wait *wait;
   2982      1.1  mrg     gfc_dt *dt;
   2983      1.1  mrg     gfc_forall_iterator *forall_iterator;
   2984      1.1  mrg     struct gfc_code *which_construct;
   2985      1.1  mrg     int stop_code;
   2986      1.1  mrg     gfc_entry_list *entry;
   2987      1.1  mrg     gfc_oacc_declare *oacc_declare;
   2988      1.1  mrg     gfc_omp_clauses *omp_clauses;
   2989      1.1  mrg     const char *omp_name;
   2990      1.1  mrg     gfc_omp_namelist *omp_namelist;
   2991      1.1  mrg     bool omp_bool;
   2992      1.1  mrg   }
   2993      1.1  mrg   ext;		/* Points to additional structures required by statement */
   2994      1.1  mrg 
   2995      1.1  mrg   /* Cycle and break labels in constructs.  */
   2996      1.1  mrg   tree cycle_label;
   2997      1.1  mrg   tree exit_label;
   2998      1.1  mrg }
   2999      1.1  mrg gfc_code;
   3000      1.1  mrg 
   3001      1.1  mrg 
   3002      1.1  mrg /* Storage for DATA statements.  */
   3003      1.1  mrg typedef struct gfc_data_variable
   3004      1.1  mrg {
   3005      1.1  mrg   gfc_expr *expr;
   3006      1.1  mrg   gfc_iterator iter;
   3007      1.1  mrg   struct gfc_data_variable *list, *next;
   3008      1.1  mrg }
   3009      1.1  mrg gfc_data_variable;
   3010      1.1  mrg 
   3011      1.1  mrg 
   3012      1.1  mrg typedef struct gfc_data_value
   3013      1.1  mrg {
   3014      1.1  mrg   mpz_t repeat;
   3015      1.1  mrg   gfc_expr *expr;
   3016      1.1  mrg   struct gfc_data_value *next;
   3017      1.1  mrg }
   3018      1.1  mrg gfc_data_value;
   3019      1.1  mrg 
   3020      1.1  mrg 
   3021      1.1  mrg typedef struct gfc_data
   3022      1.1  mrg {
   3023      1.1  mrg   gfc_data_variable *var;
   3024      1.1  mrg   gfc_data_value *value;
   3025      1.1  mrg   locus where;
   3026      1.1  mrg 
   3027      1.1  mrg   struct gfc_data *next;
   3028      1.1  mrg }
   3029      1.1  mrg gfc_data;
   3030      1.1  mrg 
   3031      1.1  mrg 
   3032      1.1  mrg /* Structure for holding compile options */
   3033      1.1  mrg typedef struct
   3034      1.1  mrg {
   3035      1.1  mrg   char *module_dir;
   3036      1.1  mrg   gfc_source_form source_form;
   3037      1.1  mrg   int max_continue_fixed;
   3038      1.1  mrg   int max_continue_free;
   3039      1.1  mrg   int max_identifier_length;
   3040      1.1  mrg 
   3041      1.1  mrg   int max_errors;
   3042      1.1  mrg 
   3043      1.1  mrg   int flag_preprocessed;
   3044      1.1  mrg   int flag_d_lines;
   3045      1.1  mrg   int flag_init_integer;
   3046      1.1  mrg   long flag_init_integer_value;
   3047      1.1  mrg   int flag_init_logical;
   3048      1.1  mrg   int flag_init_character;
   3049      1.1  mrg   char flag_init_character_value;
   3050      1.1  mrg 
   3051      1.1  mrg   int fpe;
   3052      1.1  mrg   int fpe_summary;
   3053      1.1  mrg   int rtcheck;
   3054      1.1  mrg 
   3055      1.1  mrg   int warn_std;
   3056      1.1  mrg   int allow_std;
   3057      1.1  mrg }
   3058      1.1  mrg gfc_option_t;
   3059      1.1  mrg 
   3060      1.1  mrg extern gfc_option_t gfc_option;
   3061      1.1  mrg 
   3062      1.1  mrg /* Constructor nodes for array and structure constructors.  */
   3063      1.1  mrg typedef struct gfc_constructor
   3064      1.1  mrg {
   3065      1.1  mrg   gfc_constructor_base base;
   3066      1.1  mrg   mpz_t offset;               /* Offset within a constructor, used as
   3067      1.1  mrg 				 key within base. */
   3068      1.1  mrg 
   3069      1.1  mrg   gfc_expr *expr;
   3070      1.1  mrg   gfc_iterator *iterator;
   3071      1.1  mrg   locus where;
   3072      1.1  mrg 
   3073      1.1  mrg   union
   3074      1.1  mrg   {
   3075      1.1  mrg      gfc_component *component; /* Record the component being initialized.  */
   3076      1.1  mrg   }
   3077      1.1  mrg   n;
   3078      1.1  mrg   mpz_t repeat; /* Record the repeat number of initial values in data
   3079      1.1  mrg 		  statement like "data a/5*10/".  */
   3080      1.1  mrg }
   3081      1.1  mrg gfc_constructor;
   3082      1.1  mrg 
   3083      1.1  mrg 
   3084      1.1  mrg typedef struct iterator_stack
   3085      1.1  mrg {
   3086      1.1  mrg   gfc_symtree *variable;
   3087      1.1  mrg   mpz_t value;
   3088      1.1  mrg   struct iterator_stack *prev;
   3089      1.1  mrg }
   3090      1.1  mrg iterator_stack;
   3091      1.1  mrg extern iterator_stack *iter_stack;
   3092      1.1  mrg 
   3093      1.1  mrg 
   3094      1.1  mrg /* Used for (possibly nested) SELECT TYPE statements.  */
   3095      1.1  mrg typedef struct gfc_select_type_stack
   3096      1.1  mrg {
   3097      1.1  mrg   gfc_symbol *selector;			/* Current selector variable.  */
   3098      1.1  mrg   gfc_symtree *tmp;			/* Current temporary variable.  */
   3099      1.1  mrg   struct gfc_select_type_stack *prev;	/* Previous element on stack.  */
   3100      1.1  mrg }
   3101      1.1  mrg gfc_select_type_stack;
   3102      1.1  mrg extern gfc_select_type_stack *select_type_stack;
   3103      1.1  mrg #define gfc_get_select_type_stack() XCNEW (gfc_select_type_stack)
   3104      1.1  mrg 
   3105      1.1  mrg 
   3106      1.1  mrg /* Node in the linked list used for storing finalizer procedures.  */
   3107      1.1  mrg 
   3108      1.1  mrg typedef struct gfc_finalizer
   3109      1.1  mrg {
   3110      1.1  mrg   struct gfc_finalizer* next;
   3111      1.1  mrg   locus where; /* Where the FINAL declaration occurred.  */
   3112      1.1  mrg 
   3113      1.1  mrg   /* Up to resolution, we want the gfc_symbol, there we lookup the corresponding
   3114      1.1  mrg      symtree and later need only that.  This way, we can access and call the
   3115      1.1  mrg      finalizers from every context as they should be "always accessible".  I
   3116      1.1  mrg      don't make this a union because we need the information whether proc_sym is
   3117      1.1  mrg      still referenced or not for dereferencing it on deleting a gfc_finalizer
   3118      1.1  mrg      structure.  */
   3119      1.1  mrg   gfc_symbol*  proc_sym;
   3120      1.1  mrg   gfc_symtree* proc_tree;
   3121      1.1  mrg }
   3122      1.1  mrg gfc_finalizer;
   3123      1.1  mrg #define gfc_get_finalizer() XCNEW (gfc_finalizer)
   3124      1.1  mrg 
   3125      1.1  mrg 
   3126      1.1  mrg /************************ Function prototypes *************************/
   3127      1.1  mrg 
   3128  1.1.1.3  mrg /* decl.cc */
   3129      1.1  mrg bool gfc_in_match_data (void);
   3130      1.1  mrg match gfc_match_char_spec (gfc_typespec *);
   3131      1.1  mrg extern int directive_unroll;
   3132      1.1  mrg extern bool directive_ivdep;
   3133      1.1  mrg extern bool directive_vector;
   3134      1.1  mrg extern bool directive_novector;
   3135      1.1  mrg 
   3136      1.1  mrg /* SIMD clause enum.  */
   3137      1.1  mrg enum gfc_simd_clause
   3138      1.1  mrg {
   3139      1.1  mrg   SIMD_NONE = (1 << 0),
   3140      1.1  mrg   SIMD_INBRANCH = (1 << 1),
   3141      1.1  mrg   SIMD_NOTINBRANCH = (1 << 2)
   3142      1.1  mrg };
   3143      1.1  mrg 
   3144      1.1  mrg /* Tuple for parsing of vectorized built-ins.  */
   3145      1.1  mrg struct gfc_vect_builtin_tuple
   3146      1.1  mrg {
   3147      1.1  mrg   gfc_vect_builtin_tuple (const char *n, gfc_simd_clause t)
   3148      1.1  mrg     : name (n), simd_type (t) {}
   3149      1.1  mrg 
   3150      1.1  mrg   const char *name;
   3151      1.1  mrg   gfc_simd_clause simd_type;
   3152      1.1  mrg };
   3153      1.1  mrg 
   3154      1.1  mrg /* Map of middle-end built-ins that should be vectorized.  */
   3155      1.1  mrg extern hash_map<nofree_string_hash, int> *gfc_vectorized_builtins;
   3156      1.1  mrg 
   3157      1.1  mrg /* Handling Parameterized Derived Types  */
   3158      1.1  mrg bool gfc_insert_parameter_exprs (gfc_expr *, gfc_actual_arglist *);
   3159      1.1  mrg match gfc_get_pdt_instance (gfc_actual_arglist *, gfc_symbol **,
   3160      1.1  mrg 			    gfc_actual_arglist **);
   3161      1.1  mrg 
   3162  1.1.1.2  mrg 
   3163  1.1.1.2  mrg /* Given a symbol, test whether it is a module procedure in a submodule */
   3164  1.1.1.2  mrg #define gfc_submodule_procedure(attr)				     \
   3165  1.1.1.2  mrg   (gfc_state_stack->previous && gfc_state_stack->previous->previous  \
   3166  1.1.1.2  mrg    && gfc_state_stack->previous->previous->state == COMP_SUBMODULE   \
   3167  1.1.1.2  mrg    && attr->module_procedure)
   3168  1.1.1.2  mrg 
   3169  1.1.1.3  mrg /* scanner.cc */
   3170      1.1  mrg void gfc_scanner_done_1 (void);
   3171      1.1  mrg void gfc_scanner_init_1 (void);
   3172      1.1  mrg 
   3173  1.1.1.3  mrg void gfc_add_include_path (const char *, bool, bool, bool, bool);
   3174      1.1  mrg void gfc_add_intrinsic_modules_path (const char *);
   3175      1.1  mrg void gfc_release_include_path (void);
   3176  1.1.1.3  mrg void gfc_check_include_dirs (bool);
   3177      1.1  mrg FILE *gfc_open_included_file (const char *, bool, bool);
   3178      1.1  mrg 
   3179      1.1  mrg int gfc_at_end (void);
   3180      1.1  mrg int gfc_at_eof (void);
   3181      1.1  mrg int gfc_at_bol (void);
   3182      1.1  mrg int gfc_at_eol (void);
   3183      1.1  mrg void gfc_advance_line (void);
   3184      1.1  mrg int gfc_check_include (void);
   3185      1.1  mrg int gfc_define_undef_line (void);
   3186      1.1  mrg 
   3187      1.1  mrg int gfc_wide_is_printable (gfc_char_t);
   3188      1.1  mrg int gfc_wide_is_digit (gfc_char_t);
   3189      1.1  mrg int gfc_wide_fits_in_byte (gfc_char_t);
   3190      1.1  mrg gfc_char_t gfc_wide_tolower (gfc_char_t);
   3191      1.1  mrg gfc_char_t gfc_wide_toupper (gfc_char_t);
   3192      1.1  mrg size_t gfc_wide_strlen (const gfc_char_t *);
   3193      1.1  mrg int gfc_wide_strncasecmp (const gfc_char_t *, const char *, size_t);
   3194      1.1  mrg gfc_char_t *gfc_wide_memset (gfc_char_t *, gfc_char_t, size_t);
   3195      1.1  mrg char *gfc_widechar_to_char (const gfc_char_t *, int);
   3196      1.1  mrg gfc_char_t *gfc_char_to_widechar (const char *);
   3197      1.1  mrg 
   3198      1.1  mrg #define gfc_get_wide_string(n) XCNEWVEC (gfc_char_t, n)
   3199      1.1  mrg 
   3200      1.1  mrg void gfc_skip_comments (void);
   3201      1.1  mrg gfc_char_t gfc_next_char_literal (gfc_instring);
   3202      1.1  mrg gfc_char_t gfc_next_char (void);
   3203      1.1  mrg char gfc_next_ascii_char (void);
   3204      1.1  mrg gfc_char_t gfc_peek_char (void);
   3205      1.1  mrg char gfc_peek_ascii_char (void);
   3206      1.1  mrg void gfc_error_recovery (void);
   3207      1.1  mrg void gfc_gobble_whitespace (void);
   3208  1.1.1.3  mrg void gfc_new_file (void);
   3209      1.1  mrg const char * gfc_read_orig_filename (const char *, const char **);
   3210      1.1  mrg 
   3211      1.1  mrg extern gfc_source_form gfc_current_form;
   3212      1.1  mrg extern const char *gfc_source_file;
   3213      1.1  mrg extern locus gfc_current_locus;
   3214      1.1  mrg 
   3215      1.1  mrg void gfc_start_source_files (void);
   3216      1.1  mrg void gfc_end_source_files (void);
   3217      1.1  mrg 
   3218  1.1.1.3  mrg /* misc.cc */
   3219      1.1  mrg void gfc_clear_ts (gfc_typespec *);
   3220      1.1  mrg FILE *gfc_open_file (const char *);
   3221      1.1  mrg const char *gfc_basic_typename (bt);
   3222  1.1.1.2  mrg const char *gfc_dummy_typename (gfc_typespec *);
   3223  1.1.1.2  mrg const char *gfc_typename (gfc_typespec *, bool for_hash = false);
   3224  1.1.1.2  mrg const char *gfc_typename (gfc_expr *);
   3225      1.1  mrg const char *gfc_op2string (gfc_intrinsic_op);
   3226      1.1  mrg const char *gfc_code2string (const mstring *, int);
   3227      1.1  mrg int gfc_string2code (const mstring *, const char *);
   3228      1.1  mrg const char *gfc_intent_string (sym_intent);
   3229      1.1  mrg 
   3230      1.1  mrg void gfc_init_1 (void);
   3231      1.1  mrg void gfc_init_2 (void);
   3232      1.1  mrg void gfc_done_1 (void);
   3233      1.1  mrg void gfc_done_2 (void);
   3234      1.1  mrg 
   3235      1.1  mrg int get_c_kind (const char *, CInteropKind_t *);
   3236      1.1  mrg 
   3237      1.1  mrg const char *gfc_closest_fuzzy_match (const char *, char **);
   3238      1.1  mrg static inline void
   3239      1.1  mrg vec_push (char **&optr, size_t &osz, const char *elt)
   3240      1.1  mrg {
   3241      1.1  mrg   /* {auto,}vec.safe_push () replacement.  Don't ask..  */
   3242      1.1  mrg   // if (strlen (elt) < 4) return; premature optimization: eliminated by cutoff
   3243      1.1  mrg   optr = XRESIZEVEC (char *, optr, osz + 2);
   3244      1.1  mrg   optr[osz] = CONST_CAST (char *, elt);
   3245      1.1  mrg   optr[++osz] = NULL;
   3246      1.1  mrg }
   3247      1.1  mrg 
   3248      1.1  mrg HOST_WIDE_INT gfc_mpz_get_hwi (mpz_t);
   3249      1.1  mrg void gfc_mpz_set_hwi (mpz_t, const HOST_WIDE_INT);
   3250      1.1  mrg 
   3251  1.1.1.3  mrg /* options.cc */
   3252      1.1  mrg unsigned int gfc_option_lang_mask (void);
   3253      1.1  mrg void gfc_init_options_struct (struct gcc_options *);
   3254      1.1  mrg void gfc_init_options (unsigned int,
   3255      1.1  mrg 		       struct cl_decoded_option *);
   3256      1.1  mrg bool gfc_handle_option (size_t, const char *, HOST_WIDE_INT, int, location_t,
   3257      1.1  mrg 			const struct cl_option_handlers *);
   3258      1.1  mrg bool gfc_post_options (const char **);
   3259      1.1  mrg char *gfc_get_option_string (void);
   3260      1.1  mrg 
   3261  1.1.1.3  mrg /* f95-lang.cc */
   3262      1.1  mrg void gfc_maybe_initialize_eh (void);
   3263      1.1  mrg 
   3264  1.1.1.3  mrg /* iresolve.cc */
   3265      1.1  mrg const char * gfc_get_string (const char *, ...) ATTRIBUTE_PRINTF_1;
   3266      1.1  mrg bool gfc_find_sym_in_expr (gfc_symbol *, gfc_expr *);
   3267      1.1  mrg 
   3268  1.1.1.3  mrg /* error.cc */
   3269      1.1  mrg void gfc_error_init_1 (void);
   3270      1.1  mrg void gfc_diagnostics_init (void);
   3271      1.1  mrg void gfc_diagnostics_finish (void);
   3272      1.1  mrg void gfc_buffer_error (bool);
   3273      1.1  mrg 
   3274      1.1  mrg const char *gfc_print_wide_char (gfc_char_t);
   3275      1.1  mrg 
   3276      1.1  mrg bool gfc_warning (int opt, const char *, ...) ATTRIBUTE_GCC_GFC(2,3);
   3277      1.1  mrg bool gfc_warning_now (int opt, const char *, ...) ATTRIBUTE_GCC_GFC(2,3);
   3278      1.1  mrg bool gfc_warning_internal (int opt, const char *, ...) ATTRIBUTE_GCC_GFC(2,3);
   3279      1.1  mrg bool gfc_warning_now_at (location_t loc, int opt, const char *gmsgid, ...)
   3280      1.1  mrg   ATTRIBUTE_GCC_GFC(3,4);
   3281      1.1  mrg 
   3282      1.1  mrg void gfc_clear_warning (void);
   3283      1.1  mrg void gfc_warning_check (void);
   3284      1.1  mrg 
   3285      1.1  mrg void gfc_error_opt (int opt, const char *, ...) ATTRIBUTE_GCC_GFC(2,3);
   3286      1.1  mrg void gfc_error (const char *, ...) ATTRIBUTE_GCC_GFC(1,2);
   3287      1.1  mrg void gfc_error_now (const char *, ...) ATTRIBUTE_GCC_GFC(1,2);
   3288      1.1  mrg void gfc_fatal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_GCC_GFC(1,2);
   3289      1.1  mrg void gfc_internal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_GCC_GFC(1,2);
   3290      1.1  mrg void gfc_clear_error (void);
   3291      1.1  mrg bool gfc_error_check (void);
   3292      1.1  mrg bool gfc_error_flag_test (void);
   3293      1.1  mrg 
   3294      1.1  mrg notification gfc_notification_std (int);
   3295      1.1  mrg bool gfc_notify_std (int, const char *, ...) ATTRIBUTE_GCC_GFC(2,3);
   3296      1.1  mrg 
   3297      1.1  mrg /* A general purpose syntax error.  */
   3298      1.1  mrg #define gfc_syntax_error(ST)	\
   3299      1.1  mrg   gfc_error ("Syntax error in %s statement at %C", gfc_ascii_statement (ST));
   3300      1.1  mrg 
   3301      1.1  mrg #include "pretty-print.h"  /* For output_buffer.  */
   3302      1.1  mrg struct gfc_error_buffer
   3303      1.1  mrg {
   3304      1.1  mrg   bool flag;
   3305      1.1  mrg   output_buffer buffer;
   3306      1.1  mrg   gfc_error_buffer(void) : flag(false), buffer() {}
   3307      1.1  mrg };
   3308      1.1  mrg 
   3309      1.1  mrg void gfc_push_error (gfc_error_buffer *);
   3310      1.1  mrg void gfc_pop_error (gfc_error_buffer *);
   3311      1.1  mrg void gfc_free_error (gfc_error_buffer *);
   3312      1.1  mrg 
   3313      1.1  mrg void gfc_get_errors (int *, int *);
   3314      1.1  mrg void gfc_errors_to_warnings (bool);
   3315      1.1  mrg 
   3316  1.1.1.3  mrg /* arith.cc */
   3317      1.1  mrg void gfc_arith_init_1 (void);
   3318      1.1  mrg void gfc_arith_done_1 (void);
   3319      1.1  mrg arith gfc_check_integer_range (mpz_t p, int kind);
   3320      1.1  mrg bool gfc_check_character_range (gfc_char_t, int);
   3321      1.1  mrg 
   3322      1.1  mrg extern bool gfc_seen_div0;
   3323      1.1  mrg 
   3324  1.1.1.3  mrg /* trans-types.cc */
   3325      1.1  mrg int gfc_validate_kind (bt, int, bool);
   3326      1.1  mrg int gfc_get_int_kind_from_width_isofortranenv (int size);
   3327      1.1  mrg int gfc_get_real_kind_from_width_isofortranenv (int size);
   3328      1.1  mrg tree gfc_get_union_type (gfc_symbol *);
   3329      1.1  mrg tree gfc_get_derived_type (gfc_symbol * derived, int codimen = 0);
   3330      1.1  mrg extern int gfc_index_integer_kind;
   3331      1.1  mrg extern int gfc_default_integer_kind;
   3332      1.1  mrg extern int gfc_max_integer_kind;
   3333      1.1  mrg extern int gfc_default_real_kind;
   3334      1.1  mrg extern int gfc_default_double_kind;
   3335      1.1  mrg extern int gfc_default_character_kind;
   3336      1.1  mrg extern int gfc_default_logical_kind;
   3337      1.1  mrg extern int gfc_default_complex_kind;
   3338      1.1  mrg extern int gfc_c_int_kind;
   3339  1.1.1.3  mrg extern int gfc_c_intptr_kind;
   3340      1.1  mrg extern int gfc_atomic_int_kind;
   3341      1.1  mrg extern int gfc_atomic_logical_kind;
   3342      1.1  mrg extern int gfc_intio_kind;
   3343      1.1  mrg extern int gfc_charlen_int_kind;
   3344      1.1  mrg extern int gfc_size_kind;
   3345      1.1  mrg extern int gfc_numeric_storage_size;
   3346      1.1  mrg extern int gfc_character_storage_size;
   3347      1.1  mrg 
   3348      1.1  mrg #define gfc_logical_4_kind 4
   3349      1.1  mrg #define gfc_integer_4_kind 4
   3350      1.1  mrg #define gfc_real_4_kind 4
   3351      1.1  mrg 
   3352  1.1.1.3  mrg /* symbol.cc */
   3353      1.1  mrg void gfc_clear_new_implicit (void);
   3354      1.1  mrg bool gfc_add_new_implicit_range (int, int);
   3355      1.1  mrg bool gfc_merge_new_implicit (gfc_typespec *);
   3356      1.1  mrg void gfc_set_implicit_none (bool, bool, locus *);
   3357      1.1  mrg void gfc_check_function_type (gfc_namespace *);
   3358      1.1  mrg bool gfc_is_intrinsic_typename (const char *);
   3359  1.1.1.2  mrg bool gfc_check_conflict (symbol_attribute *, const char *, locus *);
   3360      1.1  mrg 
   3361      1.1  mrg gfc_typespec *gfc_get_default_type (const char *, gfc_namespace *);
   3362      1.1  mrg bool gfc_set_default_type (gfc_symbol *, int, gfc_namespace *);
   3363      1.1  mrg 
   3364      1.1  mrg void gfc_set_sym_referenced (gfc_symbol *);
   3365      1.1  mrg 
   3366      1.1  mrg bool gfc_add_attribute (symbol_attribute *, locus *);
   3367      1.1  mrg bool gfc_add_ext_attribute (symbol_attribute *, ext_attr_id_t, locus *);
   3368      1.1  mrg bool gfc_add_allocatable (symbol_attribute *, locus *);
   3369      1.1  mrg bool gfc_add_codimension (symbol_attribute *, const char *, locus *);
   3370      1.1  mrg bool gfc_add_contiguous (symbol_attribute *, const char *, locus *);
   3371      1.1  mrg bool gfc_add_dimension (symbol_attribute *, const char *, locus *);
   3372      1.1  mrg bool gfc_add_external (symbol_attribute *, locus *);
   3373      1.1  mrg bool gfc_add_intrinsic (symbol_attribute *, locus *);
   3374      1.1  mrg bool gfc_add_optional (symbol_attribute *, locus *);
   3375      1.1  mrg bool gfc_add_kind (symbol_attribute *, locus *);
   3376      1.1  mrg bool gfc_add_len (symbol_attribute *, locus *);
   3377      1.1  mrg bool gfc_add_pointer (symbol_attribute *, locus *);
   3378      1.1  mrg bool gfc_add_cray_pointer (symbol_attribute *, locus *);
   3379      1.1  mrg bool gfc_add_cray_pointee (symbol_attribute *, locus *);
   3380      1.1  mrg match gfc_mod_pointee_as (gfc_array_spec *);
   3381      1.1  mrg bool gfc_add_protected (symbol_attribute *, const char *, locus *);
   3382      1.1  mrg bool gfc_add_result (symbol_attribute *, const char *, locus *);
   3383      1.1  mrg bool gfc_add_automatic (symbol_attribute *, const char *, locus *);
   3384      1.1  mrg bool gfc_add_save (symbol_attribute *, save_state, const char *, locus *);
   3385      1.1  mrg bool gfc_add_threadprivate (symbol_attribute *, const char *, locus *);
   3386      1.1  mrg bool gfc_add_omp_declare_target (symbol_attribute *, const char *, locus *);
   3387      1.1  mrg bool gfc_add_omp_declare_target_link (symbol_attribute *, const char *,
   3388      1.1  mrg 				      locus *);
   3389      1.1  mrg bool gfc_add_target (symbol_attribute *, locus *);
   3390      1.1  mrg bool gfc_add_dummy (symbol_attribute *, const char *, locus *);
   3391      1.1  mrg bool gfc_add_generic (symbol_attribute *, const char *, locus *);
   3392      1.1  mrg bool gfc_add_in_common (symbol_attribute *, const char *, locus *);
   3393      1.1  mrg bool gfc_add_in_equivalence (symbol_attribute *, const char *, locus *);
   3394      1.1  mrg bool gfc_add_data (symbol_attribute *, const char *, locus *);
   3395      1.1  mrg bool gfc_add_in_namelist (symbol_attribute *, const char *, locus *);
   3396      1.1  mrg bool gfc_add_sequence (symbol_attribute *, const char *, locus *);
   3397      1.1  mrg bool gfc_add_elemental (symbol_attribute *, locus *);
   3398      1.1  mrg bool gfc_add_pure (symbol_attribute *, locus *);
   3399      1.1  mrg bool gfc_add_recursive (symbol_attribute *, locus *);
   3400      1.1  mrg bool gfc_add_function (symbol_attribute *, const char *, locus *);
   3401      1.1  mrg bool gfc_add_subroutine (symbol_attribute *, const char *, locus *);
   3402      1.1  mrg bool gfc_add_volatile (symbol_attribute *, const char *, locus *);
   3403      1.1  mrg bool gfc_add_asynchronous (symbol_attribute *, const char *, locus *);
   3404      1.1  mrg bool gfc_add_proc (symbol_attribute *attr, const char *name, locus *where);
   3405      1.1  mrg bool gfc_add_abstract (symbol_attribute* attr, locus* where);
   3406      1.1  mrg 
   3407      1.1  mrg bool gfc_add_access (symbol_attribute *, gfc_access, const char *, locus *);
   3408      1.1  mrg bool gfc_add_is_bind_c (symbol_attribute *, const char *, locus *, int);
   3409      1.1  mrg bool gfc_add_extension (symbol_attribute *, locus *);
   3410      1.1  mrg bool gfc_add_value (symbol_attribute *, const char *, locus *);
   3411      1.1  mrg bool gfc_add_flavor (symbol_attribute *, sym_flavor, const char *, locus *);
   3412      1.1  mrg bool gfc_add_entry (symbol_attribute *, const char *, locus *);
   3413      1.1  mrg bool gfc_add_procedure (symbol_attribute *, procedure_type,
   3414      1.1  mrg 		       const char *, locus *);
   3415      1.1  mrg bool gfc_add_intent (symbol_attribute *, sym_intent, locus *);
   3416      1.1  mrg bool gfc_add_explicit_interface (gfc_symbol *, ifsrc,
   3417      1.1  mrg 				gfc_formal_arglist *, locus *);
   3418      1.1  mrg bool gfc_add_type (gfc_symbol *, gfc_typespec *, locus *);
   3419      1.1  mrg 
   3420      1.1  mrg void gfc_clear_attr (symbol_attribute *);
   3421      1.1  mrg bool gfc_missing_attr (symbol_attribute *, locus *);
   3422      1.1  mrg bool gfc_copy_attr (symbol_attribute *, symbol_attribute *, locus *);
   3423      1.1  mrg int gfc_copy_dummy_sym (gfc_symbol **, gfc_symbol *, int);
   3424      1.1  mrg bool gfc_add_component (gfc_symbol *, const char *, gfc_component **);
   3425      1.1  mrg gfc_symbol *gfc_use_derived (gfc_symbol *);
   3426      1.1  mrg gfc_component *gfc_find_component (gfc_symbol *, const char *, bool, bool,
   3427      1.1  mrg                                    gfc_ref **);
   3428      1.1  mrg 
   3429      1.1  mrg gfc_st_label *gfc_get_st_label (int);
   3430      1.1  mrg void gfc_free_st_label (gfc_st_label *);
   3431      1.1  mrg void gfc_define_st_label (gfc_st_label *, gfc_sl_type, locus *);
   3432      1.1  mrg bool gfc_reference_st_label (gfc_st_label *, gfc_sl_type);
   3433      1.1  mrg 
   3434      1.1  mrg gfc_namespace *gfc_get_namespace (gfc_namespace *, int);
   3435      1.1  mrg gfc_symtree *gfc_new_symtree (gfc_symtree **, const char *);
   3436      1.1  mrg gfc_symtree *gfc_find_symtree (gfc_symtree *, const char *);
   3437      1.1  mrg void gfc_delete_symtree (gfc_symtree **, const char *);
   3438      1.1  mrg gfc_symtree *gfc_get_unique_symtree (gfc_namespace *);
   3439      1.1  mrg gfc_user_op *gfc_get_uop (const char *);
   3440      1.1  mrg gfc_user_op *gfc_find_uop (const char *, gfc_namespace *);
   3441  1.1.1.3  mrg void gfc_free_symbol (gfc_symbol *&);
   3442  1.1.1.3  mrg void gfc_release_symbol (gfc_symbol *&);
   3443      1.1  mrg gfc_symbol *gfc_new_symbol (const char *, gfc_namespace *);
   3444      1.1  mrg gfc_symtree* gfc_find_symtree_in_proc (const char *, gfc_namespace *);
   3445      1.1  mrg int gfc_find_symbol (const char *, gfc_namespace *, int, gfc_symbol **);
   3446      1.1  mrg int gfc_find_sym_tree (const char *, gfc_namespace *, int, gfc_symtree **);
   3447      1.1  mrg int gfc_get_symbol (const char *, gfc_namespace *, gfc_symbol **);
   3448      1.1  mrg bool gfc_verify_c_interop (gfc_typespec *);
   3449      1.1  mrg bool gfc_verify_c_interop_param (gfc_symbol *);
   3450      1.1  mrg bool verify_bind_c_sym (gfc_symbol *, gfc_typespec *, int, gfc_common_head *);
   3451      1.1  mrg bool verify_bind_c_derived_type (gfc_symbol *);
   3452      1.1  mrg bool verify_com_block_vars_c_interop (gfc_common_head *);
   3453      1.1  mrg gfc_symtree *generate_isocbinding_symbol (const char *, iso_c_binding_symbol,
   3454      1.1  mrg 					  const char *, gfc_symtree *, bool);
   3455      1.1  mrg void gfc_save_symbol_data (gfc_symbol *);
   3456      1.1  mrg int gfc_get_sym_tree (const char *, gfc_namespace *, gfc_symtree **, bool);
   3457      1.1  mrg int gfc_get_ha_symbol (const char *, gfc_symbol **);
   3458      1.1  mrg int gfc_get_ha_sym_tree (const char *, gfc_symtree **);
   3459      1.1  mrg 
   3460      1.1  mrg void gfc_drop_last_undo_checkpoint (void);
   3461      1.1  mrg void gfc_restore_last_undo_checkpoint (void);
   3462      1.1  mrg void gfc_undo_symbols (void);
   3463      1.1  mrg void gfc_commit_symbols (void);
   3464      1.1  mrg void gfc_commit_symbol (gfc_symbol *);
   3465      1.1  mrg gfc_charlen *gfc_new_charlen (gfc_namespace *, gfc_charlen *);
   3466  1.1.1.3  mrg void gfc_free_namespace (gfc_namespace *&);
   3467      1.1  mrg 
   3468      1.1  mrg void gfc_symbol_init_2 (void);
   3469      1.1  mrg void gfc_symbol_done_2 (void);
   3470      1.1  mrg 
   3471      1.1  mrg void gfc_traverse_symtree (gfc_symtree *, void (*)(gfc_symtree *));
   3472      1.1  mrg void gfc_traverse_ns (gfc_namespace *, void (*)(gfc_symbol *));
   3473      1.1  mrg void gfc_traverse_user_op (gfc_namespace *, void (*)(gfc_user_op *));
   3474      1.1  mrg void gfc_save_all (gfc_namespace *);
   3475      1.1  mrg 
   3476      1.1  mrg void gfc_enforce_clean_symbol_state (void);
   3477      1.1  mrg 
   3478      1.1  mrg gfc_gsymbol *gfc_get_gsymbol (const char *, bool bind_c);
   3479      1.1  mrg gfc_gsymbol *gfc_find_gsymbol (gfc_gsymbol *, const char *);
   3480      1.1  mrg gfc_gsymbol *gfc_find_case_gsymbol (gfc_gsymbol *, const char *);
   3481      1.1  mrg void gfc_traverse_gsymbol (gfc_gsymbol *, void (*)(gfc_gsymbol *, void *), void *);
   3482      1.1  mrg 
   3483      1.1  mrg gfc_typebound_proc* gfc_get_typebound_proc (gfc_typebound_proc*);
   3484      1.1  mrg gfc_symbol* gfc_get_derived_super_type (gfc_symbol*);
   3485      1.1  mrg bool gfc_type_is_extension_of (gfc_symbol *, gfc_symbol *);
   3486      1.1  mrg bool gfc_type_compatible (gfc_typespec *, gfc_typespec *);
   3487      1.1  mrg 
   3488      1.1  mrg void gfc_copy_formal_args_intr (gfc_symbol *, gfc_intrinsic_sym *,
   3489  1.1.1.3  mrg 				gfc_actual_arglist *, bool copy_type = false);
   3490      1.1  mrg 
   3491  1.1.1.3  mrg void gfc_free_finalizer (gfc_finalizer *el); /* Needed in resolve.cc, too  */
   3492      1.1  mrg 
   3493      1.1  mrg bool gfc_check_symbol_typed (gfc_symbol*, gfc_namespace*, bool, locus);
   3494      1.1  mrg gfc_namespace* gfc_find_proc_namespace (gfc_namespace*);
   3495      1.1  mrg 
   3496      1.1  mrg bool gfc_is_associate_pointer (gfc_symbol*);
   3497      1.1  mrg gfc_symbol * gfc_find_dt_in_generic (gfc_symbol *);
   3498      1.1  mrg gfc_formal_arglist *gfc_sym_get_dummy_args (gfc_symbol *);
   3499      1.1  mrg 
   3500  1.1.1.3  mrg /* intrinsic.cc -- true if working in an init-expr, false otherwise.  */
   3501      1.1  mrg extern bool gfc_init_expr_flag;
   3502      1.1  mrg 
   3503      1.1  mrg /* Given a symbol that we have decided is intrinsic, mark it as such
   3504      1.1  mrg    by placing it into a special module that is otherwise impossible to
   3505      1.1  mrg    read or write.  */
   3506      1.1  mrg 
   3507      1.1  mrg #define gfc_intrinsic_symbol(SYM) SYM->module = gfc_get_string ("(intrinsic)")
   3508      1.1  mrg 
   3509      1.1  mrg void gfc_intrinsic_init_1 (void);
   3510      1.1  mrg void gfc_intrinsic_done_1 (void);
   3511      1.1  mrg 
   3512      1.1  mrg char gfc_type_letter (bt, bool logical_equals_int = false);
   3513  1.1.1.3  mrg int gfc_type_abi_kind (bt, int);
   3514  1.1.1.3  mrg static inline int
   3515  1.1.1.3  mrg gfc_type_abi_kind (gfc_typespec *ts)
   3516  1.1.1.3  mrg {
   3517  1.1.1.3  mrg   return gfc_type_abi_kind (ts->type, ts->kind);
   3518  1.1.1.3  mrg }
   3519      1.1  mrg gfc_symbol * gfc_get_intrinsic_sub_symbol (const char *);
   3520  1.1.1.3  mrg gfc_symbol *gfc_get_intrinsic_function_symbol (gfc_expr *);
   3521  1.1.1.3  mrg gfc_symbol *gfc_find_intrinsic_symbol (gfc_expr *);
   3522      1.1  mrg bool gfc_convert_type (gfc_expr *, gfc_typespec *, int);
   3523  1.1.1.2  mrg bool gfc_convert_type_warn (gfc_expr *, gfc_typespec *, int, int,
   3524  1.1.1.2  mrg 			    bool array = false);
   3525      1.1  mrg bool gfc_convert_chartype (gfc_expr *, gfc_typespec *);
   3526      1.1  mrg int gfc_generic_intrinsic (const char *);
   3527      1.1  mrg int gfc_specific_intrinsic (const char *);
   3528      1.1  mrg bool gfc_is_intrinsic (gfc_symbol*, int, locus);
   3529      1.1  mrg int gfc_intrinsic_actual_ok (const char *, const bool);
   3530      1.1  mrg gfc_intrinsic_sym *gfc_find_function (const char *);
   3531      1.1  mrg gfc_intrinsic_sym *gfc_find_subroutine (const char *);
   3532      1.1  mrg gfc_intrinsic_sym *gfc_intrinsic_function_by_id (gfc_isym_id);
   3533      1.1  mrg gfc_intrinsic_sym *gfc_intrinsic_subroutine_by_id (gfc_isym_id);
   3534      1.1  mrg gfc_isym_id gfc_isym_id_by_intmod (intmod_id, int);
   3535      1.1  mrg gfc_isym_id gfc_isym_id_by_intmod_sym (gfc_symbol *);
   3536      1.1  mrg 
   3537      1.1  mrg 
   3538      1.1  mrg match gfc_intrinsic_func_interface (gfc_expr *, int);
   3539      1.1  mrg match gfc_intrinsic_sub_interface (gfc_code *, int);
   3540      1.1  mrg 
   3541      1.1  mrg void gfc_warn_intrinsic_shadow (const gfc_symbol*, bool, bool);
   3542      1.1  mrg bool gfc_check_intrinsic_standard (const gfc_intrinsic_sym*, const char**,
   3543      1.1  mrg 				      bool, locus);
   3544      1.1  mrg 
   3545  1.1.1.3  mrg /* match.cc -- FIXME */
   3546      1.1  mrg void gfc_free_iterator (gfc_iterator *, int);
   3547      1.1  mrg void gfc_free_forall_iterator (gfc_forall_iterator *);
   3548      1.1  mrg void gfc_free_alloc_list (gfc_alloc *);
   3549      1.1  mrg void gfc_free_namelist (gfc_namelist *);
   3550  1.1.1.3  mrg void gfc_free_omp_namelist (gfc_omp_namelist *, bool);
   3551      1.1  mrg void gfc_free_equiv (gfc_equiv *);
   3552      1.1  mrg void gfc_free_equiv_until (gfc_equiv *, gfc_equiv *);
   3553      1.1  mrg void gfc_free_data (gfc_data *);
   3554      1.1  mrg void gfc_reject_data (gfc_namespace *);
   3555      1.1  mrg void gfc_free_case_list (gfc_case *);
   3556      1.1  mrg 
   3557  1.1.1.3  mrg /* matchexp.cc -- FIXME too?  */
   3558      1.1  mrg gfc_expr *gfc_get_parentheses (gfc_expr *);
   3559      1.1  mrg 
   3560  1.1.1.3  mrg /* openmp.cc */
   3561      1.1  mrg struct gfc_omp_saved_state { void *ptrs[2]; int ints[1]; };
   3562  1.1.1.3  mrg bool gfc_omp_requires_add_clause (gfc_omp_requires_kind, const char *,
   3563  1.1.1.3  mrg 				  locus *, const char *);
   3564  1.1.1.3  mrg void gfc_check_omp_requires (gfc_namespace *, int);
   3565      1.1  mrg void gfc_free_omp_clauses (gfc_omp_clauses *);
   3566      1.1  mrg void gfc_free_oacc_declare_clauses (struct gfc_oacc_declare *);
   3567  1.1.1.3  mrg void gfc_free_omp_declare_variant_list (gfc_omp_declare_variant *list);
   3568      1.1  mrg void gfc_free_omp_declare_simd (gfc_omp_declare_simd *);
   3569      1.1  mrg void gfc_free_omp_declare_simd_list (gfc_omp_declare_simd *);
   3570      1.1  mrg void gfc_free_omp_udr (gfc_omp_udr *);
   3571      1.1  mrg gfc_omp_udr *gfc_omp_udr_find (gfc_symtree *, gfc_typespec *);
   3572      1.1  mrg void gfc_resolve_omp_directive (gfc_code *, gfc_namespace *);
   3573      1.1  mrg void gfc_resolve_do_iterator (gfc_code *, gfc_symbol *, bool);
   3574      1.1  mrg void gfc_resolve_omp_local_vars (gfc_namespace *);
   3575      1.1  mrg void gfc_resolve_omp_parallel_blocks (gfc_code *, gfc_namespace *);
   3576      1.1  mrg void gfc_resolve_omp_do_blocks (gfc_code *, gfc_namespace *);
   3577      1.1  mrg void gfc_resolve_omp_declare_simd (gfc_namespace *);
   3578      1.1  mrg void gfc_resolve_omp_udrs (gfc_symtree *);
   3579      1.1  mrg void gfc_omp_save_and_clear_state (struct gfc_omp_saved_state *);
   3580      1.1  mrg void gfc_omp_restore_state (struct gfc_omp_saved_state *);
   3581      1.1  mrg void gfc_free_expr_list (gfc_expr_list *);
   3582      1.1  mrg void gfc_resolve_oacc_directive (gfc_code *, gfc_namespace *);
   3583      1.1  mrg void gfc_resolve_oacc_declare (gfc_namespace *);
   3584      1.1  mrg void gfc_resolve_oacc_blocks (gfc_code *, gfc_namespace *);
   3585      1.1  mrg void gfc_resolve_oacc_routines (gfc_namespace *);
   3586      1.1  mrg 
   3587  1.1.1.3  mrg /* expr.cc */
   3588      1.1  mrg void gfc_free_actual_arglist (gfc_actual_arglist *);
   3589      1.1  mrg gfc_actual_arglist *gfc_copy_actual_arglist (gfc_actual_arglist *);
   3590      1.1  mrg 
   3591      1.1  mrg bool gfc_extract_int (gfc_expr *, int *, int = 0);
   3592      1.1  mrg bool gfc_extract_hwi (gfc_expr *, HOST_WIDE_INT *, int = 0);
   3593      1.1  mrg 
   3594      1.1  mrg bool is_CFI_desc (gfc_symbol *, gfc_expr *);
   3595      1.1  mrg bool is_subref_array (gfc_expr *);
   3596      1.1  mrg bool gfc_is_simply_contiguous (gfc_expr *, bool, bool);
   3597      1.1  mrg bool gfc_is_not_contiguous (gfc_expr *);
   3598      1.1  mrg bool gfc_check_init_expr (gfc_expr *);
   3599      1.1  mrg 
   3600      1.1  mrg gfc_expr *gfc_build_conversion (gfc_expr *);
   3601      1.1  mrg void gfc_free_ref_list (gfc_ref *);
   3602      1.1  mrg void gfc_type_convert_binary (gfc_expr *, int);
   3603      1.1  mrg bool gfc_is_constant_expr (gfc_expr *);
   3604      1.1  mrg bool gfc_simplify_expr (gfc_expr *, int);
   3605  1.1.1.2  mrg bool gfc_try_simplify_expr (gfc_expr *, int);
   3606      1.1  mrg int gfc_has_vector_index (gfc_expr *);
   3607      1.1  mrg 
   3608      1.1  mrg gfc_expr *gfc_get_expr (void);
   3609      1.1  mrg gfc_expr *gfc_get_array_expr (bt type, int kind, locus *);
   3610      1.1  mrg gfc_expr *gfc_get_null_expr (locus *);
   3611      1.1  mrg gfc_expr *gfc_get_operator_expr (locus *, gfc_intrinsic_op,gfc_expr *, gfc_expr *);
   3612      1.1  mrg gfc_expr *gfc_get_structure_constructor_expr (bt, int, locus *);
   3613      1.1  mrg gfc_expr *gfc_get_constant_expr (bt, int, locus *);
   3614      1.1  mrg gfc_expr *gfc_get_character_expr (int, locus *, const char *, gfc_charlen_t len);
   3615      1.1  mrg gfc_expr *gfc_get_int_expr (int, locus *, HOST_WIDE_INT);
   3616      1.1  mrg gfc_expr *gfc_get_logical_expr (int, locus *, bool);
   3617      1.1  mrg gfc_expr *gfc_get_iokind_expr (locus *, io_kind);
   3618      1.1  mrg 
   3619      1.1  mrg void gfc_clear_shape (mpz_t *shape, int rank);
   3620      1.1  mrg void gfc_free_shape (mpz_t **shape, int rank);
   3621      1.1  mrg void gfc_free_expr (gfc_expr *);
   3622      1.1  mrg void gfc_replace_expr (gfc_expr *, gfc_expr *);
   3623      1.1  mrg mpz_t *gfc_copy_shape (mpz_t *, int);
   3624      1.1  mrg mpz_t *gfc_copy_shape_excluding (mpz_t *, int, gfc_expr *);
   3625      1.1  mrg gfc_expr *gfc_copy_expr (gfc_expr *);
   3626      1.1  mrg gfc_ref* gfc_copy_ref (gfc_ref*);
   3627      1.1  mrg 
   3628      1.1  mrg bool gfc_specification_expr (gfc_expr *);
   3629      1.1  mrg 
   3630      1.1  mrg int gfc_numeric_ts (gfc_typespec *);
   3631      1.1  mrg int gfc_kind_max (gfc_expr *, gfc_expr *);
   3632      1.1  mrg 
   3633      1.1  mrg bool gfc_check_conformance (gfc_expr *, gfc_expr *, const char *, ...) ATTRIBUTE_PRINTF_3;
   3634      1.1  mrg bool gfc_check_assign (gfc_expr *, gfc_expr *, int, bool c = true);
   3635      1.1  mrg bool gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue,
   3636      1.1  mrg 			       bool suppres_type_test = false,
   3637      1.1  mrg 			       bool is_init_expr = false);
   3638      1.1  mrg bool gfc_check_assign_symbol (gfc_symbol *, gfc_component *, gfc_expr *);
   3639      1.1  mrg 
   3640      1.1  mrg gfc_expr *gfc_build_default_init_expr (gfc_typespec *, locus *);
   3641      1.1  mrg void gfc_apply_init (gfc_typespec *, symbol_attribute *, gfc_expr *);
   3642      1.1  mrg bool gfc_has_default_initializer (gfc_symbol *);
   3643      1.1  mrg gfc_expr *gfc_default_initializer (gfc_typespec *);
   3644      1.1  mrg gfc_expr *gfc_generate_initializer (gfc_typespec *, bool);
   3645      1.1  mrg gfc_expr *gfc_get_variable_expr (gfc_symtree *);
   3646      1.1  mrg void gfc_add_full_array_ref (gfc_expr *, gfc_array_spec *);
   3647      1.1  mrg gfc_expr * gfc_lval_expr_from_sym (gfc_symbol *);
   3648      1.1  mrg 
   3649      1.1  mrg gfc_array_spec *gfc_get_full_arrayspec_from_expr (gfc_expr *expr);
   3650      1.1  mrg 
   3651      1.1  mrg bool gfc_traverse_expr (gfc_expr *, gfc_symbol *,
   3652      1.1  mrg 			bool (*)(gfc_expr *, gfc_symbol *, int*),
   3653      1.1  mrg 			int);
   3654      1.1  mrg void gfc_expr_set_symbols_referenced (gfc_expr *);
   3655      1.1  mrg bool gfc_expr_check_typed (gfc_expr*, gfc_namespace*, bool);
   3656      1.1  mrg bool gfc_derived_parameter_expr (gfc_expr *);
   3657      1.1  mrg gfc_param_spec_type gfc_spec_list_type (gfc_actual_arglist *, gfc_symbol *);
   3658      1.1  mrg gfc_component * gfc_get_proc_ptr_comp (gfc_expr *);
   3659      1.1  mrg bool gfc_is_proc_ptr_comp (gfc_expr *);
   3660      1.1  mrg bool gfc_is_alloc_class_scalar_function (gfc_expr *);
   3661      1.1  mrg bool gfc_is_class_array_function (gfc_expr *);
   3662      1.1  mrg 
   3663      1.1  mrg bool gfc_ref_this_image (gfc_ref *ref);
   3664      1.1  mrg bool gfc_is_coindexed (gfc_expr *);
   3665      1.1  mrg bool gfc_is_coarray (gfc_expr *);
   3666      1.1  mrg int gfc_get_corank (gfc_expr *);
   3667      1.1  mrg bool gfc_has_ultimate_allocatable (gfc_expr *);
   3668      1.1  mrg bool gfc_has_ultimate_pointer (gfc_expr *);
   3669      1.1  mrg gfc_expr* gfc_find_team_co (gfc_expr *);
   3670      1.1  mrg gfc_expr* gfc_find_stat_co (gfc_expr *);
   3671      1.1  mrg gfc_expr* gfc_build_intrinsic_call (gfc_namespace *, gfc_isym_id, const char*,
   3672      1.1  mrg 				    locus, unsigned, ...);
   3673      1.1  mrg bool gfc_check_vardef_context (gfc_expr*, bool, bool, bool, const char*);
   3674  1.1.1.3  mrg gfc_expr* gfc_pdt_find_component_copy_initializer (gfc_symbol *, const char *);
   3675      1.1  mrg 
   3676      1.1  mrg 
   3677  1.1.1.3  mrg /* st.cc */
   3678      1.1  mrg extern gfc_code new_st;
   3679      1.1  mrg 
   3680      1.1  mrg void gfc_clear_new_st (void);
   3681      1.1  mrg gfc_code *gfc_get_code (gfc_exec_op);
   3682      1.1  mrg gfc_code *gfc_append_code (gfc_code *, gfc_code *);
   3683      1.1  mrg void gfc_free_statement (gfc_code *);
   3684      1.1  mrg void gfc_free_statements (gfc_code *);
   3685      1.1  mrg void gfc_free_association_list (gfc_association_list *);
   3686      1.1  mrg 
   3687  1.1.1.3  mrg /* resolve.cc */
   3688  1.1.1.2  mrg void gfc_expression_rank (gfc_expr *);
   3689  1.1.1.2  mrg bool gfc_resolve_ref (gfc_expr *);
   3690      1.1  mrg bool gfc_resolve_expr (gfc_expr *);
   3691      1.1  mrg void gfc_resolve (gfc_namespace *);
   3692      1.1  mrg void gfc_resolve_code (gfc_code *, gfc_namespace *);
   3693      1.1  mrg void gfc_resolve_blocks (gfc_code *, gfc_namespace *);
   3694  1.1.1.2  mrg void gfc_resolve_formal_arglist (gfc_symbol *);
   3695      1.1  mrg int gfc_impure_variable (gfc_symbol *);
   3696      1.1  mrg int gfc_pure (gfc_symbol *);
   3697      1.1  mrg int gfc_implicit_pure (gfc_symbol *);
   3698      1.1  mrg void gfc_unset_implicit_pure (gfc_symbol *);
   3699      1.1  mrg int gfc_elemental (gfc_symbol *);
   3700      1.1  mrg bool gfc_resolve_iterator (gfc_iterator *, bool, bool);
   3701      1.1  mrg bool find_forall_index (gfc_expr *, gfc_symbol *, int);
   3702      1.1  mrg bool gfc_resolve_index (gfc_expr *, int);
   3703      1.1  mrg bool gfc_resolve_dim_arg (gfc_expr *);
   3704      1.1  mrg bool gfc_is_formal_arg (void);
   3705  1.1.1.2  mrg bool gfc_resolve_substring (gfc_ref *, bool *);
   3706      1.1  mrg void gfc_resolve_substring_charlen (gfc_expr *);
   3707      1.1  mrg gfc_expr *gfc_expr_to_initialize (gfc_expr *);
   3708      1.1  mrg bool gfc_type_is_extensible (gfc_symbol *);
   3709      1.1  mrg bool gfc_resolve_intrinsic (gfc_symbol *, locus *);
   3710      1.1  mrg bool gfc_explicit_interface_required (gfc_symbol *, char *, int);
   3711      1.1  mrg extern int gfc_do_concurrent_flag;
   3712      1.1  mrg const char* gfc_lookup_function_fuzzy (const char *, gfc_symtree *);
   3713      1.1  mrg int gfc_pure_function (gfc_expr *e, const char **name);
   3714      1.1  mrg int gfc_implicit_pure_function (gfc_expr *e);
   3715      1.1  mrg 
   3716      1.1  mrg 
   3717  1.1.1.3  mrg /* array.cc */
   3718      1.1  mrg gfc_iterator *gfc_copy_iterator (gfc_iterator *);
   3719      1.1  mrg 
   3720      1.1  mrg void gfc_free_array_spec (gfc_array_spec *);
   3721      1.1  mrg gfc_array_ref *gfc_copy_array_ref (gfc_array_ref *);
   3722      1.1  mrg 
   3723      1.1  mrg bool gfc_set_array_spec (gfc_symbol *, gfc_array_spec *, locus *);
   3724      1.1  mrg gfc_array_spec *gfc_copy_array_spec (gfc_array_spec *);
   3725      1.1  mrg bool gfc_resolve_array_spec (gfc_array_spec *, int);
   3726      1.1  mrg 
   3727      1.1  mrg int gfc_compare_array_spec (gfc_array_spec *, gfc_array_spec *);
   3728      1.1  mrg 
   3729      1.1  mrg void gfc_simplify_iterator_var (gfc_expr *);
   3730      1.1  mrg bool gfc_expand_constructor (gfc_expr *, bool);
   3731      1.1  mrg int gfc_constant_ac (gfc_expr *);
   3732      1.1  mrg int gfc_expanded_ac (gfc_expr *);
   3733      1.1  mrg bool gfc_resolve_character_array_constructor (gfc_expr *);
   3734      1.1  mrg bool gfc_resolve_array_constructor (gfc_expr *);
   3735      1.1  mrg bool gfc_check_constructor_type (gfc_expr *);
   3736      1.1  mrg bool gfc_check_iter_variable (gfc_expr *);
   3737      1.1  mrg bool gfc_check_constructor (gfc_expr *, bool (*)(gfc_expr *));
   3738      1.1  mrg bool gfc_array_size (gfc_expr *, mpz_t *);
   3739      1.1  mrg bool gfc_array_dimen_size (gfc_expr *, int, mpz_t *);
   3740      1.1  mrg bool gfc_array_ref_shape (gfc_array_ref *, mpz_t *);
   3741      1.1  mrg gfc_array_ref *gfc_find_array_ref (gfc_expr *, bool a = false);
   3742      1.1  mrg tree gfc_conv_array_initializer (tree type, gfc_expr *);
   3743      1.1  mrg bool spec_size (gfc_array_spec *, mpz_t *);
   3744      1.1  mrg bool spec_dimen_size (gfc_array_spec *, int, mpz_t *);
   3745      1.1  mrg bool gfc_is_compile_time_shape (gfc_array_spec *);
   3746      1.1  mrg 
   3747      1.1  mrg bool gfc_ref_dimen_size (gfc_array_ref *, int dimen, mpz_t *, mpz_t *);
   3748      1.1  mrg 
   3749  1.1.1.3  mrg /* interface.cc -- FIXME: some of these should be in symbol.cc */
   3750      1.1  mrg void gfc_free_interface (gfc_interface *);
   3751      1.1  mrg bool gfc_compare_derived_types (gfc_symbol *, gfc_symbol *);
   3752      1.1  mrg bool gfc_compare_types (gfc_typespec *, gfc_typespec *);
   3753      1.1  mrg bool gfc_check_dummy_characteristics (gfc_symbol *, gfc_symbol *,
   3754      1.1  mrg 				      bool, char *, int);
   3755      1.1  mrg bool gfc_check_result_characteristics (gfc_symbol *, gfc_symbol *,
   3756      1.1  mrg 				       char *, int);
   3757      1.1  mrg bool gfc_compare_interfaces (gfc_symbol*, gfc_symbol*, const char *, int, int,
   3758  1.1.1.2  mrg 			     char *, int, const char *, const char *,
   3759  1.1.1.2  mrg 			     bool *bad_result_characteristics = NULL);
   3760      1.1  mrg void gfc_check_interfaces (gfc_namespace *);
   3761      1.1  mrg bool gfc_procedure_use (gfc_symbol *, gfc_actual_arglist **, locus *);
   3762      1.1  mrg void gfc_ppc_use (gfc_component *, gfc_actual_arglist **, locus *);
   3763      1.1  mrg gfc_symbol *gfc_search_interface (gfc_interface *, int,
   3764      1.1  mrg 				  gfc_actual_arglist **);
   3765      1.1  mrg match gfc_extend_expr (gfc_expr *);
   3766      1.1  mrg void gfc_free_formal_arglist (gfc_formal_arglist *);
   3767      1.1  mrg bool gfc_extend_assign (gfc_code *, gfc_namespace *);
   3768      1.1  mrg bool gfc_check_new_interface (gfc_interface *, gfc_symbol *, locus);
   3769      1.1  mrg bool gfc_add_interface (gfc_symbol *);
   3770      1.1  mrg gfc_interface *gfc_current_interface_head (void);
   3771      1.1  mrg void gfc_set_current_interface_head (gfc_interface *);
   3772      1.1  mrg gfc_symtree* gfc_find_sym_in_symtree (gfc_symbol*);
   3773      1.1  mrg bool gfc_arglist_matches_symbol (gfc_actual_arglist**, gfc_symbol*);
   3774      1.1  mrg bool gfc_check_operator_interface (gfc_symbol*, gfc_intrinsic_op, locus);
   3775      1.1  mrg bool gfc_has_vector_subscript (gfc_expr*);
   3776      1.1  mrg gfc_intrinsic_op gfc_equivalent_op (gfc_intrinsic_op);
   3777      1.1  mrg bool gfc_check_typebound_override (gfc_symtree*, gfc_symtree*);
   3778      1.1  mrg void gfc_check_dtio_interfaces (gfc_symbol*);
   3779      1.1  mrg gfc_symtree* gfc_find_typebound_dtio_proc (gfc_symbol *, bool, bool);
   3780      1.1  mrg gfc_symbol* gfc_find_specific_dtio_proc (gfc_symbol*, bool, bool);
   3781  1.1.1.2  mrg void gfc_get_formal_from_actual_arglist (gfc_symbol *, gfc_actual_arglist *);
   3782  1.1.1.2  mrg bool gfc_compare_actual_formal (gfc_actual_arglist **, gfc_formal_arglist *,
   3783  1.1.1.2  mrg 				int, int, bool, locus *);
   3784      1.1  mrg 
   3785      1.1  mrg 
   3786  1.1.1.3  mrg /* io.cc */
   3787      1.1  mrg extern gfc_st_label format_asterisk;
   3788      1.1  mrg 
   3789      1.1  mrg void gfc_free_open (gfc_open *);
   3790  1.1.1.2  mrg bool gfc_resolve_open (gfc_open *, locus *);
   3791      1.1  mrg void gfc_free_close (gfc_close *);
   3792  1.1.1.2  mrg bool gfc_resolve_close (gfc_close *, locus *);
   3793      1.1  mrg void gfc_free_filepos (gfc_filepos *);
   3794      1.1  mrg bool gfc_resolve_filepos (gfc_filepos *, locus *);
   3795      1.1  mrg void gfc_free_inquire (gfc_inquire *);
   3796      1.1  mrg bool gfc_resolve_inquire (gfc_inquire *);
   3797      1.1  mrg void gfc_free_dt (gfc_dt *);
   3798  1.1.1.2  mrg bool gfc_resolve_dt (gfc_code *, gfc_dt *, locus *);
   3799      1.1  mrg void gfc_free_wait (gfc_wait *);
   3800      1.1  mrg bool gfc_resolve_wait (gfc_wait *);
   3801      1.1  mrg 
   3802  1.1.1.3  mrg /* module.cc */
   3803      1.1  mrg void gfc_module_init_2 (void);
   3804      1.1  mrg void gfc_module_done_2 (void);
   3805      1.1  mrg void gfc_dump_module (const char *, int);
   3806      1.1  mrg bool gfc_check_symbol_access (gfc_symbol *);
   3807      1.1  mrg void gfc_free_use_stmts (gfc_use_list *);
   3808  1.1.1.3  mrg void gfc_save_module_list ();
   3809  1.1.1.3  mrg void gfc_restore_old_module_list ();
   3810      1.1  mrg const char *gfc_dt_lower_string (const char *);
   3811      1.1  mrg const char *gfc_dt_upper_string (const char *);
   3812      1.1  mrg 
   3813  1.1.1.3  mrg /* primary.cc */
   3814      1.1  mrg symbol_attribute gfc_variable_attr (gfc_expr *, gfc_typespec *);
   3815      1.1  mrg symbol_attribute gfc_expr_attr (gfc_expr *);
   3816      1.1  mrg symbol_attribute gfc_caf_attr (gfc_expr *, bool i = false, bool *r = NULL);
   3817      1.1  mrg match gfc_match_rvalue (gfc_expr **);
   3818      1.1  mrg match gfc_match_varspec (gfc_expr*, int, bool, bool);
   3819      1.1  mrg int gfc_check_digit (char, int);
   3820      1.1  mrg bool gfc_is_function_return_value (gfc_symbol *, gfc_namespace *);
   3821      1.1  mrg bool gfc_convert_to_structure_constructor (gfc_expr *, gfc_symbol *,
   3822      1.1  mrg 					      gfc_expr **,
   3823      1.1  mrg 					      gfc_actual_arglist **, bool);
   3824      1.1  mrg 
   3825  1.1.1.3  mrg /* trans.cc */
   3826      1.1  mrg void gfc_generate_code (gfc_namespace *);
   3827      1.1  mrg void gfc_generate_module_code (gfc_namespace *);
   3828      1.1  mrg 
   3829  1.1.1.3  mrg /* trans-intrinsic.cc */
   3830      1.1  mrg bool gfc_inline_intrinsic_function_p (gfc_expr *);
   3831      1.1  mrg 
   3832  1.1.1.3  mrg /* bbt.cc */
   3833      1.1  mrg typedef int (*compare_fn) (void *, void *);
   3834      1.1  mrg void gfc_insert_bbt (void *, void *, compare_fn);
   3835      1.1  mrg void gfc_delete_bbt (void *, void *, compare_fn);
   3836      1.1  mrg 
   3837  1.1.1.3  mrg /* dump-parse-tree.cc */
   3838      1.1  mrg void gfc_dump_parse_tree (gfc_namespace *, FILE *);
   3839      1.1  mrg void gfc_dump_c_prototypes (gfc_namespace *, FILE *);
   3840      1.1  mrg void gfc_dump_external_c_prototypes (FILE *);
   3841      1.1  mrg void gfc_dump_global_symbols (FILE *);
   3842  1.1.1.2  mrg void debug (gfc_symbol *);
   3843  1.1.1.2  mrg void debug (gfc_expr *);
   3844      1.1  mrg 
   3845  1.1.1.3  mrg /* parse.cc */
   3846      1.1  mrg bool gfc_parse_file (void);
   3847      1.1  mrg void gfc_global_used (gfc_gsymbol *, locus *);
   3848      1.1  mrg gfc_namespace* gfc_build_block_ns (gfc_namespace *);
   3849      1.1  mrg 
   3850  1.1.1.3  mrg /* dependency.cc */
   3851      1.1  mrg int gfc_dep_compare_functions (gfc_expr *, gfc_expr *, bool);
   3852      1.1  mrg int gfc_dep_compare_expr (gfc_expr *, gfc_expr *);
   3853      1.1  mrg bool gfc_dep_difference (gfc_expr *, gfc_expr *, mpz_t *);
   3854      1.1  mrg 
   3855  1.1.1.3  mrg /* check.cc */
   3856      1.1  mrg bool gfc_check_same_strlen (const gfc_expr*, const gfc_expr*, const char*);
   3857      1.1  mrg bool gfc_calculate_transfer_sizes (gfc_expr*, gfc_expr*, gfc_expr*,
   3858      1.1  mrg 				      size_t*, size_t*, size_t*);
   3859  1.1.1.2  mrg bool gfc_boz2int (gfc_expr *, int);
   3860  1.1.1.2  mrg bool gfc_boz2real (gfc_expr *, int);
   3861  1.1.1.2  mrg bool gfc_invalid_boz (const char *, locus *);
   3862  1.1.1.2  mrg bool gfc_invalid_null_arg (gfc_expr *);
   3863  1.1.1.2  mrg 
   3864      1.1  mrg 
   3865  1.1.1.3  mrg /* class.cc */
   3866      1.1  mrg void gfc_fix_class_refs (gfc_expr *e);
   3867      1.1  mrg void gfc_add_component_ref (gfc_expr *, const char *);
   3868      1.1  mrg void gfc_add_class_array_ref (gfc_expr *);
   3869      1.1  mrg #define gfc_add_data_component(e)     gfc_add_component_ref(e,"_data")
   3870      1.1  mrg #define gfc_add_vptr_component(e)     gfc_add_component_ref(e,"_vptr")
   3871      1.1  mrg #define gfc_add_len_component(e)      gfc_add_component_ref(e,"_len")
   3872      1.1  mrg #define gfc_add_hash_component(e)     gfc_add_component_ref(e,"_hash")
   3873      1.1  mrg #define gfc_add_size_component(e)     gfc_add_component_ref(e,"_size")
   3874      1.1  mrg #define gfc_add_def_init_component(e) gfc_add_component_ref(e,"_def_init")
   3875      1.1  mrg #define gfc_add_final_component(e)    gfc_add_component_ref(e,"_final")
   3876      1.1  mrg bool gfc_is_class_array_ref (gfc_expr *, bool *);
   3877      1.1  mrg bool gfc_is_class_scalar_expr (gfc_expr *);
   3878      1.1  mrg bool gfc_is_class_container_ref (gfc_expr *e);
   3879      1.1  mrg gfc_expr *gfc_class_initializer (gfc_typespec *, gfc_expr *);
   3880      1.1  mrg unsigned int gfc_hash_value (gfc_symbol *);
   3881      1.1  mrg gfc_expr *gfc_get_len_component (gfc_expr *e, int);
   3882      1.1  mrg bool gfc_build_class_symbol (gfc_typespec *, symbol_attribute *,
   3883      1.1  mrg 			     gfc_array_spec **);
   3884      1.1  mrg gfc_symbol *gfc_find_derived_vtab (gfc_symbol *);
   3885      1.1  mrg gfc_symbol *gfc_find_vtab (gfc_typespec *);
   3886      1.1  mrg gfc_symtree* gfc_find_typebound_proc (gfc_symbol*, bool*,
   3887      1.1  mrg 				      const char*, bool, locus*);
   3888      1.1  mrg gfc_symtree* gfc_find_typebound_user_op (gfc_symbol*, bool*,
   3889      1.1  mrg 					 const char*, bool, locus*);
   3890      1.1  mrg gfc_typebound_proc* gfc_find_typebound_intrinsic_op (gfc_symbol*, bool*,
   3891      1.1  mrg 						     gfc_intrinsic_op, bool,
   3892      1.1  mrg 						     locus*);
   3893      1.1  mrg gfc_symtree* gfc_get_tbp_symtree (gfc_symtree**, const char*);
   3894      1.1  mrg bool gfc_is_finalizable (gfc_symbol *, gfc_expr **);
   3895      1.1  mrg 
   3896      1.1  mrg #define CLASS_DATA(sym) sym->ts.u.derived->components
   3897      1.1  mrg #define UNLIMITED_POLY(sym) \
   3898      1.1  mrg 	(sym != NULL && sym->ts.type == BT_CLASS \
   3899      1.1  mrg 	 && CLASS_DATA (sym) \
   3900      1.1  mrg 	 && CLASS_DATA (sym)->ts.u.derived \
   3901      1.1  mrg 	 && CLASS_DATA (sym)->ts.u.derived->attr.unlimited_polymorphic)
   3902      1.1  mrg #define IS_CLASS_ARRAY(sym) \
   3903      1.1  mrg 	(sym->ts.type == BT_CLASS \
   3904      1.1  mrg 	 && CLASS_DATA (sym) \
   3905      1.1  mrg 	 && CLASS_DATA (sym)->attr.dimension \
   3906      1.1  mrg 	 && !CLASS_DATA (sym)->attr.class_pointer)
   3907  1.1.1.3  mrg #define IS_POINTER(sym) \
   3908  1.1.1.3  mrg 	(sym->ts.type == BT_CLASS && sym->attr.class_ok && CLASS_DATA (sym) \
   3909  1.1.1.3  mrg 	 ? CLASS_DATA (sym)->attr.class_pointer : sym->attr.pointer)
   3910      1.1  mrg 
   3911  1.1.1.3  mrg /* frontend-passes.cc */
   3912      1.1  mrg 
   3913      1.1  mrg void gfc_run_passes (gfc_namespace *);
   3914      1.1  mrg 
   3915      1.1  mrg typedef int (*walk_code_fn_t) (gfc_code **, int *, void *);
   3916      1.1  mrg typedef int (*walk_expr_fn_t) (gfc_expr **, int *, void *);
   3917      1.1  mrg 
   3918      1.1  mrg int gfc_dummy_code_callback (gfc_code **, int *, void *);
   3919      1.1  mrg int gfc_expr_walker (gfc_expr **, walk_expr_fn_t, void *);
   3920      1.1  mrg int gfc_code_walker (gfc_code **, walk_code_fn_t, walk_expr_fn_t, void *);
   3921  1.1.1.2  mrg bool gfc_has_dimen_vector_ref (gfc_expr *e);
   3922  1.1.1.2  mrg void gfc_check_externals (gfc_namespace *);
   3923  1.1.1.2  mrg bool gfc_fix_implicit_pure (gfc_namespace *);
   3924      1.1  mrg 
   3925  1.1.1.3  mrg /* simplify.cc */
   3926      1.1  mrg 
   3927      1.1  mrg void gfc_convert_mpz_to_signed (mpz_t, int);
   3928      1.1  mrg gfc_expr *gfc_simplify_ieee_functions (gfc_expr *);
   3929      1.1  mrg bool gfc_is_size_zero_array (gfc_expr *);
   3930      1.1  mrg 
   3931  1.1.1.3  mrg /* trans-array.cc  */
   3932      1.1  mrg 
   3933      1.1  mrg bool gfc_is_reallocatable_lhs (gfc_expr *);
   3934      1.1  mrg 
   3935  1.1.1.3  mrg /* trans-decl.cc */
   3936      1.1  mrg 
   3937      1.1  mrg void finish_oacc_declare (gfc_namespace *, gfc_symbol *, bool);
   3938      1.1  mrg void gfc_adjust_builtins (void);
   3939      1.1  mrg 
   3940      1.1  mrg #endif /* GCC_GFORTRAN_H  */
   3941