[Ada] Various typo fixes and reformatting of comments
[platform/upstream/gcc.git] / gcc / tree.def
index 9696fee..6c53fe1 100644 (file)
@@ -1,6 +1,6 @@
 /* This file contains the definitions and documentation for the
    tree codes used in GCC.
-   Copyright (C) 1987-2018 Free Software Foundation, Inc.
+   Copyright (C) 1987-2020 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -31,11 +31,7 @@ along with GCC; see the file COPYING3.  If not see
    These tree codes have been sorted so that the macros in tree.h that
    check for various tree codes are optimized into range checks.  This
    gives a measurable performance improvement.  When adding a new
-   code, consider its placement in relation to the other codes.
-
-   When adding a new tree code which might appear as GIMPLE_ASSIGN RHS
-   code, proper handler in chkp_compute_bounds_for_assignment may
-   be required.  */
+   code, consider its placement in relation to the other codes.  */
 
 /* Any erroneous construct is parsed into a node of this type.
    This type of node is accepted without complaint in all contexts
@@ -74,9 +70,6 @@ DEFTREECODE (TREE_VEC, "tree_vec", tcc_exceptional, 0)
    could either point to another BLOCK node or it could point to a
    FUNCTION_DECL node (e.g. in the case of a block representing the
    outermost scope of a particular inlining of a function).
-   BLOCK_ABSTRACT is nonzero if the block represents an abstract
-   instance of a block (i.e. one which is nested within an abstract
-   instance of an inline function).
    TREE_ASM_WRITTEN is nonzero if the block was actually referenced
    in the generated assembly.  */
 DEFTREECODE (BLOCK, "block", tcc_exceptional, 0)
@@ -84,7 +77,10 @@ DEFTREECODE (BLOCK, "block", tcc_exceptional, 0)
 /* Each data type is represented by a tree node whose code is one of
    the following:  */
 /* Each node that represents a data type has a component TYPE_SIZE
-   containing a tree that is an expression for the size in bits.
+   that evaluates either to a tree that is a (potentially non-constant)
+   expression representing the type size in bits, or to a null pointer
+   when the size of the type is unknown (for example, for incomplete
+   types such as arrays of unspecified bound).
    The TYPE_MODE contains the machine mode for values of this type.
    The TYPE_POINTER_TO field contains a type for a pointer to this type,
      or zero if no such has been created yet.
@@ -145,11 +141,7 @@ DEFTREECODE (BOOLEAN_TYPE, "boolean_type", tcc_type, 0)
 /* Integer types in all languages, including char in C.
    Also used for sub-ranges of other discrete types.
    Has components TYPE_MIN_VALUE, TYPE_MAX_VALUE (expressions, inclusive)
-   and TYPE_PRECISION (number of bits used by this type).
-   In the case of a subrange type in Pascal, the TREE_TYPE
-   of this will point at the supertype (another INTEGER_TYPE,
-   or an ENUMERAL_TYPE or BOOLEAN_TYPE).
-   Otherwise, the TREE_TYPE is zero.  */
+   and TYPE_PRECISION (number of bits used by this type).  */
 DEFTREECODE (INTEGER_TYPE, "integer_type", tcc_type, 0)
 
 /* C's float and double.  Different floating types are distinguished
@@ -204,16 +196,15 @@ DEFTREECODE (VECTOR_TYPE, "vector_type", tcc_type, 0)
  and holds the type to coerce a value of that array type to in C.
  TYPE_STRING_FLAG indicates a string (in contrast to an array of chars)
  in languages (such as Chill) that make a distinction.  */
-/* Array types in C or Pascal */
+/* Array types in C */
 DEFTREECODE (ARRAY_TYPE, "array_type", tcc_type, 0)
 
-/* Struct in C, or record in Pascal.  */
+/* Struct in C.  */
 /* Special fields:
    TYPE_FIELDS  chain of FIELD_DECLs for the fields of the struct,
      VAR_DECLs, TYPE_DECLs and CONST_DECLs for record-scope variables,
      types and enumerators and FUNCTION_DECLs for methods associated
-     with the type.
-   A few may need to be added for Pascal.  */
+     with the type.  */
 /* See the comment above, before ENUMERAL_TYPE, for how
    forward references to struct tags are handled in C.  */
 DEFTREECODE (RECORD_TYPE, "record_type", tcc_type, 0)
@@ -237,11 +228,6 @@ DEFTREECODE (QUAL_UNION_TYPE, "qual_union_type", tcc_type, 0)
 /* The void type in C */
 DEFTREECODE (VOID_TYPE, "void_type", tcc_type, 0)
 
