diff mbox series

[committed] Fortran: Fix typos

Message ID 1511a6d8-551e-c34b-6214-6b88728435a8@codesourcery.com
State New
Headers show
Series [committed] Fortran: Fix typos | expand

Commit Message

Tobias Burnus March 7, 2022, 4:27 p.m. UTC
I saw that Jakub fixed some typos/duplicated words, I thought
I could do likewise – and I found some more in gcc/fortran.

Committed as r12-7524.

Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
diff mbox series

Patch

commit e3ca3e7993696affe95a3ea24c2b133c14a056e4
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Mon Mar 7 17:20:52 2022 +0100

    Fortran: Fix typos
    
    gcc/fortran/ChangeLog:
    
            * array.cc (gfc_ref_dimen_size): Fix comment typo.
            * dump-parse-tree.cc (gfc_dump_c_prototypes): Likewise.
            * frontend-passes.cc (cfe_code): Likewise.
            * gfortran.texi: Likewise.
            * resolve.cc (generate_component_assignments): Likewise.
            * simplify.cc (gfc_simplify_this_image): Likewise.
            * trans-expr.cc (trans_scalar_class_assign,
            gfc_maybe_dereference_var): Likewise.
            * intrinsic.texi: Remove word duplication.
            * invoke.texi: Likewise.

diff --git a/gcc/fortran/array.cc b/gcc/fortran/array.cc
index f1d92e00c98..eb9ed8580a0 100644
--- a/gcc/fortran/array.cc
+++ b/gcc/fortran/array.cc
@@ -2420,7 +2420,7 @@  gfc_ref_dimen_size (gfc_array_ref *ar, int dimen, mpz_t *result, mpz_t *end)
 	  gfc_free_expr(stride_expr);
 	}
 
-      /* Calculate the number of elements via gfc_dep_differce, but only if
+      /* Calculate the number of elements via gfc_dep_difference, but only if
 	 start and end are both supplied in the reference or the array spec.
 	 This is to guard against strange but valid code like
 
diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc
index 322416e6556..3635460bffd 100644
--- a/gcc/fortran/dump-parse-tree.cc
+++ b/gcc/fortran/dump-parse-tree.cc
@@ -3543,7 +3543,7 @@  gfc_dump_c_prototypes (gfc_namespace *ns, FILE *file)
   gfc_traverse_ns (ns, write_interop_decl);
 }
 
-/* Loop over all global symbols, writing out their declrations.  */
+/* Loop over all global symbols, writing out their declarations.  */
 
 void
 gfc_dump_external_c_prototypes (FILE * file)
