diff mbox

Fix typos in comments throughout source tree

Message ID 20170403175316.GH4425@redhat.com
State New
Headers show

Commit Message

Jonathan Wakely April 3, 2017, 5:53 p.m. UTC
This fixes lots of typos throughout the tree. Can this be committed to
trunk as obvious?

I've bootstrapped the C and C++ compilers, but not Ada, and of course
not compiled all the target changes in gcc/config/*

Is one big commit OK, or one per-ChangeLog? Or something else?

(Currently I have one commit per ChangeLog, but can easily squash it
to one commit.)

I'm sure there are many more, because this patch comes from an old
branch I found lying around on an old machine. I did this back in
2013 but never committed it:
https://gcc.gnu.org/ml/gcc-patches/2013-07/msg00226.html

Comments

Mike Stump April 3, 2017, 6:47 p.m. UTC | #1
On Apr 3, 2017, at 10:53 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
> 
> This fixes lots of typos throughout the tree. Can this be committed to
> trunk as obvious?

Yes, it can.  However, I like it when even this patch is reviewed.  I reviewed it, looks good.

You missed initialisers -> initializers.

Not sure I like datastructures, should be data structures?

figure out that poth parameters  -> figure out that both parameters


> I've bootstrapped the C and C++ compilers, but not Ada, and of course
> not compiled all the target changes in gcc/config/*
> 
> Is one big commit OK, or one per-ChangeLog? Or something else?

I'd just do one big commit.
Jonathan Wakely April 3, 2017, 7:06 p.m. UTC | #2
On 03/04/17 11:48 -0700, Mike Stump wrote:
>[ dup, I sent the wrong from the wrong email address, you might not see it because of that ]
>
>> On Apr 3, 2017, at 11:47 AM, Mike Stump <mrs@mrs.kithrup.com> wrote:
>>
>> On Apr 3, 2017, at 10:53 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
>>>
>>> This fixes lots of typos throughout the tree. Can this be committed to
>>> trunk as obvious?
>>
>> Yes, it can.  However, I like it when even this patch is reviewed.  I reviewed it, looks good.
>>
>> You missed initialisers -> initializers.

Ah yes, in a couple of places.

I think the original email about these typos only covered words
beginning with the letters A to E, so there are bound to be lots more
typos unfixed :-)


>> Not sure I like datastructures, should be data structures?

Will do. I also forgot to do something about the "accestor ???" part

   We provide accestor to the inline_summary datastructure and
   basic logic updating the parameters when inlining is performed.

I don't know what that's supposed to say. "access"? "accessors"?


>> figure out that poth parameters  -> figure out that both parameters

I'll fix that.

>>> I've bootstrapped the C and C++ compilers, but not Ada, and of course
>>> not compiled all the target changes in gcc/config/*
>>>
>>> Is one big commit OK, or one per-ChangeLog? Or something else?
>>
>> I'd just do one big commit.
>

Will do, thanks.
Jonathan Wakely April 3, 2017, 10:31 p.m. UTC | #3
On 03/04/17 20:06 +0100, Jonathan Wakely wrote:
>On 03/04/17 11:48 -0700, Mike Stump wrote:
>>[ dup, I sent the wrong from the wrong email address, you might not see it because of that ]
>>
>>>On Apr 3, 2017, at 11:47 AM, Mike Stump <mrs@mrs.kithrup.com> wrote:
>>>
>>>On Apr 3, 2017, at 10:53 AM, Jonathan Wakely <jwakely@redhat.com> wrote:
>>>>
>>>>This fixes lots of typos throughout the tree. Can this be committed to
>>>>trunk as obvious?
>>>
>>>Yes, it can.  However, I like it when even this patch is reviewed.  I reviewed it, looks good.
>>>
>>>You missed initialisers -> initializers.
>
>Ah yes, in a couple of places.
>
>I think the original email about these typos only covered words
>beginning with the letters A to E, so there are bound to be lots more
>typos unfixed :-)
>
>
>>>Not sure I like datastructures, should be data structures?
>
>Will do. I also forgot to do something about the "accestor ???" part
>
>  We provide accestor to the inline_summary datastructure and
>  basic logic updating the parameters when inlining is performed.
>
>I don't know what that's supposed to say. "access"? "accessors"?

I went for "access".

Thanks for the review.


>>>figure out that poth parameters  -> figure out that both parameters
>
>I'll fix that.
>
>>>>I've bootstrapped the C and C++ compilers, but not Ada, and of course
>>>>not compiled all the target changes in gcc/config/*
>>>>
>>>>Is one big commit OK, or one per-ChangeLog? Or something else?
>>>
>>>I'd just do one big commit.
>>
>
>Will do, thanks.
>
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 30daa0d..6d6e3dd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,46 @@ 
+2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
+
+	* alias.c (base_alias_check): Fix typo in comment.
+	* cgraph.h (class ipa_polymorphic_call_context): Likewise.
+	* cgraphunit.c (symbol_table::compile): Likewise.
+	* collect2.c (maybe_run_lto_and_relink): Likewise.
+	* fold-const.c (fold_truth_andor): Likewise.
+	* genautomata.c (collapse_flag): Likewise.
+	* gengtype.h (struct type::u::s): Likewise.
+	* gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
+	* input.c (FORMAT_AMOUNT): Likewise.
+	* ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
+	(known_aggs_to_agg_replacement_list): Likewise.
+	* ipa-inline-analysis.c: Likewise.
+	* ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
+	* ipa-polymorphic-call.c
+	(ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
+	* loop-unroll.c (analyze_insn_to_expand_var): Likewise.
+	* lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
+	Likewise.
+	* modulo-sched.c (apply_reg_moves): Likewise.
+	* omp-expand.c (build_omp_regions_1): Likewise.
+	* trans-mem.c (struct tm_wrapper_hasher): Likewise.
+	* tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
+	* tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
+	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
+	* value-prof.c: Likewise.
+	* var-tracking.c (val_reset): Likewise.
+
+	* config/arm/arm.c (arm_thumb1_mi_thunk): Fix typo in comment.
+	* config/avr/avr-arch.h (avr_arch_info_t): Likewise.
+	* config/avr/avr.c (avr_map_op_t): Likewise.
+	* config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
+	* config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
+	* config/epiphany/epiphany.md (movcc): Likewise.
+	* config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
+	* config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
+	Likewise.
+	* config/mips/mips.c (mips_save_restore_reg): Likewise.
+	* config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
+	* config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
+	* config/sh/sh.c (sh_rtx_costs): Likewise.
+
 2017-04-03  Richard Biener  <rguenther@suse.de>
 
 	PR tree-optimization/80275
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 3efce33..127a181 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,14 @@ 
+2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
+
+	* doc/gnat_ugn/gnat_and_program_execution.rst: Fix typo.
+	* g-socket.adb (To_Host_Entry): Fix typo in comment.
+	* gnat_ugn.texi: Fix typo.
+	* raise.c (_gnat_builtin_longjmp): Fix capitalization in comment.
+	* s-stposu.adb (Allocate_Any_Controlled): Fix typo in comment.
+	* sem_ch3.adb (Build_Derived_Record_Type): Likewise.
+	* sem_util.adb (Mark_Coextensions): Likewise.
+	* sem_util.ads (Available_Full_View_Of_Component): Likewise.
+
 2017-03-28  Andreas Schwab  <schwab@suse.de>
 
 	PR ada/80117
diff --git a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
index b090236..37c077e 100644
--- a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
+++ b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
@@ -3091,7 +3091,7 @@  The three modes are:
 
 Note that these modes apply only to the evaluation of predefined
 arithmetic, membership, and comparison operators for signed integer
-aritmetic.
+arithmetic.
 
 For fixed-point arithmetic, checks can be suppressed. But if checks
 are enabled
diff --git a/gcc/ada/g-socket.adb b/gcc/ada/g-socket.adb
index a8b718a..07931af 100644
--- a/gcc/ada/g-socket.adb
+++ b/gcc/ada/g-socket.adb
@@ -2541,7 +2541,7 @@  package body GNAT.Sockets is
 
                --  Hostent_H_Addr (E, <index>) may return an address that is
                --  not correctly aligned for In_Addr, so we need to use
-               --  an intermediate copy operation on a type with an alignemnt
+               --  an intermediate copy operation on a type with an alignment
                --  of 1 to recover the value.
 
                subtype Addr_Buf_T is C.char_array (1 .. Addr'Size / 8);
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 421419f..1916d1e 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -22168,7 +22168,7 @@  but overflow is impossible.
 
 Note that these modes apply only to the evaluation of predefined
 arithmetic, membership, and comparison operators for signed integer
-aritmetic.
+arithmetic.
 
 For fixed-point arithmetic, checks can be suppressed. But if checks
 are enabled
diff --git a/gcc/ada/raise.c b/gcc/ada/raise.c
index a0c0121..a61723d 100644
--- a/gcc/ada/raise.c
+++ b/gcc/ada/raise.c
@@ -50,7 +50,7 @@  extern "C" {
 /*  Wrapper to builtin_longjmp.  This is for the compiler eh only, as the sjlj
     runtime library interfaces directly to the intrinsic.  We can't yet do
     this for the compiler itself, because this capability relies on changes
-    made in april 2008 and we need to preserve the possibility to bootstrap
+    made in April 2008 and we need to preserve the possibility to bootstrap
     with an older base version.  */
 
 #if defined (IN_GCC) && !defined (IN_RTS)
