https://gcc.gnu.org/g:835422337c8b4f1cd378a17475b0e6d5b13086d1
commit r17-1009-g835422337c8b4f1cd378a17475b0e6d5b13086d1 Author: Dhruv Chawla <[email protected]> Date: Wed May 13 11:16:57 2026 +0000 fortran: Fix typos in various files Signed-off-by: Dhruv Chawla <[email protected]> gcc/fortran/ChangeLog: * check.cc (oct2bin): Fix typos. (gfc_check_move_alloc): Likewise. * class.cc (gfc_intrinsic_hash_value): Likewise. * decl.cc (copy_prefix): Likewise. * dependency.cc (gfc_dep_compare_expr): Likewise. * expr.cc (gfc_check_assign_symbol): Likewise. * frontend-passes.cc (combine_array_constructor): Likewise. (doloop_code): Likewise. (doloop_warn): Likewise. (matmul_lhs_realloc): Likewise. * gfortran.h: Likewise. * gfortran.texi: Likewise. * interface.cc (compare_parameter): Likewise. * intrinsic.cc (add_functions): Likewise. (add_subroutines): Likewise. * invoke.texi: Likewise. * lang.opt: Likewise. * module.cc (mio_full_f2k_derived): Likewise. * openmp.cc (gfc_match_omp_variable_list): Likewise. * resolve.cc (resolve_global_procedure): Likewise. (gfc_fixup_inferred_type_refs): Likewise. (gfc_verify_binding_labels): Likewise. (resolve_fl_parameter): Likewise. * trans-array.cc (gfc_set_loop_bounds_from_array_spec): Likewise. (gfc_trans_array_constructor_value): Likewise. (maybe_substitute_expr): Likewise. (duplicate_allocatable_coarray): Likewise. * trans-decl.cc (gfc_trans_deferred_vars): Likewise. * trans-expr.cc (gfc_vptr_size_get): Likewise. (gfc_trans_subcomponent_assign): Likewise. (gfc_conv_expr): Likewise. (fcncall_realloc_result): Likewise. (alloc_scalar_allocatable_for_assignment): Likewise. (gfc_trans_assignment_1): Likewise. * trans-openmp.cc (gfc_omp_deep_mapping_cnt): Likewise. * trans-stmt.cc (trans_associate_var): Likewise. (gfc_trans_allocate): Likewise. * trans.cc (gfc_finalize_tree_expr): Likewise. Diff: --- gcc/fortran/check.cc | 6 +++--- gcc/fortran/class.cc | 2 +- gcc/fortran/decl.cc | 2 +- gcc/fortran/dependency.cc | 2 +- gcc/fortran/expr.cc | 2 +- gcc/fortran/frontend-passes.cc | 8 ++++---- gcc/fortran/gfortran.h | 4 ++-- gcc/fortran/gfortran.texi | 14 +++++++------- gcc/fortran/interface.cc | 2 +- gcc/fortran/intrinsic.cc | 4 ++-- gcc/fortran/invoke.texi | 2 +- gcc/fortran/lang.opt | 2 +- gcc/fortran/module.cc | 2 +- gcc/fortran/openmp.cc | 2 +- gcc/fortran/resolve.cc | 8 ++++---- gcc/fortran/trans-array.cc | 8 ++++---- gcc/fortran/trans-decl.cc | 4 ++-- gcc/fortran/trans-expr.cc | 12 ++++++------ gcc/fortran/trans-openmp.cc | 2 +- gcc/fortran/trans-stmt.cc | 6 +++--- gcc/fortran/trans.cc | 2 +- 21 files changed, 48 insertions(+), 48 deletions(-) diff --git a/gcc/fortran/check.cc b/gcc/fortran/check.cc index ad6f66015d72..b2511cf62952 100644 --- a/gcc/fortran/check.cc +++ b/gcc/fortran/check.cc @@ -166,8 +166,8 @@ oct2bin(int nbits, char *oct) } -/* Convert a hexidecimal string into a binary string. This is used in the - fallback conversion of a hexidecimal string to a REAL. */ +/* Convert a hexadecimal string into a binary string. This is used in the + fallback conversion of a hexadecimal string to a REAL. */ static char * hex2bin(int nbits, char *hex) @@ -4820,7 +4820,7 @@ gfc_check_move_alloc (gfc_expr *from, gfc_expr *to, gfc_expr *stat, return false; } - /* This is based losely on F2003 12.4.1.7. It is intended to prevent + /* This is based loosely on F2003 12.4.1.7. It is intended to prevent the likes of to = sym->cmp1->cmp2 and from = sym->cmp1, where cmp1 and cmp2 are allocatable. After the allocation is transferred, the 'to' chain is broken by the nullification of the 'from'. A bit diff --git a/gcc/fortran/class.cc b/gcc/fortran/class.cc index 9c02b9bc81e9..d49c7da1e9da 100644 --- a/gcc/fortran/class.cc +++ b/gcc/fortran/class.cc @@ -590,7 +590,7 @@ gfc_intrinsic_hash_value (gfc_typespec *ts) /* Get the _len component from a class/derived object storing a string. For unlimited polymorphic entities a ref to the _data component is available - while a ref to the _len component is needed. This routine traverese the + while a ref to the _len component is needed. This routine traverses the ref-chain and strips the last ref to a _data from it replacing it with a ref to the _len component. */ diff --git a/gcc/fortran/decl.cc b/gcc/fortran/decl.cc index 166b10d4cd42..b81d81b2dd11 100644 --- a/gcc/fortran/decl.cc +++ b/gcc/fortran/decl.cc @@ -7271,7 +7271,7 @@ copy_prefix (symbol_attribute *dest, locus *where) dest->recursive = 1; /* Module procedures are unusual in that the 'dest' is copied from - the interface declaration. However, this is an oportunity to + the interface declaration. However, this is an opportunity to check that the submodule declaration is compliant with the interface. */ if (dest->elemental && !current_attr.elemental) diff --git a/gcc/fortran/dependency.cc b/gcc/fortran/dependency.cc index 61a6a5aa067c..4418af60f96e 100644 --- a/gcc/fortran/dependency.cc +++ b/gcc/fortran/dependency.cc @@ -456,7 +456,7 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2) s = e1->value.compcall.tbp->u.specific->n.sym; /* Check if the proc ptr points to an interface declaration and the - names are the same; ie. the overriden proc. of an abstract type. + names are the same; ie. the overridden proc. of an abstract type. The checking of the arguments will already have been done. */ for (; ref && s; ref = ref->next) if (!ref->next && ref->type == REF_COMPONENT diff --git a/gcc/fortran/expr.cc b/gcc/fortran/expr.cc index 791474b15242..04f0c513a7d5 100644 --- a/gcc/fortran/expr.cc +++ b/gcc/fortran/expr.cc @@ -4988,7 +4988,7 @@ gfc_check_assign_symbol (gfc_symbol *sym, gfc_component *comp, gfc_expr *rvalue) if (flag) { gfc_error ("The component %qs at %L of derived type %qs has " - "paramterized type or array length parameters, which is " + "parameterized type or array length parameters, which is " "not compatible with a default initializer", comp->name, &comp->initializer->where, sym->name); return false; diff --git a/gcc/fortran/frontend-passes.cc b/gcc/fortran/frontend-passes.cc index 243e9315c948..87ac6e0a4e7d 100644 --- a/gcc/fortran/frontend-passes.cc +++ b/gcc/fortran/frontend-passes.cc @@ -1809,7 +1809,7 @@ combine_array_constructor (gfc_expr *e) /* This might be an expanded constructor with very many constant values. If we perform the operation here, we might end up with a long compile time and actually longer execution time, so a length bound is in order here. - If the constructor constains something which is not a constant, it did + If the constructor contains something which is not a constant, it did not come from an expansion, so leave it alone. */ #define CONSTR_LEN_MAX 4 @@ -2598,7 +2598,7 @@ doloop_code (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED, f = gfc_sym_get_dummy_args (co->resolved_sym); - /* Withot a formal arglist, there is only unknown INTENT, + /* Without a formal arglist, there is only unknown INTENT, which we don't check for. */ if (f == NULL) break; @@ -3116,7 +3116,7 @@ doloop_warn (gfc_namespace *ns) } } -/* This selction deals with inlining calls to MATMUL. */ +/* This section deals with inlining calls to MATMUL. */ /* Replace calls to matmul outside of straight assignments with a temporary variable so that later inlining will work. */ @@ -3516,7 +3516,7 @@ matmul_lhs_realloc (gfc_expr *c, gfc_expr *a, gfc_expr *b, /* c comes in as a full ref. Change it into a copy and make it into an element ref so it has the right form for ALLOCATE. In the same - switch statement, also generate the size comparison for the secod IF + switch statement, also generate the size comparison for the second IF statement. */ ar->type = AR_ELEMENT; diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 67b351347c46..8328ff8b34bf 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -997,7 +997,7 @@ typedef struct unsigned always_explicit:1; /* Set if the symbol is generated and, hence, standard violations - shouldn't be flaged. */ + shouldn't be flagged. */ unsigned artificial:1; /* Set if the symbol has been referenced in an expression. No further @@ -2066,7 +2066,7 @@ typedef struct gfc_symbol function). gen_mark is used to check duplicate mappings for OpenMP use_device_ptr/use_device_addr/private/shared clauses (see generic_head in - above functon). + above function). reduc_mark is used to check duplicate mappings for OpenMP reduction clauses. */ struct gfc_symbol *old_symbol; diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index 716e58cf1b3f..d13f0bc06e66 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -4141,7 +4141,7 @@ typedef struct caf_reference_t @{ @} c; struct @{ /* The mode of the array ref. See CAF_ARR_REF_*. */ - /* caf_array_ref_t, replaced by unsigend char to allow specification in + /* caf_array_ref_t, replaced by unsigned char to allow specification in fortran FE. */ unsigned char mode[GFC_MAX_DIMENSIONS]; /* The type of a static array. Unset for array's with descriptors. */ @@ -4343,7 +4343,7 @@ team is returned. @item @emph{Notes}: When both argument are given, then it is caf-library dependent which argument is examined first. Current implementations prioritize the @var{team} argument, -because it is easier to retrive the number of images from it. +because it is easier to retrieve the number of images from it. Fortran 2008 or later, with no arguments; Fortran 2018 or later with two arguments. @@ -4686,10 +4686,10 @@ from the remote image. If the data type to get is a string or string array, then this needs to be set to the byte size of each character, i.e. @code{4} for a @code{CHARACTER (KIND=4)} string. The length of the string is then returned in @code{opt_dst_charlen} (also for string arrays). -@item @var{dst_data} @tab intent(inout) A pointer to the adress the data is -stored. To prevent copying of data into an output buffer the adress to the live +@item @var{dst_data} @tab intent(inout) A pointer to the address the data is +stored. To prevent copying of data into an output buffer the address to the live data is returned here. When a descriptor is provided also its data-member is -set to that adress. When @var{may_realloc_dst} is set, then the memory may be +set to that address. When @var{may_realloc_dst} is set, then the memory may be reallocated by the remote function, which needs to be replicated by this function. @item @var{opt_dst_charlen} @tab intent(inout) When a char array is returned, @@ -5724,7 +5724,7 @@ size_t errmsg_len)} @item @emph{Description}: Actives the team given by @var{team}, which must be formed but not active yet. This routine starts a new epoch on the coarray memory pool. All -coarrays registered from now on, will be freeed once the team is terminated. +coarrays registered from now on, will be freed once the team is terminated. @item @emph{Arguments}: @multitable @columnfractions .15 .70 @@ -5755,7 +5755,7 @@ block. @item @emph{Description}: Terminates the last team changed to. The coarray memory epoch is terminated and all coarrays allocated since the execution of @code{CHANGE TEAM} -are freeed. +are freed. @item @emph{Arguments}: @multitable @columnfractions .15 .70 diff --git a/gcc/fortran/interface.cc b/gcc/fortran/interface.cc index e809a14c808a..7862783e588d 100644 --- a/gcc/fortran/interface.cc +++ b/gcc/fortran/interface.cc @@ -2600,7 +2600,7 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual, else { /* The global symbol is a function. Set the formal - argument acordingly. */ + argument accordingly. */ formal->attr.function = 1; formal->ts = global_asym->ts; } diff --git a/gcc/fortran/intrinsic.cc b/gcc/fortran/intrinsic.cc index 1c97af087d52..beaa4e9ab9cd 100644 --- a/gcc/fortran/intrinsic.cc +++ b/gcc/fortran/intrinsic.cc @@ -3585,7 +3585,7 @@ add_functions (void) gfc_check_fn_d, gfc_simplify_tand, gfc_resolve_trig, x, BT_REAL, dd, REQUIRED); - /* The following function is internally used for coarray libray functions. + /* The following function is internally used for coarray library functions. "make_from_module" makes it inaccessible for external users. */ add_sym_1 (GFC_PREFIX ("caf_get"), GFC_ISYM_CAF_GET, CLASS_IMPURE, ACTUAL_NO, BT_REAL, dr, GFC_STD_GNU, NULL, NULL, NULL, @@ -4033,7 +4033,7 @@ add_subroutines (void) errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_INOUT); - /* The following subroutine is internally used for coarray libray functions. + /* The following subroutine is internally used for coarray library functions. "make_from_module" makes it inaccessible for external users. */ add_sym_2s (GFC_PREFIX ("caf_send"), GFC_ISYM_CAF_SEND, CLASS_IMPURE, BT_UNKNOWN, 0, GFC_STD_GNU, NULL, NULL, NULL, diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 00fbc49c9374..ecc43150d253 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -2242,7 +2242,7 @@ shared by @command{gfortran}, @command{gcc}, and other GNU compilers. @table @gcctabopt @opindex fc-prototypes -@cindex Generating C prototypes from Fortran BIND(C) enteties +@cindex Generating C prototypes from Fortran BIND(C) entities @item -fc-prototypes This option generates C prototypes from @code{BIND(C)} variable declarations, types and procedure interfaces and writes them to diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index cbd13aa20190..3b9bc35a5b25 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -699,7 +699,7 @@ Fortran Joined Var(flag_inline_intrinsics) Enum(gfc_inlineable_intrinsics) Init( Enable generation of inline code instead of calls to functions from the library to implement intrinsics. Enum -Name(gfc_inlineable_intrinsics) Type(int) UnknownError(%qs is not an inline-controlable intrinsic) +Name(gfc_inlineable_intrinsics) Type(int) UnknownError(%qs is not an inline-controllable intrinsic) ; This is not part of any set ; EnumValue diff --git a/gcc/fortran/module.cc b/gcc/fortran/module.cc index 04ddf6b4476b..ac071cd276bc 100644 --- a/gcc/fortran/module.cc +++ b/gcc/fortran/module.cc @@ -4372,7 +4372,7 @@ mio_full_f2k_derived (gfc_symbol *sym) /* PDT templates make use of the mechanisms for formal args and so the parameter symbols are stored in the formal namespace. Transfer the sym_root to f2k_derived and then - free the formal namespace since it is uneeded. */ + free the formal namespace since it is unneeded. */ if (sym->attr.pdt_template && sym->formal && sym->formal->sym) { ns = sym->formal->sym->ns; diff --git a/gcc/fortran/openmp.cc b/gcc/fortran/openmp.cc index 65ec14ebadc1..5c3c373c27d3 100644 --- a/gcc/fortran/openmp.cc +++ b/gcc/fortran/openmp.cc @@ -553,7 +553,7 @@ gfc_match_omp_variable_list (const char *str, gfc_omp_namelist **list, { gcc_assert (allow_common); gfc_error ("%qs at %L is part of the common block %</%s/%> and " - "may only be specificed implicitly via the named " + "may only be specified implicitly via the named " "common block", sym->name, &cur_loc, sym->common_head->name); goto cleanup; diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc index 19a7a2b33785..a31f395709d5 100644 --- a/gcc/fortran/resolve.cc +++ b/gcc/fortran/resolve.cc @@ -2826,7 +2826,7 @@ resolve_global_procedure (gfc_symbol *sym, locus *where, int sub) reason, sizeof(reason), NULL, NULL, &bad_result_characteristics)) { - /* Turn erros into warnings with -std=gnu and -std=legacy, + /* Turn errors into warnings with -std=gnu and -std=legacy, unless a function returns a wrong type, which can lead to all kinds of ICEs and wrong code. */ @@ -7024,7 +7024,7 @@ gfc_fixup_inferred_type_refs (gfc_expr *e) break; } - /* Verify that the type inferrence mechanism has not introduced a spurious + /* Verify that the type inference mechanism has not introduced a spurious array reference. This can happen with an associate name, whose selector is an element of another inferred type. */ target = e->symtree->n.sym->assoc->target; @@ -15057,7 +15057,7 @@ gfc_verify_binding_labels (gfc_symbol *sym) /* According to the Fortran standard, global identifiers are case insensitive, which also holds for C identifiers. This was probably done for systems which had case-insensitive linkers. Such systems could not - accomodate the C standards referenced, so this restriction makes little + accommodate the C standards referenced, so this restriction makes little sense for modern systems. Therefore, check case-sensitive labels unless -pedantic is in force. */ @@ -18319,7 +18319,7 @@ resolve_fl_parameter (gfc_symbol *sym) && !gfc_is_constant_expr (sym->value)) { /* PR fortran/117070 argues a nonconstant proc pointer can appear in - the array constructor of a paramater. This seems inconsistant with + the array constructor of a parameter. This seems inconsistent with the concept of a parameter. TODO: Needs an interpretation. */ if (sym->value->ts.type == BT_DERIVED && sym->value->ts.u.derived diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc index cb55e5082d4f..3e3f4f00b255 100644 --- a/gcc/fortran/trans-array.cc +++ b/gcc/fortran/trans-array.cc @@ -1121,7 +1121,7 @@ gfc_set_loop_bounds_from_array_spec (gfc_interface_mapping * mapping, free the array afterwards. If INITIAL is not NULL, it is packed using internal_pack and the result used - as data instead of allocating a fresh, unitialized area of memory. + as data instead of allocating a fresh, uninitialized area of memory. Initialization code is added to PRE and finalization code to POST. DYNAMIC is true if the caller may want to extend the array later @@ -2434,7 +2434,7 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, /* F2008 4.5.6.3 para 5: If an executable construct references a structure constructor or array constructor, the entity created by the constructor is finalized after execution of the innermost executable construct containing - the reference. This, in fact, was later deleted by the Combined Techical + the reference. This, in fact, was later deleted by the Combined Technical Corrigenda 1 TO 4 for fortran 2008 (f08/0011). Transmit finalization of this constructor through 'finalblock'. */ @@ -3484,7 +3484,7 @@ maybe_substitute_expr (tree *tp, int *walk_subtree, void *data) } -/* Substitute in EXPR any occurence of TARGET with REPLACEMENT. */ +/* Substitute in EXPR any occurrence of TARGET with REPLACEMENT. */ static void substitute_subexpr_in_expr (tree target, tree replacement, tree expr) @@ -10058,7 +10058,7 @@ duplicate_allocatable_coarray (tree dest, tree dest_tok, tree src, tree type, } else { - /* Set the rank or unitialized memory access may be reported. */ + /* Set the rank or uninitialized memory access may be reported. */ tmp = gfc_conv_descriptor_rank (dest); gfc_add_modify (&globalblock, tmp, build_int_cst (TREE_TYPE (tmp), rank)); diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc index e6c9eaf1796f..ca9d4d5027df 100644 --- a/gcc/fortran/trans-decl.cc +++ b/gcc/fortran/trans-decl.cc @@ -5538,7 +5538,7 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block) input_location = gfc_get_location (&n->u2.allocator->where); gfc_conv_expr (&se, n->u2.allocator); } - /* We need to evalulate non-constants - also to find the location + /* We need to evaluate non-constants - also to find the location after which the GOMP_alloc has to be added to - also as BLOCK does not yield a new BIND_EXPR_BODY. */ if (n->u2.allocator @@ -7903,7 +7903,7 @@ done: gfc_init_block (&block); /* For bind(C), Fortran does not permit mixing 'pointer' with 'contiguous' (or - len=*). Thus, when copy out is needed, the bounds ofthe descriptor remain + len=*). Thus, when copy out is needed, the bounds of the descriptor remain unchanged. */ if (do_copy_inout) { diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc index 8acee12e9c23..e64ffc12b713 100644 --- a/gcc/fortran/trans-expr.cc +++ b/gcc/fortran/trans-expr.cc @@ -451,7 +451,7 @@ gfc_vptr_size_get (tree vptr) /* IF ts is null (default), search for the last _class ref in the chain of references of the expression and cut the chain there. Although - this routine is similiar to class.cc:gfc_add_component_ref (), there + this routine is similar to class.cc:gfc_add_component_ref (), there is a significant difference: gfc_add_component_ref () concentrates on an array ref that is the last ref in the chain and is oblivious to the kind of refs following. @@ -10224,7 +10224,7 @@ gfc_trans_subcomponent_assign (tree dest, gfc_component * cm, c = gfc_constructor_next (c); } /* The following constructor expression, if any, represents a specific - map intializer, as given by the user. */ + map initializer, as given by the user. */ if (c != NULL && c->expr != NULL) { gcc_assert (expr->expr_type == EXPR_STRUCTURE); @@ -10694,7 +10694,7 @@ gfc_conv_expr (gfc_se * se, gfc_expr * expr) structure constructor or array constructor, the entity created by the constructor is finalized after execution of the innermost executable construct containing the reference. This, in fact, - was later deleted by the Combined Techical Corrigenda 1 TO 4 for + was later deleted by the Combined Technical Corrigenda 1 TO 4 for fortran 2008 (f08/0011). */ if ((gfc_option.allow_std & (GFC_STD_F2008 | GFC_STD_F2003)) && !(gfc_option.allow_std & GFC_STD_GNU) @@ -12182,7 +12182,7 @@ fcncall_realloc_result (gfc_se *se, int rank, tree dtype) /* Check that the shapes are the same between lhs and expression. The evaluation of the shape is done in 'shape_block' to avoid - unitialized warnings from the lhs bounds. */ + uninitialized warnings from the lhs bounds. */ not_same_shape = boolean_false_node; gfc_start_block (&shape_block); for (n = 0 ; n < rank; n++) @@ -12863,7 +12863,7 @@ alloc_scalar_allocatable_for_assignment (stmtblock_t *block, a = a + 4 - to make sure we do not check for reallocation unneccessarily. */ + to make sure we do not check for reallocation unnecessarily. */ /* Strip parentheses from an expression to get the underlying variable. @@ -13248,7 +13248,7 @@ gfc_trans_assignment_1 (gfc_expr * expr1, gfc_expr * expr2, bool init_flag, structure constructor or array constructor, the entity created by the constructor is finalized after execution of the innermost executable construct containing the reference. - These finalizations were later deleted by the Combined Techical + These finalizations were later deleted by the Combined Technical Corrigenda 1 TO 4 for fortran 2008 (f08/0011). */ else if (gfc_notification_std (GFC_STD_F2018_DEL) && (expr2->expr_type == EXPR_STRUCTURE diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc index 30b8e604486d..022f14b6954e 100644 --- a/gcc/fortran/trans-openmp.cc +++ b/gcc/fortran/trans-openmp.cc @@ -2646,7 +2646,7 @@ gfc_omp_deep_mapping_cnt (const gimple *ctx, tree clause, gimple_seq *seq) TKIND is the map-type/kind to be used. The generated code is added to SEQ – and the actual struct-field address used for mapping, the map size, and kind value to the arrays DATA, SIZES, and KINDS, respectively. - OFFSET_DATA and OFFSET are size-type variables; the map operatations are + OFFSET_DATA and OFFSET are size-type variables; the map operations are added at array index OFFSET_DATA for DATA and at array index OFFSET for SIZES/KINDS, incrementing the offsets after each assignment. */ diff --git a/gcc/fortran/trans-stmt.cc b/gcc/fortran/trans-stmt.cc index 49f8cd8d7ac4..00ddb0629cd2 100644 --- a/gcc/fortran/trans-stmt.cc +++ b/gcc/fortran/trans-stmt.cc @@ -2325,7 +2325,7 @@ trans_associate_var (gfc_symbol *sym, gfc_wrapped_block *block) /* Add the assign to the beginning of the block... */ gfc_add_modify (&se.pre, charlen, fold_convert (TREE_TYPE (charlen), tmp)); - /* and the oposite way at the end of the block, to hand changes + /* and the opposite way at the end of the block, to hand changes on the string length back. */ gfc_add_modify (&se.post, tmp, fold_convert (TREE_TYPE (tmp), charlen)); @@ -7085,7 +7085,7 @@ gfc_trans_allocate (gfc_code * code, gfc_omp_namelist *omp_allocate) && DECL_P (expr3) && DECL_ARTIFICIAL (expr3)) { /* Build a temporary symtree and symbol. Do not add it to the current - namespace to prevent accidentaly modifying a colliding + namespace to prevent accidentally modifying a colliding symbol's as. */ /* The name of the symtree should be unique, because gfc_create_var () took care about generating the identifier. */ @@ -7736,7 +7736,7 @@ gfc_trans_allocate (gfc_code * code, gfc_omp_namelist *omp_allocate) tmp= gfc_trans_init_assign (ini); flag_realloc_lhs = realloc_lhs; gfc_free_statements (ini); - /* Init_expr is freeed by above free_statements, just need to null + /* Init_expr is freed by above free_statements, just need to null it here. */ init_expr = NULL; gfc_add_expr_to_block (&block, tmp); diff --git a/gcc/fortran/trans.cc b/gcc/fortran/trans.cc index c366d7f4dbff..adf392cec6f0 100644 --- a/gcc/fortran/trans.cc +++ b/gcc/fortran/trans.cc @@ -1624,7 +1624,7 @@ gfc_finalize_tree_expr (gfc_se *se, gfc_symbol *derived, return; /* Derived type function results with components that have defined - assignements are handled in resolve.cc(generate_component_assignments), + assignments are handled in resolve.cc(generate_component_assignments), unless the assignment was replaced by a subroutine call to the subroutine associated with the assignment operator. */ if ( ! is_assign_call
