aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-06-27 12:25:21 +0200
committerMartin Liska <marxin@gcc.gnu.org>2019-06-27 10:25:21 +0000
commit45309d286c80ecad8b7a4efba0e9aba35d847af6 (patch)
tree528d9923fdd0aac57cb59c10dd7c7b84be1713b8 /gcc/cp
parent57e088f5ed204ebc3cc43a432320ef85e69d4657 (diff)
downloadgcc-45309d286c80ecad8b7a4efba0e9aba35d847af6.zip
gcc-45309d286c80ecad8b7a4efba0e9aba35d847af6.tar.gz
gcc-45309d286c80ecad8b7a4efba0e9aba35d847af6.tar.bz2
Remove quite obvious dead assignments.
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 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-27 Martin Liska <mliska@suse.cz> * libgcov-driver-system.c (gcov_exit_open_gcda_file): Remove obviously dead assignments. * libgcov-util.c: Likewise. From-SVN: r272744
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog12
-rw-r--r--gcc/cp/class.c4
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/cp/parser.c2
-rw-r--r--gcc/cp/pt.c4
-rw-r--r--gcc/cp/rtti.c4
-rw-r--r--gcc/cp/typeck.c2
7 files changed, 17 insertions, 13 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9d89ccb..8314b97 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 a679e65..18e7db0 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 96cd484..bb9d19a 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 4d46cb3..0a3edb3 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 00e4364..cc306fc 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 ef78564..eb1b062 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 550064c..dd76ebe 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))