diff --git a/gcc/ada/s-stposu.adb b/gcc/ada/s-stposu.adb
index 6c98e6b..d017ce3 100644
--- a/gcc/ada/s-stposu.adb
+++ b/gcc/ada/s-stposu.adb
@@ -221,7 +221,7 @@  package body System.Storage_Pools.Subpools is
          pragma Assert
            (Fin_Address /= null, "primitive Finalize_Address not available");
 
-         --  The size must acount for the hidden header preceding the object.
+         --  The size must account for the hidden header preceding the object.
          --  Account for possible padding space before the header due to a
          --  larger alignment.
 
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 1f774c0..de3a49e 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -8706,7 +8706,7 @@  package body Sem_Ch3 is
 
                --  However, if the record contains an array constrained by
                --  the discriminant but with some different bound, the compiler
-               --  attemps to create a smaller range for the discriminant type.
+               --  attempts to create a smaller range for the discriminant type.
                --  (See exp_ch3.Adjust_Discriminants). In this case, where
                --  the discriminant type is a scalar type, the check must use
                --  the original discriminant type in the parent declaration.
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 1d78642..93d8bd5 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -16131,7 +16131,7 @@  package body Sem_Util is
                                                N_Allocator,
                                                N_Qualified_Expression);
 
-      --  An alloctor that appears within the initialization expression of an
+      --  An allocator that appears within the initialization expression of an
       --  object declaration is considered a potentially dynamic coextension
       --  when the initialization expression is an allocator or a qualified
       --  expression.
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index 42d51a5..f9ab813 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -154,10 +154,10 @@  package Sem_Util is
 
    function Available_Full_View_Of_Component (T : Entity_Id) return Boolean;
    --  If at the point of declaration an array type has a private or limited
-   --  component, several array operations are not avaiable on the type, and
+   --  component, several array operations are not available on the type, and
    --  the array type is flagged accordingly. If in the immediate scope of
    --  the array type the component becomes non-private or non-limited, these
-   --  operations become avaiable. This can happen if the scopes of both types
+   --  operations become available. This can happen if the scopes of both types
    --  are open, and the scope of the array is not outside the scope of the
    --  component.
 
