Hi!

The PR is about a typo in handle_malloc_attribute diagnostic message,
but grepping around I found many other cases and while fixing those I've
noticed a couple of other typos.

Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk.

2021-02-28  Jakub Jelinek  <ja...@redhat.com>

        PR c/99304
        * ipa.c (symbol_table::remove_unreachable_nodes): Fix a comment
        typo - referneced -> referenced.
        * tree.c (component_ref_size): Fix comment typo -
        refernce -> reference.
        * tree-ssa-alias.c (access_path_may_continue_p): Fix comment typo -
        traling -> trailing.
        (aliasing_component_refs_p): Fix comment typos -
        refernce -> reference and refernece -> reference and
        traling -> trailing.
        (nonoverlapping_refs_since_match_p): Fix comment typo -
        referneces -> references.
        * doc/invoke.texi (--param modref-max-bases): Fix a typo -
        referneces -> references.
c-family/
        * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
        message - refernced -> referenced.  Remove superfluous space before
        closing ) of function calls.
lto/
        * lto-symtab.c (lto_symtab_prevailing_virtual_decl): Fix comment
        typos - refernced -> referenced and
        devirtualizaiton -> devirtualization.

--- gcc/ipa.c.jj        2021-01-04 10:25:38.423238467 +0100
+++ gcc/ipa.c   2021-02-27 15:38:27.974496481 +0100
@@ -285,7 +285,7 @@ walk_polymorphic_call_targets (hash_set<
    - C++ virtual tables keyed to other unit are represented as DECL_EXTERNAL
      variables with DECL_INITIAL set.  We finalize these and keep reachable
      ones around for constant folding purposes.  After inlining we however
-     stop walking their references to let everything static referneced by them
+     stop walking their references to let everything static referenced by them
      to be removed when it is otherwise unreachable.
 
    We maintain queue of both reachable symbols (i.e. defined symbols that needs
--- gcc/tree.c.jj       2021-02-08 19:07:33.130166682 +0100
+++ gcc/tree.c  2021-02-27 15:38:52.847220200 +0100
@@ -13857,7 +13857,7 @@ component_ref_size (tree ref, special_ar
                    *sam = special_array_member::trail_1;
                }
 
-      /* For a refernce to a zero- or one-element array member of a union
+      /* For a reference to a zero- or one-element array member of a union
         use the size of the union instead of the size of the member.  */
       if (TREE_CODE (argtype) == UNION_TYPE)
        memsize = TYPE_SIZE_UNIT (argtype);
--- gcc/tree-ssa-alias.c.jj     2021-01-04 10:25:38.527237289 +0100
+++ gcc/tree-ssa-alias.c        2021-02-27 15:47:35.671415937 +0100
@@ -1111,7 +1111,7 @@ aliasing_component_refs_walk (tree ref1,
    REF1_ALIAS_SET is the alias set of REF1.
 
    BASE_TYPE2 is type of base2.  END_STRUCT_REF2 is non-NULL if there is
-   a traling array access in the TBAA part of access path2.
+   a trailing array access in the TBAA part of access path2.
    BASE2_ALIAS_SET is the alias set of base2.  */
 
 bool
@@ -1183,8 +1183,8 @@ aliasing_component_refs_p (tree ref1,
      trailing array.
 
      We generally discard the segment after end_of_tbaa_ref however
-     we need to be careful in case it contains zero sized or traling array.
-     These may happen after refernce to union and in this case we need to
+     we need to be careful in case it contains zero sized or trailing array.
+     These may happen after reference to union and in this case we need to
      not disambiguate type puning scenarios.
 
      We set:
@@ -1195,7 +1195,7 @@ aliasing_component_refs_p (tree ref1,
        end_struct_ref1 to point the trailing reference (if it exists
        in range base....end_of_tbaa_ref
 
-       end_struct_past_end1 is true if this traling refernece occurs in
+       end_struct_past_end1 is true if this trailing reference occurs in
        end_of_tbaa_ref...actual_ref.  */
   base1 = ref1;
   while (handled_component_p (base1))
@@ -1674,7 +1674,7 @@ nonoverlapping_refs_since_match_p (tree
                  seen_unmatched_ref_p = true;
                  /* We can not maintain the invariant that bases are either
                     same or completely disjoint.  However we can still recover
-                    from type based alias analysis if we reach referneces to
+                    from type based alias analysis if we reach references to
                     same sizes.  We do not attempt to match array sizes, so
                     just finish array walking and look for component refs.  */
                  if (ntbaa1 < 0 || ntbaa2 < 0)
--- gcc/c-family/c-attribs.c.jj 2021-02-19 12:14:10.941114111 +0100
+++ gcc/c-family/c-attribs.c    2021-02-27 15:40:48.909931006 +0100
@@ -3343,7 +3343,7 @@ handle_malloc_attribute (tree *node, tre
          error ("%qE attribute argument 1 must take a pointer "
                 "type as its first argument", name);
          inform (DECL_SOURCE_LOCATION (dealloc),
-                 "refernced symbol declared here" );
+                 "referenced symbol declared here");
          *no_add_attrs = true;
          return NULL_TREE;
        }
@@ -3356,7 +3356,7 @@ handle_malloc_attribute (tree *node, tre
          error ("%qE attribute argument 1 must take a pointer type "
                 "as its first argument; have %qT", name, argtype);
          inform (DECL_SOURCE_LOCATION (dealloc),
-                 "referenced symbol declared here" );
+                 "referenced symbol declared here");
          *no_add_attrs = true;
          return NULL_TREE;
        }
--- gcc/doc/invoke.texi.jj      2021-02-25 23:07:07.926318336 +0100
+++ gcc/doc/invoke.texi 2021-02-27 15:39:41.526679484 +0100
@@ -13257,7 +13257,7 @@ are shared across multiple compilation u
 @item modref-max-bases
 @item modref-max-refs
 @item modref-max-accesses
-Specifies the maximal number of base pointers, referneces and accesses stored
+Specifies the maximal number of base pointers, references and accesses stored
 for a single function by mod/ref analysis.
 
 @item modref-max-tests
--- gcc/lto/lto-symtab.c.jj     2021-01-04 10:25:51.297092691 +0100
+++ gcc/lto/lto-symtab.c        2021-02-27 15:40:08.131383957 +0100
@@ -1081,7 +1081,8 @@ lto_symtab_merge_symbols (void)
 }
 
 /* Virtual tables may matter for code generation even if they are not
-   directly refernced by the code because they may be used for 
devirtualizaiton.
+   directly referenced by the code because they may be used for
+   devirtualization.
    For this reason it is important to merge even virtual tables that have no
    associated symbol table entries.  Without doing so we lose optimization
    oppurtunities by losing track of the vtable constructor.

        Jakub

Reply via email to