From: Dhruv Chawla <[email protected]>

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.
        * dump-parse-tree.cc (gfc_dump_parse_tree): 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.
        * intrinsic.texi: 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.
        (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-stmt.cc (trans_associate_var): Likewise.
        (gfc_trans_allocate): Likewise.
        * trans.cc (gfc_finalize_tree_expr): Likewise.
---
 gcc/fortran/check.cc           |  6 +++---
 gcc/fortran/class.cc           |  2 +-
 gcc/fortran/decl.cc            |  2 +-
 gcc/fortran/dependency.cc      |  2 +-
 gcc/fortran/dump-parse-tree.cc |  2 +-
 gcc/fortran/expr.cc            |  2 +-
 gcc/fortran/frontend-passes.cc |  8 ++++----
 gcc/fortran/gfortran.h         |  4 ++--
 gcc/fortran/gfortran.texi      | 22 +++++++++++-----------
 gcc/fortran/interface.cc       |  2 +-
 gcc/fortran/intrinsic.cc       |  4 ++--
 gcc/fortran/intrinsic.texi     |  2 +-
 gcc/fortran/invoke.texi        |  6 +++---
 gcc/fortran/lang.opt           |  2 +-
 gcc/fortran/module.cc          |  2 +-
 gcc/fortran/openmp.cc          |  2 +-
 gcc/fortran/resolve.cc         |  6 +++---
 gcc/fortran/trans-array.cc     |  8 ++++----
 gcc/fortran/trans-decl.cc      |  4 ++--
 gcc/fortran/trans-expr.cc      | 12 ++++++------
 gcc/fortran/trans-stmt.cc      |  6 +++---
 gcc/fortran/trans.cc           |  2 +-
 22 files changed, 54 insertions(+), 54 deletions(-)

diff --git a/gcc/fortran/check.cc b/gcc/fortran/check.cc
index c4d9901a82d..264150f6841 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 9c02b9bc81e..d49c7da1e9d 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 166b10d4cd4..b81d81b2dd1 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 61a6a5aa067..4418af60f96 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/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc
index 1b3c587179c..ad0c11e107e 100644
--- a/gcc/fortran/dump-parse-tree.cc
+++ b/gcc/fortran/dump-parse-tree.cc
@@ -4120,7 +4120,7 @@ gfc_dump_parse_tree (gfc_namespace *ns, FILE *file)
   show_namespace (ns);
 }
 
-/* This part writes BIND(C) prototypes and declatations, and prototypes
+/* This part writes BIND(C) prototypes and declarations, and prototypes
    for EXTERNAL preocedures, for use in a C programs.  */
 
 static void write_interop_decl (gfc_symbol *);
diff --git a/gcc/fortran/expr.cc b/gcc/fortran/expr.cc
index 791474b1524..04f0c513a7d 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 1ea84198d62..2f06ac00687 100644
--- a/gcc/fortran/frontend-passes.cc
+++ b/gcc/fortran/frontend-passes.cc
@@ -1808,7 +1808,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
@@ -2597,7 +2597,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;
@@ -3115,7 +3115,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.  */
@@ -3515,7 +3515,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 37a8582e36d..7a081e1fa95 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -995,7 +995,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
@@ -2027,7 +2027,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 a930cc1dc9c..2f5a42ecc1f 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -1145,7 +1145,7 @@ variables, such as AIX, I/O is also performed as 
synchronous.
 
 On some systems, such as Darwin or Solaris, the POSIX thread library
 is always linked in, so asynchronous I/O is always performed. On other
-sytems, such as Linux, it is necessary to specify @option{-pthread},
+systems, such as Linux, it is necessary to specify @option{-pthread},
 @option{-lpthread} or @option{-fopenmp} during the linking step.
 
 @c ---------------------------------------------------------------------