diff --git a/gcc/alias.c b/gcc/alias.c
index 93c136f..cc31ee0 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -2157,7 +2157,7 @@  base_alias_check (rtx x, rtx x_base, rtx y, rtx y_base,
   /* The base addresses are different expressions.  If they are not accessed
      via AND, there is no conflict.  We can bring knowledge of object
      alignment into play here.  For example, on alpha, "char a, b;" can
-     alias one another, though "char a; long b;" cannot.  AND addesses may
+     alias one another, though "char a; long b;" cannot.  AND addresses may
      implicitly alias surrounding objects; i.e. unaligned access in DImode
      via AND address can alias all surrounding object types except those
      with aligment 8 or higher.  */
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 0d5a16f..594aa05 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,7 @@ 
+2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
+
+	* c-warn.c (do_warn_double_promotion): Fix typo in comment.
+
 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
 
 	PR c++/79572
diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c
index cdfa10c..45dd583 100644
--- a/gcc/c-family/c-warn.c
+++ b/gcc/c-family/c-warn.c
@@ -1850,7 +1850,7 @@  warn_for_sign_compare (location_t location,
    the warning message.  It must have two %T specifiers for the type
    that was converted (generally "float") and the type to which it was
    converted (generally "double), respectively.  LOC is the location
-   to which the awrning should refer.  */
+   to which the warning should refer.  */
 
 void
 do_warn_double_promotion (tree result_type, tree type1, tree type2,
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index b64d9cf..ec19221 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,7 @@ 
+2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
+
+	* c-array-notation.c: Fix typo in comment.
+
 2017-03-29  Marek Polacek  <polacek@redhat.com>
 
 	PR c/79730
diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c
index 4c6651e..e430f5c 100644
--- a/gcc/c/c-array-notation.c
+++ b/gcc/c/c-array-notation.c
@@ -26,7 +26,7 @@ 
    An array notation expression has 4 major components:
    1. The array name
    2. Start Index
-   3. Number of elements we need to acess (we call it length)
+   3. Number of elements we need to access (we call it length)
    4. Stride
 
    For example, A[0:5:2], implies that we are accessing A[0], A[2], A[4],
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 62cebd9..77aa880 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -1511,7 +1511,7 @@  public:
      Return true if resulting context is valid.
 
      When CONSIDER_PLACEMENT_NEW is false, reject contexts that may be made
-     valid only via alocation of new polymorphic type inside by means
+     valid only via allocation of new polymorphic type inside by means
      of placement new.
 
      When CONSIDER_BASES is false, only look for actual fields, not base types
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 8635e3b..4a949ca 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -2497,7 +2497,7 @@  symbol_table::compile (void)
   bitmap_obstack_release (NULL);
   mark_functions_to_output ();
 
-  /* When weakref support is missing, we autmatically translate all
+  /* When weakref support is missing, we automatically translate all
      references to NODE to references to its ultimate alias target.
      The renaming mechanizm uses flag IDENTIFIER_TRANSPARENT_ALIAS and
      TREE_CHAIN.
diff --git a/gcc/collect2.c b/gcc/collect2.c
index b109f73..ddbd2be 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -761,7 +761,7 @@  maybe_run_lto_and_relink (char **lto_ld_argv, char **object_lst,
       do_wait (prog, pex);
       pex = NULL;
 
-      /* Compute memory needed for new LD arguments.  At most number of original arguemtns
+      /* Compute memory needed for new LD arguments.  At most number of original arguments
 	 plus number of partitions.  */
       for (lto_ld_argv_size = 0; lto_ld_argv[lto_ld_argv_size]; lto_ld_argv_size++)
 	;
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index b24143e..bc1e607 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -26228,7 +26228,7 @@  arm_thumb1_mi_thunk (FILE *file, tree, HOST_WIDE_INT delta,
     {
       int labelno = thunk_label++;
       ASM_GENERATE_INTERNAL_LABEL (label, "LTHUMBFUNC", labelno);
-      /* Thunks are entered in arm mode when avaiable.  */
+      /* Thunks are entered in arm mode when available.  */
       if (TARGET_THUMB1_ONLY)
 	{
 	  /* push r3 so we can use it as a temporary.  */
diff --git a/gcc/config/avr/avr-arch.h b/gcc/config/avr/avr-arch.h
index 9c42688..9463735 100644
--- a/gcc/config/avr/avr-arch.h
+++ b/gcc/config/avr/avr-arch.h
@@ -169,7 +169,7 @@  typedef struct
   /* Architecture ID.  */
   enum avr_arch_id arch_id;
 
-  /* textinfo source to describe the archtiecture.  */
+  /* textinfo source to describe the architecture.  */
   const char *texinfo;
 } avr_arch_info_t;
 
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index cde63f1..7f5a22b 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -13335,7 +13335,7 @@  typedef struct
   /* G^-1, the inverse of G (*, arg) */
   unsigned ginv;
 
-  /* The cost of appplying G (*, arg) */
+  /* The cost of applying G (*, arg) */
   int cost;
 
   /* The composition F o G^-1 (*, arg) for some function F */
diff --git a/gcc/config/cr16/cr16.h b/gcc/config/cr16/cr16.h
index 7f8796c..e2a678e 100644
--- a/gcc/config/cr16/cr16.h
+++ b/gcc/config/cr16/cr16.h
@@ -114,7 +114,7 @@  while (0)
      && ((ALIGN) < BITS_PER_WORD))               \
      ? (BITS_PER_WORD) : (ALIGN))
 
-/* In CR16 strings are word-aligne; strcpy from constants will be faster.  */
+/* In CR16 strings are word-aligned; strcpy from constants will be faster.  */
 #define CONSTANT_ALIGNMENT(CONSTANT, ALIGN)                            \
   (((TREE_CODE (CONSTANT) == STRING_CST) && ((ALIGN) < BITS_PER_WORD)) \
      ? (BITS_PER_WORD) : (ALIGN))
diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c
index 41864f2..b9ec0f4 100644
--- a/gcc/config/epiphany/epiphany.c
+++ b/gcc/config/epiphany/epiphany.c
@@ -95,7 +95,7 @@  static rtx_insn *frame_insn (rtx);
 #define TARGET_SETUP_INCOMING_VARARGS epiphany_setup_incoming_varargs
 
 /* Using the simplistic varags handling forces us to do partial reg/stack
-   argument passing for types with larger size (> 4 bytes) than alignemnt.  */
+   argument passing for types with larger size (> 4 bytes) than alignment.  */
 #define TARGET_ARG_PARTIAL_BYTES epiphany_arg_partial_bytes
 
 #define TARGET_FUNCTION_OK_FOR_SIBCALL epiphany_function_ok_for_sibcall
diff --git a/gcc/config/epiphany/epiphany.md b/gcc/config/epiphany/epiphany.md
index 595c53e..90a5942 100644
--- a/gcc/config/epiphany/epiphany.md
+++ b/gcc/config/epiphany/epiphany.md
@@ -1438,7 +1438,7 @@ 
   [(set_attr "type" "flow")])
 
 ; Floating point instructions require manipulating the control register.
-; Manipulating the control register needs aritmetic.
+; Manipulating the control register needs arithmetic.
 ; Arithmetic clobbers flags.
 ; The flags are in the status register, which also contains the alternate
 ; flag and the interrupt enable/disable bits.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 6e27a09..80b8773 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -16713,7 +16713,7 @@  get_dllimport_decl (tree decl, bool beimport)
   return to;
 }
 
-/* Expand SYMBOL into its corresponding far-addresse symbol.
+/* Expand SYMBOL into its corresponding far-address symbol.
    WANT_REG is true if we require the result be a register.  */
 
 static rtx
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index a4c0b81..c14ce86 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -6019,7 +6019,7 @@  struct _sched_ib
     /* Size of buffer in records.  */
     int n_insns;
 
-    /* Array to hold data on adjustements made to the size of the buffer.  */
+    /* Array to hold data on adjustments made to the size of the buffer.  */
     int *adjust;
 
     /* Index of the above array.  */
@@ -6081,7 +6081,7 @@  m68k_sched_variable_issue (FILE *sched_dump ATTRIBUTE_UNUSED,
 	  if (sched_ib.records.adjust_index == sched_ib.records.n_insns)
 	    sched_ib.records.adjust_index = 0;
 
-	  /* Undo adjustement we did 7 instructions ago.  */
+	  /* Undo adjustment we did 7 instructions ago.  */
 	  sched_ib.size
 	    += sched_ib.records.adjust[sched_ib.records.adjust_index];
 
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index dadfcc4..42943e0 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -11414,7 +11414,7 @@  mips_save_restore_reg (machine_mode mode, int regno,
   fn (gen_rtx_REG (mode, regno), mem);
 }
 
-/* Call FN for each accumlator that is saved by the current function.
+/* Call FN for each accumulator that is saved by the current function.
    SP_OFFSET is the offset of the current stack pointer from the start
    of the frame.  */
 
diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c
index e6bb846..1e74f38 100644
--- a/gcc/config/rx/rx.c
+++ b/gcc/config/rx/rx.c
@@ -267,7 +267,7 @@  rx_is_legitimate_address (machine_mode mode, rtx x,
   return rx_small_data_operand (x);
 }
 
-/* Returns TRUE for simple memory addreses, ie ones
+/* Returns TRUE for simple memory addresses, ie ones
    that do not involve register indirect addressing
    or pre/post increment/decrement.  */
 
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 0b1a95f..51b3d46 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -13968,7 +13968,7 @@  s390_fpload_toreg (rtx_insn *insn, unsigned int regno)
 }
 
 /* This value describes the distance to be avoided between an
-   aritmetic fp instruction and an fp load writing the same register.
+   arithmetic fp instruction and an fp load writing the same register.
    Z10_EARLYLOAD_DISTANCE - 1 as well as Z10_EARLYLOAD_DISTANCE + 1 is
    fine but the exact value has to be avoided. Otherwise the FP
    pipeline will throw an exception causing a major penalty.  */
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 5b84b15..ff79b93 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -3259,7 +3259,7 @@  sh_rtx_costs (rtx x, machine_mode mode ATTRIBUTE_UNUSED, int outer_code,
       return false;
 
     /* The cost of a sign or zero extend depends on whether the source is a
-       reg or a mem.  In case of a mem take the address into acount.  */
+       reg or a mem.  In case of a mem take the address into account.  */
     case SIGN_EXTEND:
       if (arith_reg_operand (XEXP (x, 0), GET_MODE (XEXP (x, 0))))
 	{
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 7438479..f4b21c5 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@ 
+2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
+
+	* class.c (update_vtable_entry_for_fn): Fix typo in comment.
+	* decl2.c (one_static_initialization_or_destruction): Likewise.
+	* name-lookup.c (store_bindings): Likewise.
+	* parser.c (make_call_declarator): Likewise.
+	* pt.c (check_explicit_specialization): Likewise.
+
 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
 
 	PR c++/79572
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 9e4b4c4..940cead 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -2789,7 +2789,7 @@  update_vtable_entry_for_fn (tree t, tree binfo, tree fn, tree* virtuals,
      determined by which bases the function overrides, so we need to be
      sure that we're using a thunk for some overridden base; even if we
      know that the necessary this adjustment is zero, there may not be an
-     appropriate zero-this-adjusment thunk for us to use since thunks for
+     appropriate zero-this-adjustment thunk for us to use since thunks for
      overriding virtual bases always use the vcall offset.
 
      Furthermore, just choosing any base that overrides this function isn't
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index b50fadf..f258611 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3651,7 +3651,7 @@  one_static_initialization_or_destruction (tree decl, tree init, bool initp)
      This can happen when global variables initialisers are built.
      In that case, the DECL_CONTEXT() of the global variables _AND_ of all 
      the temporary variables that might have been generated in the
-     accompagning initialisers is NULL_TREE, meaning the variables have been
+     accompanying initialisers is NULL_TREE, meaning the variables have been
      declared in the global namespace.
      What we want to do here is to fix that and make sure the DECL_CONTEXT()
      of the temporaries are set to the current function decl.  */
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index 4d7d3a1..9dedad4 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -6341,7 +6341,7 @@  store_bindings (tree names, vec<cxx_saved_binding, va_gc> **old_bindings)
       vec_safe_reserve_exact (*old_bindings, bindings_need_stored.length ());
       for (i = 0; bindings_need_stored.iterate (i, &id); ++i)
 	{
-	  /* We can appearantly have duplicates in NAMES.  */
+	  /* We can apparently have duplicates in NAMES.  */
 	  if (store_binding_p (id))
 	    store_binding (id, old_bindings);
 	}
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index e93855f..e202ad9 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -1584,7 +1584,7 @@  make_ptrmem_declarator (cp_cv_quals cv_qualifiers, tree class_type,
 }
 
 /* Make a declarator for the function given by TARGET, with the
-   indicated PARMS.  The CV_QUALIFIERS aply to the function, as in
+   indicated PARMS.  The CV_QUALIFIERS apply to the function, as in
    "const"-qualified member function.  The EXCEPTION_SPECIFICATION
    indicates what exceptions can be thrown.  */
 
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index cbe8082..24b01e7 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -2968,7 +2968,7 @@  check_explicit_specialization (tree declarator,
 
       /* Figure out what exactly is being specialized at this point.
 	 Note that for an explicit instantiation, even one for a
-	 member function, we cannot tell apriori whether the
+	 member function, we cannot tell a priori whether the
 	 instantiation is for a member template, or just a member
 	 function of a template class.  Even if a member template is
 	 being instantiated, the member template arguments may be
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 7c05e0f..d0f1c06 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -8072,7 +8072,7 @@  fold_truth_andor (location_t loc, enum tree_code code, tree type,
 	  return fold_build2_loc (loc, icode, type, TREE_OPERAND (arg0, 0),
 				  tem);
 	}
-	/* Same as abouve but for (A AND[-IF] (B AND-IF C)) -> ((A AND B) AND-IF C),
+	/* Same as above but for (A AND[-IF] (B AND-IF C)) -> ((A AND B) AND-IF C),
 	   or (A OR[-IF] (B OR-IF C) -> ((A OR B) OR-IF C).  */
       else if (TREE_CODE (arg1) == icode
 	  && simple_operand_p_2 (arg0)
diff --git a/gcc/genautomata.c b/gcc/genautomata.c
index adec868..76dacbc 100644
--- a/gcc/genautomata.c
+++ b/gcc/genautomata.c
@@ -248,7 +248,7 @@  static int ndfa_flag;
 
 /* When making an NDFA, produce additional transitions that collapse
    NDFA state into a deterministic one suitable for querying CPU units.
-   Provide avance-state transitions only for deterministic states.  */
+   Provide advance-state transitions only for deterministic states.  */
 static int collapse_flag;
 
 /* Do not make minimization of DFA (`-no-minimization').  */
diff --git a/gcc/gengtype.h b/gcc/gengtype.h
index d57f45c..61a799f 100644
--- a/gcc/gengtype.h
+++ b/gcc/gengtype.h
@@ -277,7 +277,7 @@  struct type {
     /* when TYPE_STRUCT or TYPE_UNION or TYPE_LANG_STRUCT, we have an
        aggregate type containing fields: */
     struct {
-      const char *tag;          /* the aggragate tag, if any.  */
+      const char *tag;          /* the aggregate tag, if any.  */
       struct fileloc line;      /* the source location.  */
       pair_p fields;            /* the linked list of fields.  */
       options_p opt;            /* the GTY options if any.  */
diff --git a/gcc/gensupport.c b/gcc/gensupport.c
index 874e677..c79feb4 100644
--- a/gcc/gensupport.c
+++ b/gcc/gensupport.c
@@ -679,7 +679,7 @@  change_subst_attribute (struct queue_elem *elem,
    represented by SUBST_ELEM and this attribute has value SUBST_TRUE.
    DEFINE_SUBST isn't applied to patterns without such attribute.  In other
    words, we suppose the default value of the attribute to be 'no' since it is
-   always generated automaticaly in read-rtl.c.  */
+   always generated automatically in read-rtl.c.  */
 static bool
 has_subst_attribute (struct queue_elem *elem, struct queue_elem *subst_elem)
 {
@@ -2259,7 +2259,7 @@  htab_eq_string (const void *s1, const void *s2)
 }
 
 /* Add mnemonic STR with length LEN to the mnemonic hash table
-   MNEMONIC_HTAB.  A trailing zero end character is appendend to STR
+   MNEMONIC_HTAB.  A trailing zero end character is appended to STR
    and a permanent heap copy of STR is created.  */
 
 static void
diff --git a/gcc/input.c b/gcc/input.c
index 38deb62..8071810 100644
--- a/gcc/input.c
+++ b/gcc/input.c
@@ -885,7 +885,7 @@  make_location (location_t caret, location_t start, location_t finish)
 #define STAT_LABEL(x) ((x) < 10 * ONE_K ? ' ' : ((x) < 10 * ONE_M ? 'k' : 'M'))
 
 /* Display an integer amount as multiple of 1K or 1M (in base 2).
-   Display the correct unit (either k, M, or ' ') after the amout, as
+   Display the correct unit (either k, M, or ' ') after the amount, as
    well.  */
 #define FORMAT_AMOUNT(size) SCALE (size), STAT_LABEL (size)
 
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
index 16e7e22..0b40814 100644
--- a/gcc/ipa-cp.c
+++ b/gcc/ipa-cp.c
@@ -193,7 +193,7 @@  public:
 };
 
 /* Lattice describing potential values of a formal parameter of a function, or
-   a part of an aggreagate.  TOP is represented by a lattice with zero values
+   a part of an aggregate.  TOP is represented by a lattice with zero values
    and with contains_variable and bottom flags cleared.  BOTTOM is represented
    by a lattice with the bottom flag set.  In that case, values and
    contains_variable flag should be disregarded.  */
@@ -4014,7 +4014,7 @@  intersect_with_plats (struct ipcp_param_lattices *plats,
     }
 }
 
-/* Copy agggregate replacement values of NODE (which is an IPA-CP clone) to the
+/* Copy aggregate replacement values of NODE (which is an IPA-CP clone) to the
    vector result while subtracting OFFSET from the individual value offsets.  */
 
 static vec<ipa_agg_jf_item>
@@ -4276,7 +4276,7 @@  find_aggregate_values_for_callers_subset (struct cgraph_node *node,
   return res;
 }
 
-/* Turn KNOWN_AGGS into a list of aggreate replacement values.  */
+/* Turn KNOWN_AGGS into a list of aggregate replacement values.  */
 
 static struct ipa_agg_replacement_value *
 known_aggs_to_agg_replacement_list (vec<ipa_agg_jump_function> known_aggs)
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 611faab..6f1df0b 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -30,12 +30,12 @@  along with GCC; see the file COPYING3.  If not see
    For each call
      - call statement size and time
 
-   inlinie_summary datastructures store above information locally (i.e.
+   inline_summary datastructures store above information locally (i.e.
    parameters of the function itself) and globally (i.e. parameters of
    the function created by applying all the inline decisions already
    present in the callgraph).
 
-   We provide accestor to the inline_summary datastructure and
+   We provide accestor ??? to the inline_summary datastructure and
    basic logic updating the parameters when inlining is performed. 
 
    The summaries are context sensitive.  Context means
@@ -43,7 +43,7 @@  along with GCC; see the file COPYING3.  If not see
      2) whether function is inlined into the call or not.
    It is easy to add more variants.  To represent function size and time
    that depends on context (i.e. it is known to be optimized away when
-   context is known either by inlining or from IP-CP and clonning),
+   context is known either by inlining or from IP-CP and cloning),
    we use predicates. Predicates are logical formulas in
    conjunctive-disjunctive form consisting of clauses. Clauses are bitmaps
    specifying what conditions must be true. Conditions are simple test
diff --git a/gcc/ipa-inline.h b/gcc/ipa-inline.h
index 6bbb97f..0010530 100644
--- a/gcc/ipa-inline.h
+++ b/gcc/ipa-inline.h
@@ -309,7 +309,7 @@  estimate_edge_growth (struct cgraph_edge *edge)
 	  - inline_edge_summary (edge)->call_stmt_size);
 }
 
-/* Return estimated callee runtime increase after inlning
+/* Return estimated callee runtime increase after inlining
    EDGE.  */
 
 static inline int
@@ -323,7 +323,7 @@  estimate_edge_time (struct cgraph_edge *edge)
 }
 
 
-/* Return estimated callee runtime increase after inlning
+/* Return estimated callee runtime increase after inlining
    EDGE.  */
 
 static inline inline_hints
diff --git a/gcc/ipa-polymorphic-call.c b/gcc/ipa-polymorphic-call.c
index e690d05..c8bab92 100644
--- a/gcc/ipa-polymorphic-call.c
+++ b/gcc/ipa-polymorphic-call.c
@@ -117,7 +117,7 @@  possible_placement_new (tree type, tree expected_type,
    Return true when lookup was sucesful.
 
    When CONSIDER_PLACEMENT_NEW is false, reject contexts that may be made
-   valid only via alocation of new polymorphic type inside by means
+   valid only via allocation of new polymorphic type inside by means
    of placement new.
 
    When CONSIDER_BASES is false, only look for actual fields, not base types
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index 1a9cea1..dd5bdc5 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -1454,7 +1454,7 @@  analyze_insn_to_expand_var (struct loop *loop, rtx_insn *insn)
   if (debug_uses)
     /* Instead of resetting the debug insns, we could replace each
        debug use in the loop with the sum or product of all expanded
-       accummulators.  Since we'll only know of all expansions at the
+       accumulators.  Since we'll only know of all expansions at the
        end, we'd have to keep track of which vars_to_expand a debug
        insn in the loop references, take note of each copy of the
        debug insn during unrolling, and when it's all done, compute
diff --git a/gcc/lra.c b/gcc/lra.c
index ed1f062..1230b25 100644
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -2267,13 +2267,13 @@  bitmap_head lra_inheritance_pseudos;
 /* Split regnos before the new spill pass.  */
 bitmap_head lra_split_regs;
 
-/* Reload pseudo regnos before the new assignmnet pass which still can
-   be spilled after the assinment pass as memory is also accepted in
+/* Reload pseudo regnos before the new assignment pass which still can
+   be spilled after the assignment pass as memory is also accepted in
    insns for the reload pseudos.  */
 bitmap_head lra_optional_reload_pseudos;
 
 /* Pseudo regnos used for subreg reloads before the new assignment
-   pass.  Such pseudos still can be spilled after the assinment
+   pass.  Such pseudos still can be spilled after the assignment
    pass.  */
 bitmap_head lra_subreg_reload_pseudos;
 
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index 270adc5..720391f 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -805,7 +805,7 @@  schedule_reg_moves (partial_schedule_ptr ps)
   return true;
 }
 
-/* Emit the moves associatied with PS.  Apply the substitutions
+/* Emit the moves associated with PS.  Apply the substitutions
    associated with them.  */
 static void
 apply_reg_moves (partial_schedule_ptr ps)
diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c
index ea951d6..5c48b78 100644
--- a/gcc/omp-expand.c
+++ b/gcc/omp-expand.c
@@ -7986,7 +7986,7 @@  build_omp_regions_1 (basic_block bb, struct omp_region *parent,
 	}
       else if (code == GIMPLE_OMP_ATOMIC_STORE)
 	{
-	  /* GIMPLE_OMP_ATOMIC_STORE is analoguous to
+	  /* GIMPLE_OMP_ATOMIC_STORE is analogous to
 	     GIMPLE_OMP_RETURN, but matches with
 	     GIMPLE_OMP_ATOMIC_LOAD.  */
 	  gcc_assert (parent);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2e0fce7..4a05eba 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@ 
+2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
+
+	* g++.old-deja/g++.benjamin/scope02.C: Fix typo in comment.
+	* gcc.dg/20031012-1.c: Likewise.
+	* gcc.dg/ipa/ipcp-1.c: Likewise.
+	* gcc.dg/torture/matrix-3.c: Likewise.
+	* gcc.target/powerpc/ppc-spe.c: Likewise.
+	* gcc.target/rx/zero-width-bitfield.c: Likewise.
+
 2017-04-03  Peter Bergner  <bergner@vnet.ibm.com>
 
 	PR target/80246
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/scope02.C b/gcc/testsuite/g++.old-deja/g++.benjamin/scope02.C
index 1ff541b..1ac1233 100644
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/scope02.C
+++ b/gcc/testsuite/g++.old-deja/g++.benjamin/scope02.C
@@ -83,7 +83,7 @@  int main(void)
 
   // p 4 
 
-  // if the id-expr in a class member acess is a qualified-id, the
+  // if the id-expr in a class member access is a qualified-id, the
   // id-expression is looked up in both the context of the entire
   // postfix-expr and in the scope of the class of the object-expr. If
   // the name is found in both contexts, the id-expr shall refer to
diff --git a/gcc/testsuite/gcc.dg/20031012-1.c b/gcc/testsuite/gcc.dg/20031012-1.c
index f83e1d3..24a68d0 100644
--- a/gcc/testsuite/gcc.dg/20031012-1.c
+++ b/gcc/testsuite/gcc.dg/20031012-1.c
@@ -1,6 +1,6 @@ 
 /* { dg-options "-Waddress" } */
 /* Origin: Andrew Morton <akpm@osdl.org> */
-/* Warn if a function addres of a non-weak function is used
+/* Warn if a function address of a non-weak function is used
    as a truth value.  */
 /* See thread starting at http://gcc.gnu.org/ml/gcc/2003-10/msg00414.html  */
 
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-1.c b/gcc/testsuite/gcc.dg/ipa/ipcp-1.c
index 9591c5e..0723093 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipcp-1.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-1.c
@@ -1,6 +1,6 @@ 
 /* Test that IPA-CP is able to figure out that poth parameters a are constant 7
    even though f and h recursively call each other and specialize them
-   accordinly.  */
+   accordingly.  */
 
 /* { dg-do compile } */
 /* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining"  } */
diff --git a/gcc/testsuite/gcc.dg/torture/matrix-3.c b/gcc/testsuite/gcc.dg/torture/matrix-3.c
index c646899..a2093ab 100644
--- a/gcc/testsuite/gcc.dg/torture/matrix-3.c
+++ b/gcc/testsuite/gcc.dg/torture/matrix-3.c
@@ -11,7 +11,7 @@  int ***vel;
 void just_a_call (int *);
 
 /* The last dimension of VEL escapes because it was sent
-   as argumet to just_a_call(). (external function)
+   as argument to just_a_call(). (external function)
    Only the two external dimensions are flattened.
    Run with -c.  */
 
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-spe.c b/gcc/testsuite/gcc.target/powerpc/ppc-spe.c
index b564394..5880e04 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-spe.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-spe.c
@@ -22,7 +22,7 @@  float fl;
 uint16_t u16;
 int16_t s16;
 
-/* These are the only documented/supported accesor functions for the
+/* These are the only documented/supported accessor functions for the
    SPE builtins.  */
 void
 test_api ()
diff --git a/gcc/testsuite/gcc.target/rx/zero-width-bitfield.c b/gcc/testsuite/gcc.target/rx/zero-width-bitfield.c
index 26cf5a2..8e477ff 100644
--- a/gcc/testsuite/gcc.target/rx/zero-width-bitfield.c
+++ b/gcc/testsuite/gcc.target/rx/zero-width-bitfield.c
@@ -1,7 +1,7 @@ 
 /* { dg-do run { xfail rx-*-* } } */
 /* { dg-skip-if "skipped until patch for generic zero=width bit-field handling is accepted" { rx-*-* } { "*" } { "" } } */
 /* { dg-options "-msim" } */
-/* Note: The -msim abiove is actually there to override the default
+/* Note: The -msim above is actually there to override the default
    options which do not allow the GCC extension of zero-width bitfields.  */
 
 extern void abort (void);
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c
index 9f55972..4409bea 100644
--- a/gcc/trans-mem.c
+++ b/gcc/trans-mem.c
@@ -456,7 +456,7 @@  build_tm_abort_call (location_t loc, bool is_outer)
 					     | (is_outer ? AR_OUTERABORT : 0)));
 }
 
-/* Map for aribtrary function replacement under TM, as created
+/* Map for arbitrary function replacement under TM, as created
    by the tm_wrap attribute.  */
 
 struct tm_wrapper_hasher : ggc_cache_ptr_hash<tree_map>
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 8dc65881..72e3ff9 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -5543,7 +5543,7 @@  may_eliminate_iv (struct ivopts_data *data,
     return false;
 
   /* Sometimes, it is possible to handle the situation that the number of
-     iterations may be zero unless additional assumtions by using <
+     iterations may be zero unless additional assumptions by using <
      instead of != in the exit condition.
 
      TODO: we could also calculate the value MAY_BE_ZERO ? 0 : NITER and
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index de206471..e67cd93 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -3697,7 +3697,7 @@  maybe_lower_iteration_bound (struct loop *loop)
      TODO: Due to the way record_estimate choose estimates to store, the bounds
      will be always nb_iterations_upper_bound-1.  We can change this to record
      also statements not dominating the loop latch and update the walk bellow
-     to the shortest path algorthm.  */
+     to the shortest path algorithm.  */
   for (elt = loop->bounds; elt; elt = elt->next)
     {
       if (!elt->is_exit
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 3d1d7e7..aa504b6 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -1550,7 +1550,7 @@  vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
                  Hence, except for the immediate peeling amount, we also want
                  to try to add full vector size, while we don't exceed
                  vectorization factor.
-                 We do this automtically for cost model, since we calculate cost
+                 We do this automatically for cost model, since we calculate cost
                  for every peeling option.  */
               if (unlimited_cost_model (LOOP_VINFO_LOOP (loop_vinfo)))
 		{
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index 22dc2c9..1ce0fda 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -100,7 +100,7 @@  along with GCC; see the file COPYING3.  If not see
    * The value profiling code could be used to record analysis results
      from non-profiling (e.g. VRP).
    * Adding new profilers should be simplified, starting with a cleanup
-     of what-happens-where andwith making gimple_find_values_to_profile
+     of what-happens-where and with making gimple_find_values_to_profile
      and gimple_value_profile_transformations table-driven, perhaps...
 */
 
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index b30a0eb..1b9f8dd 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -2555,7 +2555,7 @@  val_reset (dataflow_set *set, decl_or_value dv)
     {
       decl_or_value cdv = dv_from_value (cval);
 
-      /* Keep the remaining values connected, accummulating links
+      /* Keep the remaining values connected, accumulating links
 	 in the canonical value.  */
       for (node = var->var_part[0].loc_chain; node; node = node->next)
 	{
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 95200da..63cd5a5 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,9 @@ 
+2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
+
+	* include/line-map.h (LINEMAPS_MACRO_MAPS): Fix typo in comment.
+	* lex.c (search_line_fast): Likewise.
+	* pch.h (cpp_valid_state): Likewise.
+
 2017-03-21  Andreas Schwab  <schwab@suse.de>
 
 	* lex.c (search_line_fast) [__ARM_NEON && __ARM_64BIT_STATE]:
diff --git a/libcpp/include/line-map.h b/libcpp/include/line-map.h
index ec56de3..522e8bb 100644
--- a/libcpp/include/line-map.h
+++ b/libcpp/include/line-map.h
@@ -908,7 +908,7 @@  LINEMAPS_LAST_ALLOCATED_ORDINARY_MAP (const line_maps *set)
 }
 
 /* Returns a pointer to the beginning of the region where macro maps
-   are allcoated.  */
+   are allocated.  */
 inline line_map_macro *
 LINEMAPS_MACRO_MAPS (const line_maps *set)
 {
diff --git a/libcpp/lex.c b/libcpp/lex.c
index a431ac8..9edd2a6 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -912,7 +912,7 @@  search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED)
 
 #else
 
-/* We only have one accellerated alternative.  Use a direct call so that
+/* We only have one accelerated alternative.  Use a direct call so that
    we encourage inlining.  */
 
 #define search_line_fast  search_line_acc_char
diff --git a/libcpp/pch.c b/libcpp/pch.c
index f65346f..cad4b87 100644
--- a/libcpp/pch.c
+++ b/libcpp/pch.c
@@ -630,7 +630,7 @@  cpp_valid_state (cpp_reader *r, const char *name, int fd)
 	     attempting to use it without -g.  Restoring the PCH file
 	     is supposed to bring in this definition *and* enable the
 	     generation of call frame information, so that precompiled
-	     definitions that take this macro into accout, to decide
+	     definitions that take this macro into account, to decide
 	     what asm to emit, won't issue .cfi directives when the
 	     compiler doesn't.  */
 	  if (!(h->flags & NODE_USED)
diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog
index 287e373..984c92d 100644
--- a/libdecnumber/ChangeLog
+++ b/libdecnumber/ChangeLog
@@ -1,3 +1,8 @@ 
+2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
+
+	* decCommon.c (decFloatFromPackedChecked): Fix typo in comment.
+	* decNumber.c (decNumberPower, decMultiplyOp): Likewise.
+
 2017-01-08  Jakub Jelinek  <jakub@redhat.com>
 
 	PR bootstrap/79003
diff --git a/libdecnumber/decCommon.c b/libdecnumber/decCommon.c
index e31aebf..86037e0 100644
--- a/libdecnumber/decCommon.c
+++ b/libdecnumber/decCommon.c
@@ -713,7 +713,7 @@  decFloat * decFloatFromPacked(decFloat *df, Int exp, const uByte *packed) {
 /*  returns df, which will be canonical or NULL if any of the	      */
 /*    requirements are not met (if this case df is unchanged); that   */
 /*    is, the input data must be as returned by decFloatToPacked,     */
-/*    except that all six sign codes are acccepted.		      */
+/*    except that all six sign codes are accepted.		      */
 /*								      */
 /* No status will be set.					      */
 /* ------------------------------------------------------------------ */
diff --git a/libdecnumber/decNumber.c b/libdecnumber/decNumber.c
index 9e16318..566abb0 100644
--- a/libdecnumber/decNumber.c
+++ b/libdecnumber/decNumber.c
@@ -2171,7 +2171,7 @@  decNumber * decNumberPower(decNumber *res, const decNumber *lhs,
       /* if a negative power the constant 1 is needed, and if not subset */
       /* invert the lhs now rather than inverting the result later */
       if (decNumberIsNegative(rhs)) {	/* was a **-n [hence digits>0] */
-	decNumber *inv=invbuff; 	/* asssume use fixed buffer */
+	decNumber *inv=invbuff; 	/* assume use fixed buffer */
 	decNumberCopy(&dnOne, dac);	/* dnOne=1;  [needed now or later] */
 	#if DECSUBSET
 	if (set->extended) {		/* need to calculate 1/lhs */
@@ -5197,7 +5197,7 @@  static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs,
 /*    exp(-x) where x can be the tiniest number (Ntiny).	      */
 /*								      */
 /* 2. Normalizing x to be <=0.1 (instead of <=1) reduces loop	      */
-/*    iterations by appoximately a third with additional (although    */
+/*    iterations by approximately a third with additional (although    */
 /*    diminishing) returns as the range is reduced to even smaller    */
 /*    fractions.  However, h (the power of 10 used to correct the     */
 /*    result at the end, see below) must be kept <=8 as otherwise     */
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index ada1365..87fea5b 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,7 @@ 
+2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
+
+	* config/c6x/pr-support.c (__gnu_unwind_execute): Fix typo in comment.
+
 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
 
 	* config/arc/ieee-754/divdf3.S (__divdf3): Use __ARCEM__.
diff --git a/libgcc/config/c6x/pr-support.c b/libgcc/config/c6x/pr-support.c
index 6731850..f1ab7ad 100644
--- a/libgcc/config/c6x/pr-support.c
+++ b/libgcc/config/c6x/pr-support.c
@@ -449,7 +449,7 @@  __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws)
 
       if ((op & 0xf0) == 0xe0)
 	{
-	  /* B3 = reg.  RETURN case alreadh handled above.  */
+	  /* B3 = reg.  RETURN case already handled above.  */
 	  int regno = unwind_frame_regs[op & 0xf];
 
 	  _Unwind_VRS_Get (context, _UVRSC_CORE, regno, _UVRSD_UINT32, &reg);
diff --git a/libitm/ChangeLog b/libitm/ChangeLog
index f930cf3..07ab1fc 100644
--- a/libitm/ChangeLog
+++ b/libitm/ChangeLog
@@ -1,3 +1,7 @@ 
+2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
+
+	* libitm_i.h (sutrct gtm_thread): Fix typo in comment.
+
 2017-01-21  Jakub Jelinek  <jakub@redhat.com>
 
 	PR other/79046
diff --git a/libitm/libitm_i.h b/libitm/libitm_i.h
index 6ea17d2..b3633bb 100644
--- a/libitm/libitm_i.h
+++ b/libitm/libitm_i.h
@@ -258,7 +258,7 @@  struct gtm_thread
   atomic<gtm_word> shared_state;
 
   // The lock that provides access to serial mode.  Non-serialized
-  // transactions acquire read locks; a serialized transaction aquires
+  // transactions acquire read locks; a serialized transaction acquires
   // a write lock.
   // Accessed from assembly language, thus the "asm" specifier on
   // the name, avoiding complex name mangling.