-/* Type to hold bounds for a pointer.
-   Has TYPE_PRECISION component to specify number of bits used
-   by this type.  */
-DEFTREECODE (POINTER_BOUNDS_TYPE, "pointer_bounds_type", tcc_type, 0)
-
 /* Type of functions.  Special fields:
    TREE_TYPE               type of value returned.
    TYPE_ARG_TYPES      list of types of arguments expected.
@@ -469,7 +455,7 @@ DEFTREECODE (IMAGPART_EXPR, "imagpart_expr", tcc_reference, 1)
    generating insns.  */
 DEFTREECODE (VIEW_CONVERT_EXPR, "view_convert_expr", tcc_reference, 1)
 
-/* C unary `*' or Pascal `^'.  One operand, an expression for a pointer.  */
+/* C unary `*'.  One operand, an expression for a pointer.  */
 DEFTREECODE (INDIRECT_REF, "indirect_ref", tcc_reference, 1)
 
 /* Used to represent lookup in a virtual method table which is dependent on
@@ -641,7 +627,7 @@ DEFTREECODE (CLEANUP_POINT_EXPR, "cleanup_point_expr", tcc_expression, 1)
    object of the same type or even for one and the same object within
    its scope.
 
-   Record types with discriminants in Ada or schema types in Pascal are
+   Record types with discriminants in Ada are
    examples of such types.  This mechanism is also used to create "fat
    pointers" for unconstrained array types in Ada; the fat pointer is a
    structure one of whose fields is a pointer to the actual array type
@@ -761,6 +747,11 @@ DEFTREECODE (MAX_EXPR, "max_expr", tcc_binary, 2)
    operand of the ABS_EXPR must have the same type.  */
 DEFTREECODE (ABS_EXPR, "abs_expr", tcc_unary, 1)
 
+/* Represents the unsigned absolute value of the operand.
+   An ABSU_EXPR must have unsigned INTEGER_TYPE.  The operand of the ABSU_EXPR
+   must have the corresponding signed type.  */
+DEFTREECODE (ABSU_EXPR, "absu_expr", tcc_unary, 1)
+
 /* Shift operations for shift and rotate.
    Shift means logical shift if done on an
    unsigned type, arithmetic shift if done on a signed type.
@@ -802,9 +793,12 @@ DEFTREECODE (TRUTH_XOR_EXPR, "truth_xor_expr", tcc_expression, 2)
 DEFTREECODE (TRUTH_NOT_EXPR, "truth_not_expr", tcc_expression, 1)
 
 /* Relational operators.
-   `EQ_EXPR' and `NE_EXPR' are allowed for any types.
-   The others are allowed only for integer (or pointer or enumeral)
-   or real types.
+   EQ_EXPR and NE_EXPR are allowed for any types.  The others, except for
+   LTGT_EXPR, are allowed only for integral, floating-point and vector types.
+   LTGT_EXPR is allowed only for floating-point types.
+   For floating-point operators, if either operand is a NaN, then NE_EXPR
+   returns true and the remaining operators return false.  The operators
+   other than EQ_EXPR and NE_EXPR may generate an exception on quiet NaNs.
    In all cases the operands will have the same type,
    and the value is either the type used by the language for booleans
    or an integer vector type of the same size and with the same number
@@ -814,10 +808,11 @@ DEFTREECODE (LT_EXPR, "lt_expr", tcc_comparison, 2)
 DEFTREECODE (LE_EXPR, "le_expr", tcc_comparison, 2)
 DEFTREECODE (GT_EXPR, "gt_expr", tcc_comparison, 2)
 DEFTREECODE (GE_EXPR, "ge_expr", tcc_comparison, 2)
+DEFTREECODE (LTGT_EXPR, "ltgt_expr", tcc_comparison, 2)
 DEFTREECODE (EQ_EXPR, "eq_expr", tcc_comparison, 2)
 DEFTREECODE (NE_EXPR, "ne_expr", tcc_comparison, 2)
 
-/* Additional relational operators for floating point unordered.  */
+/* Additional relational operators for floating-point unordered.  */
 DEFTREECODE (UNORDERED_EXPR, "unordered_expr", tcc_comparison, 2)
 DEFTREECODE (ORDERED_EXPR, "ordered_expr", tcc_comparison, 2)
 
@@ -828,9 +823,6 @@ DEFTREECODE (UNGT_EXPR, "ungt_expr", tcc_comparison, 2)
 DEFTREECODE (UNGE_EXPR, "unge_expr", tcc_comparison, 2)
 DEFTREECODE (UNEQ_EXPR, "uneq_expr", tcc_comparison, 2)
 
-/* This is the reverse of uneq_expr.  */
-DEFTREECODE (LTGT_EXPR, "ltgt_expr", tcc_comparison, 2)
-
 DEFTREECODE (RANGE_EXPR, "range_expr", tcc_binary, 2)
 
 /* Represents a re-association barrier for floating point expressions
@@ -920,7 +912,14 @@ DEFTREECODE (TRY_CATCH_EXPR, "try_catch_expr", tcc_statement, 2)
 /* Evaluate the first operand.
    The second operand is a cleanup expression which is evaluated
    on any exit (normal, exception, or jump out) from this expression.  */