diff --git a/gcc/fortran/frontend-passes.cc b/gcc/fortran/frontend-passes.cc
index 22f1bb56a2b..4033f27df99 100644
--- a/gcc/fortran/frontend-passes.cc
+++ b/gcc/fortran/frontend-passes.cc
@@ -974,7 +974,7 @@  cfe_code (gfc_code **c, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
   changed_statement = NULL;
 
   /* Do not do anything inside a WHERE statement; scalar assignments, BLOCKs
-     and allocation on assigment are prohibited inside WHERE, and finally
+     and allocation on assignment are prohibited inside WHERE, and finally
      masking an expression would lead to wrong-code when replacing
 
      WHERE (a>0)
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index 2a55676791b..f8737f4d323 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -1093,7 +1093,7 @@  variable.
 
 The maximum number of bytes of user data in a subrecord is 2147483639
 (2 GiB - 9) for a four-byte record marker.  This limit can be lowered
-with the @option{-fmax-subrecord-length} option, altough this is
+with the @option{-fmax-subrecord-length} option, although this is
 rarely useful. If the length of a logical record exceeds this limit,
 the data is distributed among several subrecords.
 
diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi
index f182cacb4b8..e3cd8279960 100644
--- a/gcc/fortran/intrinsic.texi
+++ b/gcc/fortran/intrinsic.texi
@@ -12897,7 +12897,7 @@  end program real_kinds
 @table @asis
 @item @emph{Description}:
 @code{SET_EXPONENT(X, I)} returns the real number whose fractional part
-is that that of @var{X} and whose exponent part is @var{I}.
+is that of @var{X} and whose exponent part is @var{I}.
 
 @item @emph{Standard}:
 Fortran 90 and later
@@ -12917,7 +12917,7 @@  Elemental function
 @item @emph{Return value}:
 The return value is of the same type and kind as @var{X}.
 The real number whose fractional part
-is that that of @var{X} and whose exponent part if @var{I} is returned;
+is that of @var{X} and whose exponent part if @var{I} is returned;
 it is @code{FRACTION(X) * RADIX(X)**I}.
 
 @item @emph{Example}:
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index 6435dc4d4de..5c7501a28b1 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -1858,7 +1858,7 @@  except when optimizing for size via @option{-Os}.  If the code
 contains a very large number of argument that have to be packed, code
 size and also compilation time may become excessive.  If that is the
 case, it may be better to disable this option.  Instances of packing
-can be found by using by using @option{-Warray-temporaries}.
+can be found by using @option{-Warray-temporaries}.
 
 @item -fexternal-blas
 @opindex @code{fexternal-blas}
@@ -2068,7 +2068,7 @@  does not generate prototypes for @code{BIND(C)} procedures, use
 @option{-fc-prototypes} for that.
 
 The generated prototypes may need inclusion of an appropriate
-header, such as as @code{<stdint.h>} or @code{<stdlib.h>}.
+header, such as @code{<stdint.h>} or @code{<stdlib.h>}.
 
 This is primarily meant for legacy code to ensure that existing C
 bindings match what @command{gfortran} emits.  The generated C
diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 0afa5d3346a..0b55961f083 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -11539,7 +11539,7 @@  generate_component_assignments (gfc_code **code, gfc_namespace *ns)
 	  || comp1->attr.proc_pointer)
 	continue;
 
-      /* Make an assigment for this component.  */
+      /* Make an assignment for this component.  */
       this_code = build_assignment (EXEC_ASSIGN,
 				    (*code)->expr1, (*code)->expr2,
 				    comp1, comp2, (*code)->loc);
diff --git a/gcc/fortran/simplify.cc b/gcc/fortran/simplify.cc
index 6483f9c31e7..0c15bcb2b0a 100644
--- a/gcc/fortran/simplify.cc
+++ b/gcc/fortran/simplify.cc
@@ -8424,7 +8424,7 @@  gfc_simplify_this_image (gfc_expr *coarray, gfc_expr *dim,
     return NULL;
 
   /* If no coarray argument has been passed or when the first argument
-     is actually a distance argment.  */
+     is actually a distance argument.  */
   if (coarray == NULL || !gfc_is_coarray (coarray))
     {
       gfc_expr *result;
diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index 2549d32e530..c9d9a916c28 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -1777,7 +1777,7 @@  trans_scalar_class_assign (stmtblock_t *block, gfc_se *lse, gfc_se *rse)
   bool not_call_expr = TREE_CODE (rse->expr) != CALL_EXPR;
   bool not_lhs_array_type;
 
-  /* Temporaries arising from depencies in assignment get cast as a
+  /* Temporaries arising from dependencies in assignment get cast as a
      character type of the dynamic size of the rhs. Use the vptr copy
      for this case.  */
   tmp = TREE_TYPE (lse->expr);
@@ -2934,7 +2934,7 @@  gfc_maybe_dereference_var (gfc_symbol *sym, tree var, bool descriptor_only_p,
 		   || CLASS_DATA (sym)->attr.class_pointer))
 	var = build_fold_indirect_ref_loc (input_location, var);
       /* And the case where a non-dummy, non-result, non-function,
-	 non-allotable and non-pointer classarray is present.  This case was
+	 non-allocable and non-pointer classarray is present.  This case was
 	 previously covered by the first if, but with introducing the
 	 condition !is_classarray there, that case has to be covered
 	 explicitly.  */