@@ -3308,7 +3308,7 @@ Tools, @url{http://chasm-interop.sourceforge.net/}.
 @cindex prototypes
 @cindex C prototypes
 The options @option{-fc-prototypes} can be used to write out C
-declatations and function prototypes for @code{BIND(C)} entities.
+declarations and function prototypes for @code{BIND(C)} entities.
 The same can be done for writing out prototypes for external
 procedures using @option{-fc-prototypes-external},
 @pxref{Interoperability Options}.
@@ -4134,7 +4134,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.  */
@@ -4336,7 +4336,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.
@@ -4550,7 +4550,7 @@ void (*accessor)(void **, int32_t *, void *, void *, 
size_t *,
 size_t *))}
 
 @item @emph{Description}:
-Identification of access funtions across images is done using a unique hash.
+Identification of access functions across images is done using a unique hash.
 For each given hash an accessor has to be registered.  This routine is expected
 to register an accessor function pointer for the given hash in nearly constant
 time.  I.e. it is expected to add the hash and accessor to a buffer and return.
@@ -4634,7 +4634,7 @@ lookups.
 @end multitable
 
 @item @emph{Result}:
-The zero based index to access the accessor funtion in a lookup table.
+The zero based index to access the accessor function in a lookup table.
 On error, @code{-1} can be returned.
 
 @item @emph{Notes}:
@@ -4679,10 +4679,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,
@@ -5717,7 +5717,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
@@ -5748,7 +5748,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 8ab2fade283..f4a8acb4fa1 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 6ffd7237468..e1c77454663 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,
@@ -4020,7 +4020,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/intrinsic.texi b/gcc/fortran/intrinsic.texi
index 6da3be0237b..f5a29606eb4 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -4127,7 +4127,7 @@ parameters as @var{A}.  The function shall return a 
nonallocatable scalar of
 the same type and type parameters as @var{A}.  The function shall be the same 
on
 all images and with regards to the arguments mathematically commutative and
 associative.  Note that @var{OPERATION} may not be an elemental function, 
unless
-it is an intrisic function.
+it is an intrinsic function.
 @item @var{RESULT_IMAGE} @tab (optional) a scalar integer expression; if
 present, it shall have the same value on all images and refer to an
 image of the current team.
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index b3e74148a08..2b774a186cf 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -1083,7 +1083,7 @@ Warn for usage of deprecated OpenMP code.
 
 @opindex Wexternal-argument-mismatch
 @cindex warnings, argument mismatch
-@cindex argment mismatch, warnings
+@cindex argument mismatch, warnings
 @item -Wexternal-argument-mismatch
 Warn about argument mismatches for dummy external procedures.  This is
 implied by @option{-fc-prototypes-external} because generation of a
@@ -1517,7 +1517,7 @@ values for conversion on most systems are: @samp{native}, 
the default;
 big-endian representation for unformatted files; @samp{little-endian}, use
 little-endian representation for unformatted files.
 
-On POWER systems that suppport @option{-mabi=ieeelongdouble},
+On POWER systems that support @option{-mabi=ieeelongdouble},
 there are additional options, which can be combined with others with
 commas.  Those are
 @itemize @w{}
@@ -2239,7 +2239,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 cbd13aa2019..3b9bc35a5b2 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 04ddf6b4476..ac071cd276b 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 a90600952f1..d8f24c49ac1 100644
--- a/gcc/fortran/openmp.cc
+++ b/gcc/fortran/openmp.cc
@@ -540,7 +540,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 6d2ebed813f..b4868a8e4e2 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;
@@ -18312,7 +18312,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 cb55e5082d4..3e3f4f00b25 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 1bcbfdfd2c9..c7dd7f23b38 100644
--- a/gcc/fortran/trans-decl.cc
+++ b/gcc/fortran/trans-decl.cc
@@ -5522,7 +5522,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
@@ -7887,7 +7887,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 2f14e8c3f6c..57ebd91d8c2 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.
@@ -10222,7 +10222,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);
@@ -10692,7 +10692,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)
@@ -12180,7 +12180,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++)
@@ -12861,7 +12861,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.
@@ -13246,7 +13246,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-stmt.cc b/gcc/fortran/trans-stmt.cc
index 49f8cd8d7ac..00ddb0629cd 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 1d7006a6963..a02d249e018 100644
--- a/gcc/fortran/trans.cc
+++ b/gcc/fortran/trans.cc
@@ -1621,7 +1621,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
-- 
2.43.0


Reply via email to