diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-03-17 13:52:19 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-03-17 13:52:19 +0100 |
commit | 700d4cb08c88aec37c13e21e63dd61fd698baabc (patch) | |
tree | f02b4d3954543ef1a100a1f0e3b8757451885799 /gcc/fortran | |
parent | f582ca0fd70c5de7f1bcb532241d58f9e7f0090a (diff) | |
download | gcc-700d4cb08c88aec37c13e21e63dd61fd698baabc.zip gcc-700d4cb08c88aec37c13e21e63dd61fd698baabc.tar.gz gcc-700d4cb08c88aec37c13e21e63dd61fd698baabc.tar.bz2 |
Fix up duplicated duplicated words mostly in comments
In the r10-7197-gbae7b38cf8a21e068ad5c0bab089dedb78af3346 commit I've
noticed duplicated word in a message, which lead me to grep for those and
we have a tons of them.
I've used
grep -v 'long long\|optab optab\|template template\|double double' *.[chS] */*.[chS] *.def config/*/* 2>/dev/null | grep ' \([a-zA-Z]\+\) \1 '
Note, the command will not detect the doubled words at the start or end of
line or when one of the words is at the end of line and the next one at the
start of another one.
Some of it is fairly obvious, e.g. all the "the the" cases which is
something I've posted and committed patch for already e.g. in 2016,
other cases are often valid, e.g. "that that" seems to look mostly ok to me.
Some cases are quite hard to figure out, I've left out some of them from the
patch (e.g. "and and" in some cases isn't talking about bitwise/logical and
and so looks incorrect, but in other cases it is talking about those
operations).
In most cases the right solution seems to be to remove one of the duplicated
words, but not always.
I think most important are the ones with user visible messages (in the patch
3 of the first 4 hunks), the rest is just comments (and internal
documentation; for that see the doc/tm.texi changes).
2020-03-17 Jakub Jelinek <jakub@redhat.com>
* lra-spills.c (remove_pseudos): Fix up duplicated word issue in
a dump message.
* tree-sra.c (create_access_replacement): Fix up duplicated word issue
in a comment.
* read-rtl-function.c (find_param_by_name,
function_reader::parse_enum_value, function_reader::get_insn_by_uid):
Likewise.
* spellcheck.c (get_edit_distance_cutoff): Likewise.
* tree-data-ref.c (create_ifn_alias_checks): Likewise.
* tree.def (SWITCH_EXPR): Likewise.
* selftest.c (assert_str_contains): Likewise.
* ipa-param-manipulation.h (class ipa_param_body_adjustments):
Likewise.
* tree-ssa-math-opts.c (convert_expand_mult_copysign): Likewise.
* tree-ssa-loop-split.c (find_vdef_in_loop): Likewise.
* langhooks.h (struct lang_hooks_for_decls): Likewise.
* ipa-prop.h (struct ipa_param_descriptor): Likewise.
* tree-ssa-strlen.c (handle_builtin_string_cmp, handle_store):
Likewise.
* tree-ssa-dom.c (simplify_stmt_for_jump_threading): Likewise.
* tree-ssa-reassoc.c (reassociate_bb): Likewise.
* tree.c (component_ref_size): Likewise.
* hsa-common.c (hsa_init_compilation_unit_data): Likewise.
* gimple-ssa-sprintf.c (get_string_length, format_string,
format_directive): Likewise.
* omp-grid.c (grid_process_kernel_body_copy): Likewise.
* input.c (string_concat_db::get_string_concatenation,
test_lexer_string_locations_ucn4): Likewise.
* cfgexpand.c (pass_expand::execute): Likewise.
* gimple-ssa-warn-restrict.c (builtin_memref::offset_out_of_bounds,
maybe_diag_overlap): Likewise.
* rtl.c (RTX_CODE_HWINT_P_1): Likewise.
* shrink-wrap.c (spread_components): Likewise.
* tree-ssa-dse.c (initialize_ao_ref_for_dse, valid_ao_ref_for_dse):
Likewise.
* tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
Likewise.
* dwarf2out.c (dwarf2out_early_finish): Likewise.
* gimple-ssa-store-merging.c: Likewise.
* ira-costs.c (record_operand_costs): Likewise.
* tree-vect-loop.c (vectorizable_reduction): Likewise.
* target.def (dispatch): Likewise.
(validate_dims, gen_ccmp_first): Fix up duplicated word issue
in documentation text.
* doc/tm.texi: Regenerated.
* config/i386/x86-tune.def (X86_TUNE_PARTIAL_FLAG_REG_STALL): Fix up
duplicated word issue in a comment.
* config/i386/i386.c (ix86_test_loading_unspec): Likewise.
* config/i386/i386-features.c (remove_partial_avx_dependency):
Likewise.
* config/msp430/msp430.c (msp430_select_section): Likewise.
* config/gcn/gcn-run.c (load_image): Likewise.
* config/aarch64/aarch64-sve.md (sve_ld1r<mode>): Likewise.
* config/aarch64/aarch64.c (aarch64_gen_adjusted_ldpstp): Likewise.
* config/aarch64/falkor-tag-collision-avoidance.c
(single_dest_per_chain): Likewise.
* config/nvptx/nvptx.c (nvptx_record_fndecl): Likewise.
* config/fr30/fr30.c (fr30_arg_partial_bytes): Likewise.
* config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Likewise.
* config/rs6000/rs6000-p8swap.c (replace_swapped_load_constant):
Likewise.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Likewise.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Likewise.
* config/rs6000/rs6000-logue.c
(rs6000_emit_probe_stack_range_stack_clash): Likewise.
* config/nds32/nds32-md-auxiliary.c (nds32_split_ashiftdi3): Likewise.
Fix various other issues in the comment.
c-family/
* c-common.c (resolve_overloaded_builtin): Fix up duplicated word
issue in a diagnostic message.
cp/
* pt.c (tsubst): Fix up duplicated word issue in a diagnostic message.
(lookup_template_class_1, tsubst_expr): Fix up duplicated word issue
in a comment.
* parser.c (cp_parser_statement, cp_parser_linkage_specification,
cp_parser_placeholder_type_specifier,
cp_parser_constraint_requires_parens): Likewise.
* name-lookup.c (suggest_alternative_in_explicit_scope): Likewise.
fortran/
* array.c (gfc_check_iter_variable): Fix up duplicated word issue
in a comment.
* arith.c (gfc_arith_concat): Likewise.
* resolve.c (gfc_resolve_ref): Likewise.
* frontend-passes.c (matmul_lhs_realloc): Likewise.
* module.c (gfc_match_submodule, load_needed): Likewise.
* trans-expr.c (gfc_init_se): Likewise.
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/fortran/arith.c | 2 | ||||
-rw-r--r-- | gcc/fortran/array.c | 2 | ||||
-rw-r--r-- | gcc/fortran/frontend-passes.c | 2 | ||||
-rw-r--r-- | gcc/fortran/module.c | 4 | ||||
-rw-r--r-- | gcc/fortran/resolve.c | 2 | ||||
-rw-r--r-- | gcc/fortran/trans-expr.c | 2 |
7 files changed, 17 insertions, 7 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index dd0487d..99b13db 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,13 @@ +2020-03-17 Jakub Jelinek <jakub@redhat.com> + + * array.c (gfc_check_iter_variable): Fix up duplicated word issue + in a comment. + * arith.c (gfc_arith_concat): Likewise. + * resolve.c (gfc_resolve_ref): Likewise. + * frontend-passes.c (matmul_lhs_realloc): Likewise. + * module.c (gfc_match_submodule, load_needed): Likewise. + * trans-expr.c (gfc_init_se): Likewise. + 2020-03-15 Lewis Hyatt <lhyatt@gmail.com> * lang.opt: Avoid redundancy in the help text. diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c index 7325b28..7eb82d0 100644 --- a/gcc/fortran/arith.c +++ b/gcc/fortran/arith.c @@ -994,7 +994,7 @@ gfc_arith_concat (gfc_expr *op1, gfc_expr *op2, gfc_expr **resultp) gfc_expr *result; size_t len; - /* By cleverly playing around with constructors, is is possible + /* By cleverly playing around with constructors, it is possible to get mismaching types here. */ if (op1->ts.type != BT_CHARACTER || op2->ts.type != BT_CHARACTER || op1->ts.kind != op2->ts.kind) diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index 82b0eb3..57972bc 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -1475,7 +1475,7 @@ static cons_stack *base; static bool check_constructor (gfc_constructor_base, bool (*) (gfc_expr *)); /* Check an EXPR_VARIABLE expression in a constructor to make sure - that that variable is an iteration variables. */ + that that variable is an iteration variable. */ bool gfc_check_iter_variable (gfc_expr *expr) diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index bbe34d6..d5d71b5 100644 --- a/gcc/fortran/frontend-passes.c +++ b/gcc/fortran/frontend-passes.c @@ -3190,7 +3190,7 @@ matmul_lhs_realloc (gfc_expr *c, gfc_expr *a, gfc_expr *b, gcc_assert (ar && ar->type == AR_FULL); /* 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 for ALLOCATE. In the same + element ref so it has the right form for ALLOCATE. In the same switch statement, also generate the size comparison for the secod IF statement. */ diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index b6a4e87..73a3f20 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -743,7 +743,7 @@ cleanup: ordered pair whose first element is the ancestor module name and whose second element is the submodule name. 'Submodule_name' is used for the submodule filename and uses '@' as a separator, whilst - the name of the symbol for the module uses '.' as a a separator. + the name of the symbol for the module uses '.' as a separator. The reasons for these choices are: (i) To follow another leading brand in the submodule filenames; (ii) Since '.' is not particularly visible in the filenames; and @@ -5044,7 +5044,7 @@ load_needed (pointer_info *p) sym->attr.use_assoc = 1; /* Unliked derived types, a STRUCTURE may share names with other symbols. - We greedily converted the the symbol name to lowercase before we knew its + We greedily converted the symbol name to lowercase before we knew its type, so now we must fix it. */ if (sym->attr.flavor == FL_STRUCT) sym->name = gfc_dt_upper_string (sym->name); diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index b5813a7..23b5a2b 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -5318,7 +5318,7 @@ gfc_resolve_ref (gfc_expr *expr) { array_ref->u.ar.type = AR_ELEMENT; expr->rank = 0; - /* INQUIRY_LEN is not evaluated from the the rest of the expr + /* INQUIRY_LEN is not evaluated from the rest of the expr but directly from the string length. This means that setting the array indices to one does not matter but might trigger a runtime bounds error. Suppress the check. */ diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 9d0921e..fdca9cc 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1639,7 +1639,7 @@ gfc_copy_se_loopvars (gfc_se * dest, gfc_se * src) Care must be taken when multiple se are created with the same parent. The child se must be kept in sync. The easiest way is to delay creation - of a child se until after after the previous se has been translated. */ + of a child se until after the previous se has been translated. */ void gfc_init_se (gfc_se * se, gfc_se * parent) |