diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0561f1091f28108af66148dba682639a9048c1d8..a366de95455515a693b166865e9fb6f95e51c940 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,42 @@ +2019-06-27 Martin Liska <mliska@suse.cz> + + * asan.c (asan_emit_allocas_unpoison): Remove obviously + dead assignments. + * bt-load.c (move_btr_def): Likewise. + * builtins.c (expand_builtin_apply_args_1): Likewise. + (expand_builtin_apply): Likewise. + * cfgexpand.c (expand_asm_stmt): Likewise. + (construct_init_block): Likewise. + * cfghooks.c (verify_flow_info): Likewise. + * cfgloopmanip.c (remove_path): Likewise. + * cfgrtl.c (rtl_verify_bb_layout): Likewise. + * cgraph.c (cgraph_node::set_pure_flag): Likewise. + * combine.c (simplify_if_then_else): Likewise. + * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise. + (choose_basereg): Likewise. + (ix86_expand_prologue): Likewise. + (ix86_preferred_output_reload_class): Likewise. + * cselib.c (cselib_record_sets): Likewise. + * df-scan.c (df_scan_alloc): Likewise. + * dojump.c (do_jump_by_parts_greater_rtx): Likewise. + * early-remat.c (early_remat::record_equiv_candidates): Likewise. + * emit-rtl.c (try_split): Likewise. + * graphite-scop-detection.c (assign_parameter_index_in_region): Likewise. + * ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Likewise. + * ira-color.c (setup_profitable_hard_regs): Likewise. + * ira.c (rtx_moveable_p): Likewise. + * lra-eliminations.c (eliminate_regs_in_insn): Likewise. + * read-rtl.c (read_subst_mapping): Likewise. + * regrename.c (scan_rtx): Likewise. + * reorg.c (fill_slots_from_thread): Likewise. + * tree-inline.c (tree_function_versioning): Likewise. + * tree-ssa-reassoc.c (optimize_ops_list): Likewise. + * tree-ssa-sink.c (statement_sink_location): Likewise. + * tree-ssa-threadedge.c (thread_across_edge): Likewise. + * tree-vect-loop.c (vect_get_loop_niters): Likewise. + (vect_create_epilog_for_reduction): Likewise. + * tree.c (build_nonstandard_integer_type): Likewise. + 2019-06-27 Richard Biener <rguenther@suse.de> * tree-ssa-sccvn.c (vn_reference_lookup_3): Encode valueized RHS. diff --git a/gcc/asan.c b/gcc/asan.c index 3b800b26b6991c5a79116a7de838751b04db496a..605d04f87f7b9997129aa9122b0ad53d1aa27668 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -1713,8 +1713,8 @@ asan_emit_allocas_unpoison (rtx top, rtx bot, rtx_insn *before) rtx ret = init_one_libfunc ("__asan_allocas_unpoison"); top = convert_memory_address (ptr_mode, top); bot = convert_memory_address (ptr_mode, bot); - ret = emit_library_call_value (ret, NULL_RTX, LCT_NORMAL, ptr_mode, - top, ptr_mode, bot, ptr_mode); + emit_library_call (ret, LCT_NORMAL, ptr_mode, + top, ptr_mode, bot, ptr_mode); do_pending_stack_adjust (); rtx_insn *insns = get_insns (); diff --git a/gcc/bt-load.c b/gcc/bt-load.c index a7d9d53954e0304ad19c69c24da0d77fb3bf5603..f68879ca49a848ee0adb431129e21ed1f1d811bd 100644 --- a/gcc/bt-load.c +++ b/gcc/bt-load.c @@ -1169,7 +1169,6 @@ move_btr_def (basic_block new_def_bb, int btr, btr_def *def, bitmap live_range, if (def->other_btr_uses_before_def) { - insp = BB_END (b); for (insp = BB_END (b); ! INSN_P (insp); insp = PREV_INSN (insp)) gcc_assert (insp != BB_HEAD (b)); diff --git a/gcc/builtins.c b/gcc/builtins.c index 4ecfd49d03cb34600e7ac7afb0bf0511ff7ec1fa..c53afe8b033c4bddd9ce6e536e862bb3987b5d1c 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -1638,11 +1638,8 @@ expand_builtin_apply_args_1 (void) /* Save the structure value address unless this is passed as an "invisible" first argument. */ if (struct_incoming_value) - { - emit_move_insn (adjust_address (registers, Pmode, size), - copy_to_reg (struct_incoming_value)); - size += GET_MODE_SIZE (Pmode); - } + emit_move_insn (adjust_address (registers, Pmode, size), + copy_to_reg (struct_incoming_value)); /* Return the address of the block. */ return copy_addr_to_reg (XEXP (registers, 0)); @@ -1791,7 +1788,6 @@ expand_builtin_apply (rtx function, rtx arguments, rtx argsize) emit_move_insn (struct_value, value); if (REG_P (struct_value)) use_reg (&call_fusage, struct_value); - size += GET_MODE_SIZE (Pmode); } /* All arguments and registers used for the call are set up by now! */ diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index cc8eed6181a622c1228c794a2cfc779b45a2ced4..4e1ee7096e0c6cde53caf97e14e389f66d28d287 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -3044,7 +3044,6 @@ expand_asm_stmt (gasm *stmt) } } } - unsigned nclobbers = clobber_rvec.length(); /* First pass over inputs and outputs checks validity and sets mark_addressable if needed. */ @@ -3317,7 +3316,7 @@ expand_asm_stmt (gasm *stmt) gcc_assert (constraints.length() == noutputs + ninputs); /* But it certainly can adjust the clobbers. */ - nclobbers = clobber_rvec.length(); + unsigned nclobbers = clobber_rvec.length (); /* Third pass checks for easy conflicts. */ /* ??? Why are we doing this on trees instead of rtx. */ @@ -5997,11 +5996,11 @@ construct_init_block (void) { first_block = e->dest; redirect_edge_succ (e, init_block); - e = make_single_succ_edge (init_block, first_block, flags); + make_single_succ_edge (init_block, first_block, flags); } else - e = make_single_succ_edge (init_block, EXIT_BLOCK_PTR_FOR_FN (cfun), - EDGE_FALLTHRU); + make_single_succ_edge (init_block, EXIT_BLOCK_PTR_FOR_FN (cfun), + EDGE_FALLTHRU); update_bb_for_insn (init_block); return init_block; diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c index a25441b26401d762a4755f260ee0529b67813463..76183ecf6ae3cfe08062b4e17bdb26bae20f8081 100644 --- a/gcc/cfghooks.c +++ b/gcc/cfghooks.c @@ -259,8 +259,6 @@ verify_flow_info (void) err = 1; } - last_bb_seen = ENTRY_BLOCK_PTR_FOR_FN (cfun); - /* Clean up. */ free (last_visited); free (edge_checksum); diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index 50250ec4d7c6f1f5ab5b77ad06be2ec6e07c5f25..b5f6a47fb80553a2b083df636370d6d159381d42 100644 --- a/gcc/cfgloopmanip.c +++ b/gcc/cfgloopmanip.c @@ -364,7 +364,6 @@ remove_path (edge e, bool *irred_invalidated, for (i = 0; i < nrem; i++) { - bb = rem_bbs[i]; FOR_EACH_EDGE (ae, ei, rem_bbs[i]->succs) if (ae->dest != EXIT_BLOCK_PTR_FOR_FN (cfun) && !bitmap_bit_p (seen, ae->dest->index)) diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index a1ca5992c414e988c4d37a2cdd810b8c724b6967..a6e4c1bf57262b5973bacb925599893b7e89481b 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -2968,7 +2968,6 @@ rtl_verify_bb_layout (void) basic_block last_bb_seen = ENTRY_BLOCK_PTR_FOR_FN (cfun), curr_bb = NULL; num_bb_notes = 0; - last_bb_seen = ENTRY_BLOCK_PTR_FOR_FN (cfun); for (x = rtx_first; x; x = NEXT_INSN (x)) { diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 28019aba4347c7afe0ebc9399d341acb2ab245b8..d161db96f14de9c9b64598c711cef4e9aaad60c1 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -2714,8 +2714,6 @@ bool cgraph_node::set_pure_flag (bool pure, bool looping) { struct set_pure_flag_info info = {pure, looping, false}; - if (!pure) - looping = false; call_for_symbol_thunks_and_aliases (set_pure_flag_1, &info, !pure, true); return info.changed; } diff --git a/gcc/combine.c b/gcc/combine.c index ce7aeecb5c2394d69544dc4fb76dd94aa9fd71f9..1be922df614237dfe4050a2082b697aa2608b0cf 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -6592,7 +6592,6 @@ simplify_if_then_else (rtx x) || reg_mentioned_p (true_rtx, false_rtx) || rtx_equal_p (false_rtx, XEXP (cond, 0)))) { - true_code = reversed_comparison_code (cond, NULL); SUBST (XEXP (x, 0), reversed_comparison (cond, GET_MODE (cond))); SUBST (XEXP (x, 1), false_rtx); SUBST (XEXP (x, 2), true_rtx); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7d6280b6da1c788e6ffece1bce93a2b81a3107b7..49f49c5f8d0883da28de1f8b93ab348a21d7a668 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4136,7 +4136,6 @@ ix86_setup_incoming_vararg_bounds (cumulative_args_t cum_v, CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v); CUMULATIVE_ARGS next_cum; tree fntype; - int max; gcc_assert (!no_rtl); @@ -4152,10 +4151,6 @@ ix86_setup_incoming_vararg_bounds (cumulative_args_t cum_v, if (stdarg_p (fntype)) ix86_function_arg_advance (pack_cumulative_args (&next_cum), mode, type, true); - - max = cum->regno + cfun->va_list_gpr_size / UNITS_PER_WORD; - if (max > X86_64_REGPARM_MAX) - max = X86_64_REGPARM_MAX; } @@ -6291,7 +6286,6 @@ choose_basereg (HOST_WIDE_INT cfa_offset, rtx &base_reg, { base_reg = hard_frame_pointer_rtx; base_offset = toffset; - len = tlen; } } } @@ -8003,8 +7997,7 @@ ix86_expand_prologue (void) GEN_INT (-allocate), -1, false); /* Align the stack. */ - insn = emit_insn (gen_and2_insn (stack_pointer_rtx, - GEN_INT (-align_bytes))); + emit_insn (gen_and2_insn (stack_pointer_rtx, GEN_INT (-align_bytes))); m->fs.sp_offset = ROUND_UP (m->fs.sp_offset, align_bytes); m->fs.sp_realigned_offset = m->fs.sp_offset - frame.stack_realign_allocate; @@ -18176,12 +18169,10 @@ ix86_preferred_reload_class (rtx x, reg_class_t regclass) static reg_class_t ix86_preferred_output_reload_class (rtx x, reg_class_t regclass) { - machine_mode mode = GET_MODE (x); - /* Restrict the output reload class to the register bank that we are doing math on. If we would like not to return a subset of CLASS, reject this alternative: if reload cannot do this, it will still use its choice. */ - mode = GET_MODE (x); + machine_mode mode = GET_MODE (x); if (SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH) return MAYBE_SSE_CLASS_P (regclass) ? ALL_SSE_REGS : NO_REGS; diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9d89ccb4ab919df660de0b8db5d910ed6f3cacb6..8314b9762f66c040ace4852c266a1917d661d9f8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,15 @@ +2019-06-27 Martin Liska <mliska@suse.cz> + + * class.c (adjust_clone_args): Remove obviously + dead assignments. + (dump_class_hierarchy_r): Likewise. + * decl.c (check_initializer): Likewise. + * parser.c (cp_parser_lambda_expression): Likewise. + * pt.c (unify_bound_ttp_args): Likewise. + (convert_template_argument): Likewise. + * rtti.c (build_headof): Likewise. + * typeck.c (convert_for_initialization): Likewise. + 2019-06-25 Jason Merrill <jason@redhat.com> PR c++/70462 - unnecessary base ctor variant with final. diff --git a/gcc/cp/class.c b/gcc/cp/class.c index a679e651bbe3a49f44d8625b45995cd6ba27ad80..18e7db08c8df5541f5872fba6065d6cbd5f771fa 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -4718,8 +4718,6 @@ adjust_clone_args (tree decl) tree orig_decl_parms = TYPE_ARG_TYPES (TREE_TYPE (decl)); tree decl_parms, clone_parms; - clone_parms = orig_clone_parms; - /* Skip the 'this' parameter. */ orig_clone_parms = TREE_CHAIN (orig_clone_parms); orig_decl_parms = TREE_CHAIN (orig_decl_parms); @@ -8549,7 +8547,6 @@ dump_class_hierarchy_r (FILE *stream, tree base_binfo; int i; - indented = maybe_indent_hierarchy (stream, indent, 0); fprintf (stream, "%s (0x" HOST_WIDE_INT_PRINT_HEX ") ", type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER), (HOST_WIDE_INT) (uintptr_t) binfo); @@ -8570,7 +8567,6 @@ dump_class_hierarchy_r (FILE *stream, fprintf (stream, " virtual"); fprintf (stream, "\n"); - indented = 0; if (BINFO_PRIMARY_P (binfo)) { indented = maybe_indent_hierarchy (stream, indent + 3, indented); diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 96cd4843a1c2b483477f76bfdd449c20b7061744..bb9d19a81725a165ba59220a48f45c8e5649d91b 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6401,7 +6401,7 @@ build_aggr_init_full_exprs (tree decl, tree init, int flags) static tree check_initializer (tree decl, tree init, int flags, vec<tree, va_gc> **cleanups) { - tree type = TREE_TYPE (decl); + tree type; tree init_code = NULL; tree core_type; diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 4d46cb3eac73d9a2177872f5c56edf43fe2a0997..0a3edb3229d051fbd4bfc72f9090e108cc1f9e2a 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -10478,7 +10478,7 @@ cp_parser_lambda_expression (cp_parser* parser) if (ok) maybe_add_lambda_conv_op (type); - type = finish_struct (type, /*attributes=*/NULL_TREE); + finish_struct (type, /*attributes=*/NULL_TREE); parser->num_template_parameter_lists = saved_num_template_parameter_lists; parser->in_statement = in_statement; diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 00e436429cef9c869fd409f56dc219972d302289..cc306fcaa89ae8cf85322eac21832dbbeeed45c5 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -7457,8 +7457,7 @@ unify_bound_ttp_args (tree tparms, tree targs, tree parm, tree& arg, { /* In keeping with P0522R0, adjust P's template arguments to apply to A's template; then flatten it again. */ - tree nparmvec = parmvec; - nparmvec = coerce_ttp_args_for_tta (arg, parmvec, tf_none); + tree nparmvec = coerce_ttp_args_for_tta (arg, parmvec, tf_none); nparmvec = expand_template_argument_pack (nparmvec); if (unify (tparms, targs, nparmvec, argvec, @@ -7885,7 +7884,6 @@ convert_template_argument (tree parm, invalid, but static members are OK. In any case, grab the underlying fields/functions and issue an error later if required. */ - orig_arg = TREE_VALUE (arg); TREE_TYPE (arg) = unknown_type_node; } diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index ef78564e88f1aec109d1974ed26ed35a95f8fad2..eb1b062a49b04df23b30f4536bd81260b4510a66 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -209,8 +209,8 @@ build_headof (tree exp) offset = build_vtbl_ref (cp_build_fold_indirect_ref (exp), index); - type = cp_build_qualified_type (ptr_type_node, - cp_type_quals (TREE_TYPE (exp))); + cp_build_qualified_type (ptr_type_node, + cp_type_quals (TREE_TYPE (exp))); return fold_build_pointer_plus (exp, offset); } diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 550064cf9fd6b4eb15ee9f3fe03c1ae3b597b766..dd76ebe3dbfc546dc2a09825b2f8d48097cd7a50 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -9189,8 +9189,6 @@ convert_for_initialization (tree exp, tree type, tree rhs, int flags, if (exp == error_mark_node) return error_mark_node; - rhstype = non_reference (rhstype); - type = complete_type (type); if (DIRECT_INIT_EXPR_P (type, rhs)) diff --git a/gcc/cselib.c b/gcc/cselib.c index a1cbdec97181a88d248530489a500a717d455ea6..7b0545e779cad61b6b6b43b524dd7d9f3125eb9d 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -2518,13 +2518,12 @@ cselib_record_sets (rtx_insn *insn) int n_sets = 0; int i; struct cselib_set sets[MAX_SETS]; - rtx body = PATTERN (insn); rtx cond = 0; int n_sets_before_autoinc; int n_strict_low_parts = 0; struct cselib_record_autoinc_data data; - body = PATTERN (insn); + rtx body = PATTERN (insn); if (GET_CODE (body) == COND_EXEC) { cond = COND_EXEC_TEST (body); diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 2eea149e4585593d76cc49c9525761313fab6cdb..81e221ee38fbcc4fa6034b18006df59182074454 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -229,7 +229,6 @@ void df_scan_alloc (bitmap all_blocks ATTRIBUTE_UNUSED) { struct df_scan_problem_data *problem_data; - unsigned int insn_num = get_max_uid () + 1; basic_block bb; /* Given the number of pools, this is really faster than tearing @@ -257,7 +256,6 @@ df_scan_alloc (bitmap all_blocks ATTRIBUTE_UNUSED) bitmap_obstack_initialize (&problem_data->reg_bitmaps); bitmap_obstack_initialize (&problem_data->insn_bitmaps); - insn_num += insn_num / 4; df_grow_reg_info (); df_grow_insn_info (); diff --git a/gcc/dojump.c b/gcc/dojump.c index 8626689463e1f4a9c38ea8b60189e7b7710e92b2..bac37a357a9fec50aa07feeee8bf8b1bccdbf95a 100644 --- a/gcc/dojump.c +++ b/gcc/dojump.c @@ -668,8 +668,6 @@ do_jump_by_parts_greater_rtx (scalar_int_mode mode, int unsignedp, rtx op0, code = LE; if_true_label = if_false_label; if_false_label = drop_through_label; - drop_through_if_true = false; - drop_through_if_false = true; prob = prob.invert (); } diff --git a/gcc/early-remat.c b/gcc/early-remat.c index 122891c1edb5ac775be8a98646c813cd1aeb5b18..0396f16babfd140dd4a79be70e1b4221110834de 100644 --- a/gcc/early-remat.c +++ b/gcc/early-remat.c @@ -1123,7 +1123,6 @@ early_remat::record_equiv_candidates (unsigned int cand1_index, ec->representative = cand1_index; cand1->equiv_class = ec; } - cand1 = &m_candidates[ec->representative]; cand2->equiv_class = ec; bitmap_set_bit (ec->members, cand2_index); if (cand2_index > ec->representative) diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 58286f797c4d46dceb7dd01535b278f924f3fb73..e265fa68bce43959f4b020081bd0364f70db1366 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -4017,7 +4017,7 @@ try_split (rtx pat, rtx_insn *trial, int last) before = PREV_INSN (trial); after = NEXT_INSN (trial); - tem = emit_insn_after_setloc (seq, trial, INSN_LOCATION (trial)); + emit_insn_after_setloc (seq, trial, INSN_LOCATION (trial)); delete_insn (trial); diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 4534d43721f466b497b18f7c1038bfc6803a2df5..489d0b93b42f02a02be7051896fb390914b8c6ac 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -1105,14 +1105,12 @@ assign_parameter_index_in_region (tree name, sese_info_p region) gcc_assert (TREE_CODE (name) == SSA_NAME && INTEGRAL_TYPE_P (TREE_TYPE (name)) && ! defined_in_sese_p (name, region->region)); - int i; tree p; FOR_EACH_VEC_ELT (region->params, i, p) if (p == name) return; - i = region->params.length (); region->params.safe_push (name); } diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 69c00a9c5a58e59f1d6534603d1c0f8f7e70ec9e..b6e781f74509137547f39bb9e89f3efbe180992a 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -4445,7 +4445,6 @@ static bool cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs, struct cgraph_node *node) { - struct ipa_node_params *orig_caller_info = IPA_NODE_REF (cs->caller); struct ipa_node_params *orig_node_info; struct ipa_agg_replacement_value *aggval; int i, ec, count; @@ -4462,8 +4461,6 @@ cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs, return false; orig_node_info = IPA_NODE_REF (IPA_NODE_REF (node)->ipcp_orig_node); - if (orig_caller_info->ipcp_orig_node) - orig_caller_info = IPA_NODE_REF (orig_caller_info->ipcp_orig_node); for (i = 0; i < count; i++) { diff --git a/gcc/ira-color.c b/gcc/ira-color.c index aa91b56c81f210a90b0ece0fd15aa928ec6dfb44..8a90ae1b4e6c10c2efa3239a48cd7b4edb7e5950 100644 --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -1108,7 +1108,6 @@ setup_profitable_hard_regs (void) || empty_profitable_hard_regs (a)) continue; data = ALLOCNO_COLOR_DATA (a); - mode = ALLOCNO_MODE (a); if ((costs = ALLOCNO_UPDATED_HARD_REG_COSTS (a)) != NULL || (costs = ALLOCNO_HARD_REG_COSTS (a)) != NULL) { diff --git a/gcc/ira.c b/gcc/ira.c index 725636d8dc5429f362fb666a2a84acae8766a314..d4ea68f17c078c15ff8fe09e5276a5570497ba6c 100644 --- a/gcc/ira.c +++ b/gcc/ira.c @@ -4414,10 +4414,9 @@ rtx_moveable_p (rtx *loc, enum op_type type) { const char *fmt; rtx x = *loc; - enum rtx_code code = GET_CODE (x); int i, j; - code = GET_CODE (x); + enum rtx_code code = GET_CODE (x); switch (code) { case CONST: diff --git a/gcc/lra-eliminations.c b/gcc/lra-eliminations.c index fa0ebcd8ed9b7bdff460957ecba5b50250c796b8..f344e127cfeeb9490ea502f05e57a8926be38b00 100644 --- a/gcc/lra-eliminations.c +++ b/gcc/lra-eliminations.c @@ -1054,7 +1054,6 @@ eliminate_regs_in_insn (rtx_insn *insn, bool replace_p, bool first_p, single_set without having put new body into the insn and the re-recognition won't hurt in this rare case. */ id = lra_update_insn_recog_data (insn); - static_id = id->insn_static_data; } /* Spill pseudos which are assigned to hard registers in SET. Add diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c index f37708f6967fda0f8193b48c8177a685117569c4..6b1b811cbfeaba05bf7492fe91f06baac4578606 100644 --- a/gcc/read-rtl.c +++ b/gcc/read-rtl.c @@ -1295,7 +1295,7 @@ read_subst_mapping (htab_t subst_iters_table, htab_t subst_attrs_table, m = add_mapping (&substs, subst_iters_table, attr_operands[1]); end_ptr = &m->values; end_ptr = add_map_value (end_ptr, 1, ""); - end_ptr = add_map_value (end_ptr, 2, ""); + add_map_value (end_ptr, 2, ""); add_define_attr_for_define_subst (attr_operands[1], queue); } @@ -1303,7 +1303,7 @@ read_subst_mapping (htab_t subst_iters_table, htab_t subst_attrs_table, m = add_mapping (&substs, subst_attrs_table, attr_operands[0]); end_ptr = &m->values; end_ptr = add_map_value (end_ptr, 1, attr_operands[2]); - end_ptr = add_map_value (end_ptr, 2, attr_operands[3]); + add_map_value (end_ptr, 2, attr_operands[3]); } /* Check newly-created code iterator ITERATOR to see whether every code has the diff --git a/gcc/regrename.c b/gcc/regrename.c index 637b3cbe6d74bd0c09165529fc40985354563a9a..5259d565e582730d59108f9d8a7de718bc04d1ab 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -1426,10 +1426,9 @@ scan_rtx (rtx_insn *insn, rtx *loc, enum reg_class cl, enum scan_actions action, { const char *fmt; rtx x = *loc; - enum rtx_code code = GET_CODE (x); int i, j; - code = GET_CODE (x); + enum rtx_code code = GET_CODE (x); switch (code) { case CONST: diff --git a/gcc/reorg.c b/gcc/reorg.c index 81349382b81963f350b504920295a77d4b626150..bdfcf8851cd4eb48e08779afae686691f4b539e7 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -2708,14 +2708,13 @@ fill_slots_from_thread (rtx_jump_insn *insn, rtx condition, && GET_CODE (PATTERN (new_thread)) != ASM_INPUT && asm_noperands (PATTERN (new_thread)) < 0) { - rtx pat = PATTERN (new_thread); rtx dest; rtx src; /* We know "new_thread" is an insn due to NONJUMP_INSN_P (new_thread) above. */ trial = as_a <rtx_insn *> (new_thread); - pat = PATTERN (trial); + rtx pat = PATTERN (trial); if (!NONJUMP_INSN_P (trial) || GET_CODE (pat) != SET diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 48619fbc821f12199aaf4468472c93d8485c85f5..450af460dd04f45d92474540aa0c35d47d3c5bb7 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -6241,11 +6241,11 @@ tree_function_versioning (tree old_decl, tree new_decl, in the debug info that var (whole DECL_ORIGIN is the parm PARM_DECL) is optimized away, but could be looked up at the call site as value of D#X there. */ - tree var = vars, vexpr; + tree vexpr; gimple_stmt_iterator cgsi = gsi_after_labels (single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun))); gimple *def_temp; - var = vars; + tree var = vars; i = vec_safe_length (*debug_args); do { diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 6794fbde29e68781f73a434dba2d37db2f742c3d..9c1a9a651fe626952f75af88165a80c5192a1473 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -2039,9 +2039,6 @@ optimize_ops_list (enum tree_code opcode, i++; } - length = ops->length (); - oelast = ops->last (); - if (iterate) optimize_ops_list (opcode, ops); } diff --git a/gcc/tree-ssa-sink.c b/gcc/tree-ssa-sink.c index 67dc127e3fcea271b761821b90d620c1fe42b3ff..3bfad0f90ed3bcc860e45381682eca23df2b693d 100644 --- a/gcc/tree-ssa-sink.c +++ b/gcc/tree-ssa-sink.c @@ -433,7 +433,6 @@ statement_sink_location (gimple *stmt, basic_block frombb, if (gimple_code (use) != GIMPLE_PHI) { - sinkbb = gimple_bb (use); sinkbb = select_best_block (frombb, gimple_bb (use), stmt); if (sinkbb == frombb) diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c index 785227df690f3dddc1788b6fcdd53bd621410d15..39ea22f0554143d4e49810de15c8ef7919c3786d 100644 --- a/gcc/tree-ssa-threadedge.c +++ b/gcc/tree-ssa-threadedge.c @@ -1361,7 +1361,6 @@ thread_across_edge (gcond *dummy_cond, x = new jump_thread_edge (taken_edge, EDGE_COPY_SRC_JOINER_BLOCK); path->safe_push (x); - found = false; found = thread_around_empty_blocks (taken_edge, dummy_cond, avail_exprs_stack, diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index b37bf6f427dbc5994bf20e8740d2a41fe4947562..95c2d8203ac30621c26979c68220fed4c4892d29 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -730,9 +730,7 @@ vect_get_loop_niters (struct loop *loop, tree *assumptions, if (!exit) return cond; - niter = chrec_dont_know; may_be_zero = NULL_TREE; - niter_assumptions = boolean_true_node; if (!number_of_iterations_exit_assumptions (loop, exit, &niter_desc, NULL) || chrec_contains_undetermined (niter_desc.niter)) return cond; @@ -5113,7 +5111,6 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, if (off != 0) { tree new_idx_val = idx_val; - tree new_val = val; if (off != v_size - el_size) { new_idx_val = make_ssa_name (idx_eltype); @@ -5122,7 +5119,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, old_idx_val); gsi_insert_before (&exit_gsi, epilog_stmt, GSI_SAME_STMT); } - new_val = make_ssa_name (data_eltype); + tree new_val = make_ssa_name (data_eltype); epilog_stmt = gimple_build_assign (new_val, COND_EXPR, build2 (GT_EXPR, @@ -5303,14 +5300,13 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, in a vector mode of smaller size and first reduce upper/lower halves against each other. */ enum machine_mode mode1 = mode; - tree vectype1 = vectype; unsigned sz = tree_to_uhwi (TYPE_SIZE_UNIT (vectype)); unsigned sz1 = sz; if (!slp_reduc && (mode1 = targetm.vectorize.split_reduction (mode)) != mode) sz1 = GET_MODE_SIZE (mode1).to_constant (); - vectype1 = get_vectype_for_scalar_type_and_size (scalar_type, sz1); + tree vectype1 = get_vectype_for_scalar_type_and_size (scalar_type, sz1); reduce_with_shift = have_whole_vector_shift (mode1); if (!VECTOR_MODE_P (mode1)) reduce_with_shift = false; diff --git a/gcc/tree.c b/gcc/tree.c index c97facd7ce50a87b3fb9111f2f9fec85a3356e50..2032a936973ddbc96c041f4c72897d006d250d69 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -8212,8 +8212,6 @@ build_nonstandard_integer_type (unsigned HOST_WIDE_INT precision, else fixup_signed_type (itype); - ret = itype; - inchash::hash hstate; inchash::add_expr (TYPE_MAX_VALUE (itype), hstate); ret = type_hash_canon (hstate.end (), itype); diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index fa8230629f698a153fee6a8c4ff0482d4c9beeb8..5b560e803b1fb5b205a0695508a5543c78365788 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2019-06-27 Martin Liska <mliska@suse.cz> + + * libgcov-driver-system.c (gcov_exit_open_gcda_file): Remove obviously + dead assignments. + * libgcov-util.c: Likewise. + 2019-06-27 Martin Liska <mliska@suse.cz> * libgcov-util.c (gcov_profile_merge): Release allocated diff --git a/libgcc/libgcov-driver-system.c b/libgcc/libgcov-driver-system.c index 39dc62749d53056c4634cc49d8be39b3e40a411a..7d48a1f87d887a068dc90ef29027586998ce71ea 100644 --- a/libgcc/libgcov-driver-system.c +++ b/libgcc/libgcov-driver-system.c @@ -263,10 +263,8 @@ static int gcov_exit_open_gcda_file (struct gcov_info *gi_ptr, struct gcov_filename *gf) { - const char *fname = gi_ptr->filename; int append_slash = 0; - - fname = gi_ptr->filename; + const char *fname = gi_ptr->filename; /* Build relocated filename, stripping off leading directories from the initial filename if requested. */ diff --git a/libgcc/libgcov-util.c b/libgcc/libgcov-util.c index 404ece6faa6320d110346ce27989d03aa599d33b..94d4575c9298d704a39c994d3eec626103aecbd8 100644 --- a/libgcc/libgcov-util.c +++ b/libgcc/libgcov-util.c @@ -461,10 +461,9 @@ gcov_read_profile_dir (const char* dir_name, int recompute_summary ATTRIBUTE_UNU #ifdef HAVE_FTW_H ftw (".", ftw_read_file, 50); #endif - ret = chdir (pwd); + chdir (pwd); free (pwd); - return gcov_info_head;; }