-DEFTREECODE (TRY_FINALLY_EXPR, "try_finally", tcc_statement, 2)
+DEFTREECODE (TRY_FINALLY_EXPR, "try_finally_expr", tcc_statement, 2)
+
+/* Evaluate either the normal or the exceptional cleanup.  This must
+   only be present as the cleanup expression in a TRY_FINALLY_EXPR.
+   If the TRY_FINALLY_EXPR completes normally, the first operand of
+   EH_ELSE_EXPR is used as a cleanup, otherwise the second operand is
+   used.  */
+DEFTREECODE (EH_ELSE_EXPR, "eh_else_expr", tcc_statement, 2)
 \f
 /* These types of expressions have no useful value,
    and always have side effects.  */
@@ -971,7 +970,7 @@ DEFTREECODE (SWITCH_EXPR, "switch_expr", tcc_statement, 2)
      is a 'default' label.
    Operand 1 is CASE_HIGH.  If it is NULL_TREE, the label is a simple
      (one-value) case label.  If it is non-NULL_TREE, the case is a range.
-   Operand 2 is CASE_LABEL, which is is the corresponding LABEL_DECL.
+   Operand 2 is CASE_LABEL, which has the corresponding LABEL_DECL.
    Operand 3 is CASE_CHAIN.  This operand is only used in tree-cfg.c to
      speed up the lookup of case labels which use a particular edge in
      the control flow graph.  */
@@ -1096,6 +1095,12 @@ DEFTREECODE (OACC_PARALLEL, "oacc_parallel", tcc_statement, 2)
 
 DEFTREECODE (OACC_KERNELS, "oacc_kernels", tcc_statement, 2)
 
+/* OpenACC - #pragma acc serial [clause1 ... clauseN]
+   Operand 0: OMP_BODY: Code to be executed sequentially.
+   Operand 1: OMP_CLAUSES: List of clauses.  */
+
+DEFTREECODE (OACC_SERIAL, "oacc_serial", tcc_statement, 2)
+
 /* OpenACC - #pragma acc data [clause1 ... clauseN]
    Operand 0: OACC_DATA_BODY: Data construct body.
    Operand 1: OACC_DATA_CLAUSES: List of clauses.  */
@@ -1158,6 +1163,10 @@ DEFTREECODE (OMP_DISTRIBUTE, "omp_distribute", tcc_statement, 7)
    Operands like for OMP_FOR.  */
 DEFTREECODE (OMP_TASKLOOP, "omp_taskloop", tcc_statement, 7)
 
+/* OpenMP - #pragma omp loop [clause1 ... clauseN]
+   Operands like for OMP_FOR.  */
+DEFTREECODE (OMP_LOOP, "omp_loop", tcc_statement, 7)
+
 /* OpenMP - #pragma acc loop [clause1 ... clauseN]
    Operands like for OMP_FOR.  */
 DEFTREECODE (OACC_LOOP, "oacc_loop", tcc_statement, 7)
@@ -1198,6 +1207,16 @@ DEFTREECODE (OMP_CRITICAL, "omp_critical", tcc_statement, 3)
    Operand 1: OMP_SINGLE_CLAUSES: List of clauses.  */
 DEFTREECODE (OMP_SINGLE, "omp_single", tcc_statement, 2)
 
+/* OpenMP - #pragma omp taskgroup
+   Operand 0: OMP_TASKGROUP_BODY: Taskgroup body.
+   Operand 1: OMP_SINGLE_CLAUSES: List of clauses.  */
+DEFTREECODE (OMP_TASKGROUP, "omp_taskgroup", tcc_statement, 2)
+
+/* OpenMP - #pragma omp scan
+   Operand 0: OMP_SCAN_BODY: Scan body.
+   Operand 1: OMP_SCAN_CLAUSES: List of clauses.  */
+DEFTREECODE (OMP_SCAN, "omp_scan", tcc_statement, 2)
+
 /* OpenMP - #pragma omp section
    Operand 0: OMP_SECTION_BODY: Section body.  */
 DEFTREECODE (OMP_SECTION, "omp_section", tcc_statement, 1)
@@ -1206,10 +1225,6 @@ DEFTREECODE (OMP_SECTION, "omp_section", tcc_statement, 1)
    Operand 0: OMP_MASTER_BODY: Master section body.  */
 DEFTREECODE (OMP_MASTER, "omp_master", tcc_statement, 1)
 
-/* OpenMP - #pragma omp taskgroup
-   Operand 0: OMP_TASKGROUP_BODY: Taskgroup body.  */
-DEFTREECODE (OMP_TASKGROUP, "omp_taskgroup", tcc_statement, 1)
-
 /* OpenACC - #pragma acc cache (variable1 ... variableN)
    Operand 0: OACC_CACHE_CLAUSES: List of variables (transformed into
        OMP_CLAUSE__CACHE_ clauses).  */