From 3bb6a9c01f1e9b5daf9b37fca57e90804ba90d66 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 22 Apr 2021 11:32:29 +0200 Subject: [PATCH] Fix various typos. PR testsuite/100159 PR testsuite/100192 gcc/ChangeLog: * builtins.c (expand_builtin): Fix typos and missing comments. * dwarf2out.c (gen_subprogram_die): Likewise. (gen_struct_or_union_type_die): Likewise. gcc/fortran/ChangeLog: * frontend-passes.c (optimize_expr): Fix typos and missing comments. gcc/testsuite/ChangeLog: * g++.dg/template/nontype29.C: Fix typos and missing comments. * gcc.dg/Warray-bounds-64.c: Likewise. * gcc.dg/Warray-parameter.c: Likewise. * gcc.dg/Wstring-compare.c: Likewise. * gcc.dg/format/gcc_diag-11.c: Likewise. * gfortran.dg/array_constructor_3.f90: Likewise. * gfortran.dg/matmul_bounds_9.f90: Likewise. * gfortran.dg/pr78033.f90: Likewise. * gfortran.dg/pr96325.f90: Likewise. --- gcc/builtins.c | 2 +- gcc/dwarf2out.c | 4 ++-- gcc/fortran/frontend-passes.c | 2 +- gcc/testsuite/g++.dg/template/nontype29.C | 4 ++-- gcc/testsuite/gcc.dg/Warray-bounds-64.c | 2 +- gcc/testsuite/gcc.dg/Warray-parameter.c | 2 +- gcc/testsuite/gcc.dg/Wstring-compare.c | 10 +++++----- gcc/testsuite/gcc.dg/format/gcc_diag-11.c | 2 +- gcc/testsuite/gfortran.dg/array_constructor_3.f90 | 2 +- gcc/testsuite/gfortran.dg/matmul_bounds_9.f90 | 2 +- gcc/testsuite/gfortran.dg/pr78033.f90 | 2 +- gcc/testsuite/gfortran.dg/pr96325.f90 | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gcc/builtins.c b/gcc/builtins.c index d30c4eb6..8c5324b 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -9986,7 +9986,7 @@ expand_builtin (tree exp, rtx target, rtx subtarget, machine_mode mode, break; /* Expand it as BUILT_IN_MEMCMP_EQ first. If not successful, change it - back to a BUILT_IN_STRCMP. Remember to delete the 3rd paramater + back to a BUILT_IN_STRCMP. Remember to delete the 3rd parameter when changing it to a strcmp call. */ case BUILT_IN_STRCMP_EQ: target = expand_builtin_memcmp (exp, target, true); diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index aba1684..c36fd5a 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -23542,7 +23542,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) resolve_variable_values (); } - /* Generate child dies for template paramaters. */ + /* Generate child dies for template parameters. */ if (early_dwarf && debug_info_level > DINFO_LEVEL_TERSE) gen_generic_params_dies (decl); @@ -25471,7 +25471,7 @@ gen_struct_or_union_type_die (tree type, dw_die_ref context_die, scope_die = scope_die_for (type, context_die); - /* Generate child dies for template paramaters. */ + /* Generate child dies for template parameters. */ if (!type_die && debug_info_level > DINFO_LEVEL_TERSE) schedule_generic_params_dies_gen (type); diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index 7d3eae6..93ac4b4 100644 --- a/gcc/fortran/frontend-passes.c +++ b/gcc/fortran/frontend-passes.c @@ -373,7 +373,7 @@ optimize_expr (gfc_expr **e, int *walk_subtrees ATTRIBUTE_UNUSED, return 0; } -/* Auxiliary function to handle the arguments to reduction intrnisics. If the +/* Auxiliary function to handle the arguments to reduction intrinsics. If the function is a scalar, just copy it; otherwise returns the new element, the old one can be freed. */ diff --git a/gcc/testsuite/g++.dg/template/nontype29.C b/gcc/testsuite/g++.dg/template/nontype29.C index 18a3058..dd4e20f 100644 --- a/gcc/testsuite/g++.dg/template/nontype29.C +++ b/gcc/testsuite/g++.dg/template/nontype29.C @@ -3,7 +3,7 @@ // { dg-do compile } // { dg-options "-Wall" } -#if __cpluspls >= 201103L +#if __cplusplus >= 201103L // C++ 11 test case from comment #0. namespace comment_0 { @@ -60,7 +60,7 @@ void h () } // comment_2 -#if __cpluspls >= 201103L +#if __cplusplus >= 201103L // C++ 11 test case from comment #5. namespace comment_5 { diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-64.c b/gcc/testsuite/gcc.dg/Warray-bounds-64.c index 88b88de..f5ebc3d 100644 --- a/gcc/testsuite/gcc.dg/Warray-bounds-64.c +++ b/gcc/testsuite/gcc.dg/Warray-bounds-64.c @@ -7,7 +7,7 @@ asks for. { dg-do compile } - { dg-options "-O2 -Wall -Warray-parameter -Wno-vla-paramater" } */ + { dg-options "-O2 -Wall -Warray-parameter -Wno-vla-parameter" } */ #define NOIPA __attribute__ ((noipa)) diff --git a/gcc/testsuite/gcc.dg/Warray-parameter.c b/gcc/testsuite/gcc.dg/Warray-parameter.c index 42be310..6c5195a 100644 --- a/gcc/testsuite/gcc.dg/Warray-parameter.c +++ b/gcc/testsuite/gcc.dg/Warray-parameter.c @@ -5,7 +5,7 @@ Also verify that the array/pointer argument form in a mismatched redeclaration doesn't override the form in the initial declaration. { dg-do compile } - { dg-options "-Wall -Warray-parameter -Wno-vla-paramater" } */ + { dg-options "-Wall -Warray-parameter -Wno-vla-parameter" } */ /* Redclarations with the same or equivalent array form should not be dianosed. T[0] is diagnosed by -Wpedantic for being invalid diff --git a/gcc/testsuite/gcc.dg/Wstring-compare.c b/gcc/testsuite/gcc.dg/Wstring-compare.c index d1534bf..239bbfe 100644 --- a/gcc/testsuite/gcc.dg/Wstring-compare.c +++ b/gcc/testsuite/gcc.dg/Wstring-compare.c @@ -21,7 +21,7 @@ extern char b4[4]; void strcmp_array_lit (void) { if (strcmp (a4, "1234")) // { dg-warning "'strcmp' of a string of length 4 and an array of size 4 evaluates to nonzero" } - // { dg-bogus "in this expreession" "unwanted note" { target *-*-* } .-1 } + // { dg-bogus "in this expression" "unwanted note" { target *-*-* } .-1 } sink (0, a4); int cmp; @@ -44,7 +44,7 @@ void strcmp_array_pstr (void) { if (strcmp (a4, s4)) // { dg-warning "'strcmp' of a string of length 4 and an array of size 4 evaluates to nonzero" } - // { dg-bogus "in this expreession" "unwanted note" { target *-*-* } .-1 } + // { dg-bogus "in this expression" "unwanted note" { target *-*-* } .-1 } sink (1, a4); else sink (0, a4); @@ -86,7 +86,7 @@ void strcmp_array_copy (void) { strcpy (s, "1234"); if (strcmp (a4, s)) // { dg-warning "'strcmp' of a string of length 4 and an array of size 4 evaluates to nonzero" } - // { dg-bogus "in this expreession" "unwanted note" { target *-*-* } .-1 } + // { dg-bogus "in this expression" "unwanted note" { target *-*-* } .-1 } sink (1, a4); else sink (0, a4); @@ -131,7 +131,7 @@ void strcmp_member_array_lit (const struct S *p) void strncmp_array_lit (void) { if (strncmp (a4, "12345", 5)) // { dg-warning "'strncmp' of a string of length 5, an array of size 4 and bound of 5 evaluates to nonzero" } - // { dg-bogus "in this expreession" "unwanted note" { target *-*-* } .-1 } + // { dg-bogus "in this expression" "unwanted note" { target *-*-* } .-1 } sink (0, a4); int cmp; @@ -161,7 +161,7 @@ void strncmp_strarray_copy (void) char b[6]; strcpy (b, "12345"); if (strncmp (a, b, 5)) // { dg-warning "'strncmp' of strings of length 4 and 5 and bound of 5 evaluates to nonzero" } - // { dg-bogus "in this expreession" "unwanted note" { target *-*-* } .-1 } + // { dg-bogus "in this expression" "unwanted note" { target *-*-* } .-1 } sink (0, a, b); } diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-11.c b/gcc/testsuite/gcc.dg/format/gcc_diag-11.c index 262e7e5..80d24b6 100644 --- a/gcc/testsuite/gcc.dg/format/gcc_diag-11.c +++ b/gcc/testsuite/gcc.dg/format/gcc_diag-11.c @@ -375,7 +375,7 @@ void test_cdiag_identifier (tree t, gimple *gc) cdiag ("ident z_ with trailing underscore"); /* { dg-warning "unquoted identifier or keyword 'z_'" } */ cdiag ("v_ variable"); /* { dg-warning "unquoted identifier or keyword 'v_'" } */ cdiag ("call foo_bar"); /* { dg-warning "unquoted identifier or keyword 'foo_bar'" } */ - cdiag ("unqoted x_y ident"); /* { dg-warning "unquoted identifier or keyword 'x_y'" } */ + cdiag ("unquoted x_y ident"); /* { dg-warning "unquoted identifier or keyword 'x_y'" } */ cdiag ("size_t type"); /* { dg-warning "unquoted identifier or keyword 'size_t'" } */ cdiag ("bigger than INT_MAX");/* { dg-warning "unquoted identifier or keyword 'INT_MAX'" } */ diff --git a/gcc/testsuite/gfortran.dg/array_constructor_3.f90 b/gcc/testsuite/gfortran.dg/array_constructor_3.f90 index 7ddd1f4..37d40a4 100644 --- a/gcc/testsuite/gfortran.dg/array_constructor_3.f90 +++ b/gcc/testsuite/gfortran.dg/array_constructor_3.f90 @@ -1,5 +1,5 @@ ! { dg-do compile } ! Check that empty array constructors are rejected program hum - print *, (//) { dg-error "Empty array constructor" } + print *, (//) ! { dg-error "Empty array constructor" } end program hum diff --git a/gcc/testsuite/gfortran.dg/matmul_bounds_9.f90 b/gcc/testsuite/gfortran.dg/matmul_bounds_9.f90 index 5552e40..786e3e7 100644 --- a/gcc/testsuite/gfortran.dg/matmul_bounds_9.f90 +++ b/gcc/testsuite/gfortran.dg/matmul_bounds_9.f90 @@ -1,6 +1,6 @@ ! { dg-do run } ! { dg-options "-fbounds-check -ffrontend-optimize" } -! { dg-shouldfail "Fortran runtime error: Incorrect extent in argument B in MATMUL intrnisic for dimension 2: is 1, should be 2" } +! { dg-shouldfail "Fortran runtime error: Incorrect extent in argument B in MATMUL intrinsic for dimension 2: is 1, should be 2" } module x implicit none contains diff --git a/gcc/testsuite/gfortran.dg/pr78033.f90 b/gcc/testsuite/gfortran.dg/pr78033.f90 index ce794b3..9593521 100644 --- a/gcc/testsuite/gfortran.dg/pr78033.f90 +++ b/gcc/testsuite/gfortran.dg/pr78033.f90 @@ -14,7 +14,7 @@ subroutine f(n, x, y) y = [real(x), aimag(x)] y = [real(x(1:n)), aimag(x(1:n))] y = [real(knd) :: 1] - y = [real(kind=42) :: 1] { dg-error "Invalid type-spec" } + y = [real(kind=42) :: 1] ! { dg-error "Invalid type-spec" } y = [real(kind=knd) :: 1] y = [real(kind=knd, a=1.)] y = [real(a=1.)] diff --git a/gcc/testsuite/gfortran.dg/pr96325.f90 b/gcc/testsuite/gfortran.dg/pr96325.f90 index 62f4cfb..b6a86e8 100644 --- a/gcc/testsuite/gfortran.dg/pr96325.f90 +++ b/gcc/testsuite/gfortran.dg/pr96325.f90 @@ -15,7 +15,7 @@ type(t2) :: t integer :: a - a = t%r1%foo(1) { dg-error "is not an inquiry reference" } + a = t%r1%foo(1) ! { dg-error "is not an inquiry reference" } if (a == 42) stop end -- 2.7.4