Commit Graph

153869 Commits

Author SHA1 Message Date
Marek Polacek
b2fa0a8bdf Bye bye, c_save_expr.
From-SVN: r248139
2017-05-17 08:11:15 +00:00
Senthil Kumar Selvaraj
8508a5b58f Fix bogus pr78886.c failure for avr
The test fails for avr because malloc has been declared to take
an unsigned long, whereas size_t for avr is only unsigned int.

Fixed by typedef'ing __SIZE_TYPE__ to size_t and using it in the
malloc function declaration.

gcc/testsuite/

2017-05-17  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

	* gcc.dg/tree-ssa/pr78886.c: Use __SIZE_TYPE__ instead of
	unsigned long.

From-SVN: r248138
2017-05-17 05:50:37 +00:00
Chenghua Xu
bc36d2b7ae reorgbug-1.c: Don't specify -O2.
2017-05-17  Chenghua Xu  <paul.hua.gm@gmail.com>

gcc/testsuite/
    * gcc.target/mips/reorgbug-1.c: Don't specify -O2.

From-SVN: r248137
2017-05-17 02:11:09 +00:00
GCC Administrator
3fbab4ea42 Daily bump.
From-SVN: r248135
2017-05-17 00:16:22 +00:00
James Greenhalgh
4fc5ebf129 re PR tree-optimization/80457 (vectorizable_condition does not update the vectorizer cost model)
[gcc]

2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
	    Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/80457
	* tree-vect-stmts.c (vect_model_simple_cost): Model the cost
	of all arguments to a statement as scalar_to_vec operations.
	(vectorizable_call): Adjust call to vect_model_simple_cost for
	new parameter.
	(vectorizable_conversion): Likewise.
	(vectorizable_assignment): Likewise.
	(vectorizable_shift): Likewise.
	(vectorizable_operation): Likewise.
	(vectorizable_comparison): Likewise.
	(vect_is_simple_cond): Record the def types for operands.
	(vectorizable_condition): Likewise, call vect_model_simple_cost.
	* tree-vectorizer.h (vect_model_simple_cost): Add new parameter
	for statement argument count.

[gcc/testsuite]

2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
	    Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR tree-optimization/80457
	* gcc.target/powerpc/pr78604.c: Verify that vectorized COND_EXPRs
	call vect_model_simple_cost.


Co-Authored-By: Bill Schmidt <wschmidt@linux.vnet.ibm.com>

From-SVN: r248130
2017-05-16 20:18:05 +00:00
Paul Thomas
bedee914ca re PR fortran/80554 ([f08] variable redefinition in submodule)
2017-05-16  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/80554
	* decl.c (build_sym): In a submodule allow overriding of host
	associated symbols from the ancestor module with a new
	declaration.

2017-05-16  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/80554
	* gfortran.dg/submodule_29.f08: New test.

From-SVN: r248129
2017-05-16 20:09:02 +00:00
David Malcolm
10791753c1 C++: fix-it hints suggesting accessors for private fields
gcc/cp/ChangeLog:
	* call.c (enforce_access): Add access_failure_info * param and use
	it to record access failures.
	* cp-tree.h (class access_failure_info): New class.
	(enforce_access): Add access_failure_info * param, defaulting to
	NULL.
	(lookup_member): Likewise.
	(locate_field_accessor): New function decl.
	(perform_or_defer_access_check): Add access_failure_info * param,
	defaulting to NULL.
	* search.c (lookup_member): Add access_failure_info * param and
	pass it on to call to perform_or_defer_access_check.
	(matches_code_and_type_p): New function.
	(field_access_p): New function.
	(direct_accessor_p): New function.
	(reference_accessor_p): New function.
	(field_accessor_p): New function.
	(struct locate_field_data): New struct.
	(dfs_locate_field_accessor_pre): New function.
	(locate_field_accessor): New function.
	* semantics.c (perform_or_defer_access_check): Add
	access_failure_info * param, and pass it on to call to
	enforce_access.
	* typeck.c (access_failure_info::record_access_failure): New method.
	(access_failure_info::maybe_suggest_accessor): New method.
	(finish_class_member_access_expr): Pass an access_failure_info
	instance to the lookup_member call, and call its
	maybe_suggest_accessor method afterwards.

gcc/testsuite/ChangeLog:
	* g++.dg/other/accessor-fixits-1.C: New test case.
	* g++.dg/other/accessor-fixits-2.C: New test case.
	* g++.dg/other/accessor-fixits-3.C: New test case.
	* g++.dg/other/accessor-fixits-4.C: New test case.

From-SVN: r248128
2017-05-16 19:52:26 +00:00
Carl Love
727577c230 rs6000-c: Add support for built-in functions vector unsigned long long vec_bperm (vector...
gcc/ChangeLog:

2017-05-16  Carl Love  <cel@us.ibm.com>

	* config/rs6000/rs6000-c: Add support for built-in functions
	vector unsigned long long vec_bperm (vector unsigned long long,
	                                     vector unsigned char)
	vector signed long long vec_mule (vector signed int,
	                                  vector signed int)
	vector unsigned long long vec_mule (vector unsigned int,
	                                    vector unsigned int)
	vector signed long long vec_mulo (vector signed int,
	                                  vector signed int)
	vector unsigned long long vec_mulo (vector unsigned int,
	                                    vector unsigned int)
	vector signed char vec_sldw (vector signed char,
	                             vector signed char,
	                             const int)
	vector unsigned char vec_sldw (vector unsigned char,
	                               vector unsigned char,
	                               const int)
	vector signed short vec_sldw (vector signed short,
	                              vector signed short,
	                              const int)
	vector unsigned short vec_sldw (vector unsigned short,
	                                vector unsigned short,
	                                const int)
	vector signed int vec_sldw (vector signed int,
	                            vector signed int,
	                            const int)
	vector unsigned int vec_sldw (vector unsigned int,
	                              vector unsigned int,
	                              const int)
	vector signed long long vec_sldw (vector signed long long,
	                                  vector signed long long,
	                                  const int)
	vector unsigned long long vec_sldw (vector unsigned long long,
	                                    vector unsigned long long,
	                                    const int)
	* config/rs6000/rs6000-c: Add support for built-in functions
	* config/rs6000/rs6000-builtin.def: Add definition for SLDW.
	* config/rs6000/altivec.h: Add defintion for vec_sldw.
	* doc/extend.texi: Update the built-in documentation for the
	new built-in functions.

gcc/testsuite/ChangeLog:

2017-05-16  Carl Love  <cel@us.ibm.com>

	* gcc.target/powerpc/builtins-3.c: New vec_mule, vec_mulo test cases.
	* gcc.target/powerpc/builtins-3-p8.c: Add tests for the new Power 8
	built-ins to the test suite file.  Note, support for mradds exists
	but no test case exists.
	* gcc.target/powerpc/builtins-3-p9.c: Add tests for the new Power 9
	built-ins to the test suite file.

From-SVN: r248125
2017-05-16 19:32:54 +00:00
Marek Polacek
6b6ae9eb9c re PR sanitizer/80536 (UBSAN: compile time segfault)
PR sanitizer/80536
	PR sanitizer/80386
	* cp-gimplify.c (cp_fold): Handle SAVE_EXPR.

	* tree.c (save_expr): Don't fold the expression.

	* c-c++-common/ubsan/pr80536.c: New test.
	* g++.dg/ubsan/pr80386.C: New test.

From-SVN: r248124
2017-05-16 19:25:04 +00:00
Nathan Sidwell
c0c248220b name-lookup.c (check_local_shadow): New, broke out of ...
* name-lookup.c (check_local_shadow): New, broke out of ...
	(pushdecl_maybe_friend_1): ... here.  Call it.

From-SVN: r248123
2017-05-16 19:20:25 +00:00
Uros Bizjak
b3d762eb74 * ChangeLog: Fix whitespace.
From-SVN: r248122
2017-05-16 21:11:11 +02:00
Nathan Sidwell
e09ae85766 cp-tree.h (OVL_NESTED_P, [...]): New.
* cp-tree.h (OVL_NESTED_P, OVL_LOOKUP_P): New.
	(ovl_first): Move inline definition to end of file.
	(ovl_make, lookup_add): Declare.
	(get_fns, get_first_fn): Make pure.
	* tree.c (ovl_cache): New.
	(ovl_make, lookup_add): New.
	* pt.c (do_class_deduction): Don't add candidates that will be
	elided.

From-SVN: r248121
2017-05-16 18:29:36 +00:00
Nathan Sidwell
a736411aca call.c (build_user_type_conversion_1): Use OVL_FIRST.
* call.c (build_user_type_conversion_1): Use OVL_FIRST.
	(print_error_for_call_faulure): Use OVL_NAME.
	(build_op_call_1): Use ovl_iterator.
	(add_candidates): Use OVL_FIRST & lkp_iterator.
	(build_op_delete_call): Use MAYBE_BASELINK_FUNCTIONS &
	lkp_iterator.
	* class.c (deduce_noexcept_on_destructors): Use ovl_iterator.
	(type_has_user_nondefault_constructor)
	in_class_defaulted_default_constructor,
	type_has_user_provided_constructor,
	type_has_user_provided_or_explicit_constructor,
	type_has_non_user_provided_default_constructor,
	vbase_has_user_provided_move_assign,
	type_has_move_constructor, type_has_move_assign,
	type_has_user_declared_move_constructor,
	type_has_user_declared_move_assign,
	type_build_ctor_call, type_build_dtor_call,
	type_requires_array_cookie, explain_non_literal_class): Likewise.
	(finish_struct): Use lkp_iterator.
	(resolve_address_of_overloaded_function): Use OVL_NAME,
	lkp_iterator.
	(note_name_declared_in_class): Use OVL_NAME.
	* cxx-pretty-print.c (pp_cxx_unqualified_id): Use OVL_FIRST.
	(pp_cxx_qualified_id, cxx_pretty_printer::id_expression)
	cxx_pretty_printer::expression): Likewise.
	* decl2.c (check_classfn): Use ovl_iterator.
	* pt.c (retrieve_specialization): Use ovl_iterator.
	* tree.c (cp_tree_equal): Use lkp_iterator.
	(type_has_nontrivial_copy_init): Use ovl_iterator.
((--This line, and those below, will be ignored--

M    cp/ChangeLog
M    cp/call.c
M    cp/class.c
M    cp/pt.c
M    cp/decl2.c
M    cp/tree.c
M    cp/cxx-pretty-print.c

From-SVN: r248120
2017-05-16 17:36:03 +00:00
Nathan Sidwell
c20c3b42c3 typeck2.c (cxx_incomplete_type_diagnostic): Revert change and check is_overloaded_fn.
* typeck2.c (cxx_incomplete_type_diagnostic): Revert change and
	check is_overloaded_fn.

From-SVN: r248119
2017-05-16 16:15:47 +00:00
Tamar Christina
678d7e191d armv8_2-fp16-neon-1.c (vceqz): Fix regex.
2017-05-16  Tamar Christina  <tamar.christina@arm.com>

	* gcc.target/arm/armv8_2-fp16-neon-1.c (vceqz): Fix regex.
	* gcc.target/arm/armv8_2-fp16-neon-2.c (vceqz): Fix regex.

From-SVN: r248117
2017-05-16 15:57:28 +00:00
Uros Bizjak
05cf39adb1 i386.i386.md (*movsi_internal): Split (?rm,*y) alternative to (?r,*Yn) and (?m,*y) alternatives...
* config/i386.i386.md (*movsi_internal): Split (?rm,*y) alternative
	to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
	and (?*y,m).  Update insn attributes.

From-SVN: r248114
2017-05-16 16:55:17 +02:00
Martin Liska
ef6cb4c716 Add default value for last argument of dump functions.
2017-05-16  Martin Liska  <mliska@suse.cz>

	* parser.c (cp_lexer_print_token): Add default value for flags
	argument of print_gimple_stmt, print_gimple_expr,
	print_generic_stmt and print_generic_expr.
2017-05-16  Martin Liska  <mliska@suse.cz>

	* cgraph.c (cgraph_edge::resolve_speculation): Add default value for flags
	argument of print_gimple_stmt, print_gimple_expr,
	print_generic_stmt and print_generic_expr.
	* cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
	* coretypes.h: Likewise.
	* except.c (dump_eh_tree): Likewise.
	* gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
	* gimple-pretty-print.h: Likewise.
	* gimple-ssa-backprop.c (dump_usage_prefix): Likewise.
	(backprop::push_to_worklist): Likewise.
	(backprop::pop_from_worklist): Likewise.
	(backprop::process_use): Likewise.
	(backprop::intersect_uses): Likewise.
	(note_replacement): Likewise.
	* gimple-ssa-store-merging.c (pass_store_merging::terminate_all_aliasing_chains): Likewise.
	(imm_store_chain_info::coalesce_immediate_stores): Likewise.
	(pass_store_merging::execute): Likewise.
	* gimple-ssa-strength-reduction.c (dump_candidate): Likewise.
	(ssa_base_cand_dump_callback): Likewise.
	(dump_incr_vec): Likewise.
	(replace_refs): Likewise.
	(replace_mult_candidate): Likewise.
	(create_add_on_incoming_edge): Likewise.
	(create_phi_basis): Likewise.
	(insert_initializers): Likewise.
	(all_phi_incrs_profitable): Likewise.
	(introduce_cast_before_cand): Likewise.
	(replace_one_candidate): Likewise.
	* gimplify.c (gimplify_expr): Likewise.
	* graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise.
	(set_rename): Likewise.
	(rename_uses): Likewise.
	(copy_loop_phi_nodes): Likewise.
	(add_close_phis_to_merge_points): Likewise.
	(copy_loop_close_phi_args): Likewise.
	(copy_cond_phi_args): Likewise.
	(graphite_copy_stmts_from_block): Likewise.
	(translate_pending_phi_nodes): Likewise.
	* graphite-poly.c (print_pdr): Likewise.
	(dump_gbb_cases): Likewise.
	(dump_gbb_conditions): Likewise.
	(print_scop_params): Likewise.
	* graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise.
	(build_cross_bb_scalars_use): Likewise.
	(gather_bbs::before_dom_children): Likewise.
	* hsa-dump.c (dump_hsa_immed): Likewise.
	* ipa-cp.c (print_ipcp_constant_value): Likewise.
	(get_replacement_map): Likewise.
	* ipa-inline-analysis.c (dump_condition): Likewise.
	(estimate_function_body_sizes): Likewise.
	* ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise.
	(ipa_polymorphic_call_context::get_dynamic_type): Likewise.
	* ipa-prop.c (ipa_dump_param): Likewise.
	(ipa_print_node_jump_functions_for_edge): Likewise.
	(ipa_modify_call_arguments): Likewise.
	(ipa_modify_expr): Likewise.
	(ipa_dump_param_adjustments): Likewise.
	(ipa_dump_agg_replacement_values): Likewise.
	(ipcp_modif_dom_walker::before_dom_children): Likewise.
	* ipa-pure-const.c (check_stmt): Likewise.
	(pass_nothrow::execute): Likewise.
	* ipa-split.c (execute_split_functions): Likewise.
	* omp-offload.c (dump_oacc_loop_part): Likewise.
	(dump_oacc_loop): Likewise.
	* trans-mem.c (tm_log_emit): Likewise.
	(tm_memopt_accumulate_memops): Likewise.
	(dump_tm_memopt_set): Likewise.
	(dump_tm_memopt_transform): Likewise.
	* tree-cfg.c (gimple_verify_flow_info): Likewise.
	(print_loop): Likewise.
	* tree-chkp-opt.c (chkp_print_addr): Likewise.
	(chkp_gather_checks_info): Likewise.
	(chkp_get_check_result): Likewise.
	(chkp_remove_check_if_pass): Likewise.
	(chkp_use_outer_bounds_if_possible): Likewise.
	(chkp_reduce_bounds_lifetime): Likewise.
	* tree-chkp.c (chkp_register_addr_bounds): Likewise.
	(chkp_mark_completed_bounds): Likewise.
	(chkp_register_incomplete_bounds): Likewise.
	(chkp_mark_invalid_bounds): Likewise.
	(chkp_maybe_copy_and_register_bounds): Likewise.
	(chkp_build_returned_bound): Likewise.
	(chkp_get_bound_for_parm): Likewise.
	(chkp_build_bndldx): Likewise.
	(chkp_get_bounds_by_definition): Likewise.
	(chkp_generate_extern_var_bounds): Likewise.
	(chkp_get_bounds_for_decl_addr): Likewise.
	* tree-chrec.c (chrec_apply): Likewise.
	* tree-data-ref.c (dump_data_reference): Likewise.
	(dump_subscript): Likewise.
	(dump_data_dependence_relation): Likewise.
	(analyze_overlapping_iterations): Likewise.
	* tree-inline.c (expand_call_inline): Likewise.
	(tree_function_versioning): Likewise.
	* tree-into-ssa.c (dump_defs_stack): Likewise.
	(dump_currdefs): Likewise.
	(dump_names_replaced_by): Likewise.
	(dump_update_ssa): Likewise.
	(update_ssa): Likewise.
	* tree-object-size.c (pass_object_sizes::execute): Likewise.
	* tree-parloops.c (build_new_reduction): Likewise.
	(try_create_reduction_list): Likewise.
	(ref_conflicts_with_region): Likewise.
	(oacc_entry_exit_ok_1): Likewise.
	(oacc_entry_exit_single_gang): Likewise.
	* tree-pretty-print.h: Likewise.
	* tree-scalar-evolution.c (set_scalar_evolution): Likewise.
	(get_scalar_evolution): Likewise.
	(add_to_evolution): Likewise.
	(get_loop_exit_condition): Likewise.
	(analyze_evolution_in_loop): Likewise.
	(analyze_initial_condition): Likewise.
	(analyze_scalar_evolution): Likewise.
	(instantiate_scev): Likewise.
	(number_of_latch_executions): Likewise.
	(gather_chrec_stats): Likewise.
	(final_value_replacement_loop): Likewise.
	(scev_const_prop): Likewise.
	* tree-sra.c (dump_access): Likewise.
	(disqualify_candidate): Likewise.
	(create_access): Likewise.
	(reject): Likewise.
	(maybe_add_sra_candidate): Likewise.
	(create_access_replacement): Likewise.
	(analyze_access_subtree): Likewise.
	(analyze_all_variable_accesses): Likewise.
	(sra_modify_assign): Likewise.
	(initialize_constant_pool_replacements): Likewise.
	(find_param_candidates): Likewise.
	(decide_one_param_reduction): Likewise.
	(replace_removed_params_ssa_names): Likewise.
	* tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
	* tree-ssa-copy.c (dump_copy_of): Likewise.
	(copy_prop_visit_cond_stmt): Likewise.
	* tree-ssa-dce.c (mark_operand_necessary): Likewise.
	* tree-ssa-dom.c (pass_dominator::execute): Likewise.
	(record_equivalences_from_stmt): Likewise.
	* tree-ssa-dse.c (compute_trims): Likewise.
	(delete_dead_call): Likewise.
	(delete_dead_assignment): Likewise.
	* tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
	(forward_propagate_into_cond): Likewise.
	(pass_forwprop::execute): Likewise.
	* tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
	* tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children): Likewise.
	(move_computations_worker): Likewise.
	(execute_sm): Likewise.
	* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
	(remove_exits_and_undefined_stmts): Likewise.
	(remove_redundant_iv_tests): Likewise.
	* tree-ssa-loop-ivopts.c (dump_use): Likewise.
	(adjust_iv_update_pos): Likewise.
	* tree-ssa-math-opts.c (bswap_replace): Likewise.
	* tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise.
	(value_replacement): Likewise.
	* tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
	* tree-ssa-pre.c (print_pre_expr): Likewise.
	(get_representative_for): Likewise.
	(create_expression_by_pieces): Likewise.
	(insert_into_preds_of_block): Likewise.
	(eliminate_insert): Likewise.
	(eliminate_dom_walker::before_dom_children): Likewise.
	(eliminate): Likewise.
	(remove_dead_inserted_code): Likewise.
	* tree-ssa-propagate.c (substitute_and_fold): Likewise.
	* tree-ssa-reassoc.c (get_rank): Likewise.
	(eliminate_duplicate_pair): Likewise.
	(eliminate_plus_minus_pair): Likewise.
	(eliminate_not_pairs): Likewise.
	(undistribute_ops_list): Likewise.
	(eliminate_redundant_comparison): Likewise.
	(update_range_test): Likewise.
	(optimize_range_tests_var_bound): Likewise.
	(optimize_vec_cond_expr): Likewise.
	(rewrite_expr_tree): Likewise.
	(rewrite_expr_tree_parallel): Likewise.
	(linearize_expr): Likewise.
	(break_up_subtract): Likewise.
	(linearize_expr_tree): Likewise.
	(attempt_builtin_powi): Likewise.
	(attempt_builtin_copysign): Likewise.
	(transform_stmt_to_copy): Likewise.
	(transform_stmt_to_multiply): Likewise.
	(dump_ops_vector): Likewise.
	* tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise.
	(print_scc): Likewise.
	(set_ssa_val_to): Likewise.
	(visit_reference_op_store): Likewise.
	(visit_use): Likewise.
	(sccvn_dom_walker::before_dom_children): Likewise.
	(run_scc_vn): Likewise.
	* tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Likewise.
	(expr_hash_elt::print): Likewise.
	(const_and_copies::pop_to_marker): Likewise.
	(const_and_copies::record_const_or_copy_raw): Likewise.
	* tree-ssa-structalias.c (compute_dependence_clique): Likewise.
	* tree-ssa-uninit.c (collect_phi_def_edges): Likewise.
	(dump_predicates): Likewise.
	(find_uninit_use): Likewise.
	(warn_uninitialized_phi): Likewise.
	(pass_late_warn_uninitialized::execute): Likewise.
	* tree-ssa.c (verify_vssa): Likewise.
	(verify_ssa): Likewise.
	(maybe_optimize_var): Likewise.
	* tree-vrp.c (dump_value_range): Likewise.
	(dump_all_value_ranges): Likewise.
	(dump_asserts_for): Likewise.
	(register_edge_assert_for_2): Likewise.
	(vrp_visit_cond_stmt): Likewise.
	(vrp_visit_switch_stmt): Likewise.
	(vrp_visit_stmt): Likewise.
	(vrp_visit_phi_node): Likewise.
	(simplify_cond_using_ranges_1): Likewise.
	(fold_predicate_in): Likewise.
	(evrp_dom_walker::before_dom_children): Likewise.
	(evrp_dom_walker::push_value_range): Likewise.
	(evrp_dom_walker::pop_value_range): Likewise.
	(execute_early_vrp): Likewise.

From-SVN: r248113
2017-05-16 14:51:02 +00:00
Nathan Sidwell
3f267553fc cp-tree.h (class ovl_iterator, [...]): New OVERLOAD iterators.
* cp-tree.h (class ovl_iterator, class lkp_iterator): New OVERLOAD
	iterators.
	(MAYBE_BASELINK_FUNCTIONS): New.
	* constraint.cc	(resolve_constraint_check): Use lkp_iterator.
	* decl2.c (maybe_warn_sized_delete): Use ovl_iterator.
	* lambda.c (maybe_generic_this_capture): Use lkp_iterator.
	* method.c (inherited_ctor_binfo): Use ovl_iterator.
	(binfo_inherited_from): Likewise.
	* parser.c (lookup_literal_operator): Use lkp_iterator.
	* pt.c (iterative_hash_template_arg): Use lkp_iterator.
	(print_candidates_1): Likewise.
	(determine_specialization): Likewise.
	(resolve_overloaded_unification): Likewise.
	(resolve_nondeduced_context): Likewise.
	(type_dependent_expression_p): Likewise.
	(dependent_template_p): Likewise.
	* ptree.c (cxx_print_xnode): Likewise.
	* semantics.c (omp_reduction_lookup): Use lkp_iterator.
	(classtype_has_nothrow_assign_or_copy_p): Use ovl_iterator.
	* typeck.c (check_template_keyword): Use lkp_iterator.

From-SVN: r248112
2017-05-16 14:46:30 +00:00
Jonathan Wakely
058c785479 Test source_location::current() in default member initializer
* testsuite/experimental/source_location/1.cc: Change expected result
	for source_location::current() used in default member initializer.

From-SVN: r248111
2017-05-16 15:26:14 +01:00
Jonathan Wakely
2673bae9d2 Implement std::experimental::source_location (N4519)
* configure: Regenerate.
	* doc/xml/manual/status_cxx2017.xml: Update status table.
	* doc/html/*: Regenerate.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/experimental/source_location: New header implementing N4519.
	* testsuite/experimental/source_location/1.cc: New test.

From-SVN: r248110
2017-05-16 14:37:52 +01:00
Jonathan Wakely
423624979a Fix forward declaration of std::type_info for versioned-namespace
PR libstdc++/80285
	* include/bits/shared_ptr_base.h [!__cpp_rtti] (type_info): Declare
	outside versioned namespace.

From-SVN: r248109
2017-05-16 14:16:34 +01:00
Nathan Sidwell
848bf88da8 cp-tree.h (OVL_FIRST, OVL_NAME): New.
* cp-tree.h (OVL_FIRST, OVL_NAME): New.
	(ovl_first): New.
	* constexpr.c (function_concept_check): Use OVL_FIRST.
	* cvt.c (build_expr_type_conversion): Likewise.
	* decl.c (poplevel, grokdeclarator): Use OVL_NAME.
	* decl2.c (mark_used): Use OVL_FIRST.
	* error.c (dump_decl): Use OVL_FIRST, OVL_NAME.
	(dump_expr, location_of): Use OVL_FIRST.
	* friend.c (do_friend): Use OVL_NAME.
	* init.c (build_offset_ref): Use OVL_FIRST.
	* mangle.c (write_member_name): Likewise.
	(write_expression): Use OVL_NAME.
	* method.c (strip_inheriting_ctors): Use OVL_FIRST.
	* name-lookup.c (pushdecl_class_level): Use OVL_NAME.
	* pt.c (check_explicit_specialization): Use OVL_FIRST.
	(check_template_shadow): Likewise.
	(tsubst_template_args): Use OVL_NAME.
	(tsubst_baselink): Use OVL_FIRST.
	* semantics.c (perform_koenig_lookup): Use OVL_NAME.
	* tree.c (get_first_fn): Use OVL_FIRST.
	* typeck.c (finish_class_member_access_expr): Use OVL_NAME.
	(cp_build_addr_expr_1): Use OVL_FIRST.

From-SVN: r248108
2017-05-16 13:15:53 +00:00
Jonathan Wakely
ba1a69079f Regenerate libstdc++-v3/configure for versioned-namespace soname
* configure: Regenerate.

From-SVN: r248107
2017-05-16 14:12:16 +01:00
Nathan Sidwell
1f0ed17c4e pt.c (tsubst_copy_and_build): Remove unnecessary COMPONENT_REF peeking.
* pt.c (tsubst_copy_and_build): Remove unnecessary COMPONENT_REF
	peeking.
	* semantics.c (finish_id_expression): Directly init local var.
	(finish_omp_reduction_clause): Use really_overloaded_fn.
	* tree.c (get_fns): Document.  Assert we got an overload.
	(get_first_fn) Document.
	* typeck.c (cp_build_addr_expr_1): Pass arg directly to
	really_overloaded_fn.
	* typeck2.c (cxx_inomplete_type_diagnostic): Use get_first_fn directly.

From-SVN: r248106
2017-05-16 13:12:01 +00:00
Marc Glisse
2c27a627a3 optional (_Optional_base::_M_get): Check precondition.
2017-05-16  Marc Glisse  <marc.glisse@inria.fr>

	* include/std/optional (_Optional_base::_M_get): Check precondition.
	* testsuite/20_util/optional/cons/value_neg.cc: Update line numbers.

From-SVN: r248099
2017-05-16 12:54:16 +00:00
Nathan Sidwell
322763f5df cp-tree.h (SCOPE_DEPTH): New.
* cp-tree.h (SCOPE_DEPTH): New.
	* name-lookup.h (is_nested_namespace): Declare.
	* name-lookup.c (is_nested_namespace): New.
	(is_ancestor): Use it.
	(set_decl_namespace): Likewise.
	(push_namespace): Set SCOPE_DEPTH.
	* pt.c (check_specialization_namespace): Use is_nested_namespace.
	(check_unqualigied_spec_or_inst): Likewise.

From-SVN: r248095
2017-05-16 11:32:40 +00:00
Richard Biener
51f01fc387 dwarf2out.c (loc_list_from_tree_1): Do not create DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
2017-05-16  Richard Biener  <rguenther@suse.de>

	* dwarf2out.c (loc_list_from_tree_1): Do not create
	DW_OP_GNU_variable_value for DECL_IGNORED_P decls.

From-SVN: r248094
2017-05-16 11:00:59 +00:00
Richard Biener
3a06a61019 dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE just generated.
2017-05-16  Richard Biener  <rguenther@suse.de>

	* dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
	just generated.
	(note_variable_value_in_expr): If we resolved the decl ref
	do not push to the stack.

From-SVN: r248093
2017-05-16 10:58:54 +00:00
Jonathan Wakely
5f54ae00d0 Add cross-reference for test permutations in libstdc++ manual
* doc/xml/manual/appendix_contributing.xml: Link to test docs and
	note higher DejaGnu version requirement.
	* doc/html/*: Regenerate.

From-SVN: r248092
2017-05-16 11:37:22 +01:00
Jonathan Wakely
ad2b8b37ec Add cross-reference for BADNAMES in libstdc++ manual
* doc/xml/manual/appendix_contributing.xml: Link to the list of bad
	identifiers.
	* doc/html/*: Regenerate.

From-SVN: r248091
2017-05-16 10:46:21 +01:00
Matthew Wahab
6da3785703 Committed on behalf of Matthew Wahab
gcc/
2017-05-16  Matthew Wahab  <matthew.wahab@arm.com>

	* config/arm/arm_neon.h (vadd_f16): Use standard arithmetic
	operations in fast-math mode.
	(vaddq_f16): Likewise.
	(vmul_f16): Likewise.
	(vmulq_f16): Likewise.
	(vsub_f16): Likewise.
	(vsubq_f16): Likewise.
	* config/arm/neon.md (add<mode>3): New.
	(sub<mode>3): New.
	(fma:<VH:mode>3): New.  Also remove outdated comment.
	(mul<mode>3): New.

testsuite/
2017-05-16  Matthew Wahab  <matthew.wahab@arm.com>

	* gcc.target/arm/armv8_2-fp16-arith-1.c: Expand comment.  Update
	expected output of vadd, vsub and vmul instructions.
	* gcc.target/arm/armv8_2-fp16-arith-2.c: New.
	* gcc.target/arm/armv8_2-fp16-neon-2.c: New.
	* gcc.target/arm/armv8_2-fp16-neon-3.c: New.

From-SVN: r248090
2017-05-16 09:23:42 +00:00
Martin Liska
d8c9bc3627 Fix 2 typos in ipa-devirt.c.
2017-05-16  Martin Liska  <mliska@suse.cz>

	PR ipa/79849.
	PR ipa/79850.
	* ipa-devirt.c (warn_types_mismatch): Fix typo.
	(odr_types_equivalent_p): Likewise.

From-SVN: r248089
2017-05-16 08:57:05 +00:00
Sylvestre Ledru
3fc5147b9b plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637)
From-SVN: r248088
2017-05-16 07:44:33 +00:00
Sylvestre Ledru
be742f1ebe objc-runtime-shared-support.c (build_module_descriptor): Remove unnecessary conditional when building instance of objc_module.
2017-05-16  Sylvestre Ledru  <sylvestre@debian.org>

        * objc-runtime-shared-support.c (build_module_descriptor):
        Remove unnecessary conditional when building instance of
        objc_module. CID 1406758

From-SVN: r248087
2017-05-16 07:31:15 +00:00
GCC Administrator
4bd7b795ae Daily bump.
From-SVN: r248086
2017-05-16 00:16:23 +00:00
Ian Lance Taylor
588aa9790e compiler: better error messages for slicing invalid types
Reviewed-on: https://go-review.googlesource.com/43457

From-SVN: r248082
2017-05-16 00:05:05 +00:00
Ian Lance Taylor
d73b8f8417 compiler: report correct errors for sink methods
If somebody writes
    
    func (s []int) _() {}
    
    we should report an error.  Before this patch we were silently
    accepting this code, because we didn't report any errors about the
    receiver if the method was a sink.
    
    This patch is unfortunately slightly complex to handle the case of
    
    func (x int) _() {}
    
    which we can only detect after define_global_names.
    
    This fixes blank1.go in the current gc testsuite.
    
    Reviewed-on: https://go-review.googlesource.com/43456

From-SVN: r248081
2017-05-16 00:02:03 +00:00
Jerry DeLisle
a5768d38a6 re PR libfortran/80727 (Crash of runtime gfortran library during integer transformation)
2017-05-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/80727
	* transfer.c (read_sf_internal): Remove bogus code to detect EOR.
	(read_block_form): For internal units, generate EOR if no more
	bytes left in unit and we are trying to read with ADVANCE='NO'.

	* gfortran.dg/read_3.f90: New test.

From-SVN: r248080
2017-05-15 23:48:39 +00:00
Steven G. Kargl
b2954e124b re PR fortran/80674 (trunk/gcc/fortran/trans-stmt.c:2578]: (style) Redundant condition)
2017-05-15  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/80674
	* trans-stmt.c (gfc_trans_integer_select): Remove redundant condition.

From-SVN: r248079
2017-05-15 23:46:23 +00:00
Nathan Sidwell
2016c841eb re PR c++/79369 (namespace definition with qualified id)
PR c++/79369
	* g++.dg/cpp1z/nested-namespace-def1.C: Adjust.

From-SVN: r248075
2017-05-15 20:26:19 +00:00
Thomas Koenig
6ce6a84ac6 re PR fortran/80765 (178.galgel in SPEC CPU 2000 fails to run)
2017-05-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/80765
        * m4/matmul_internal.m4: Set bystride to correct value in
	vector-matrix multiplicatin for later calculation of buffer
	size.
        * generated/matmul_c10.c: Regenerated.
        * generated/matmul_c16.c: Regenerated.
        * generated/matmul_c4.c: Regenerated.
        * generated/matmul_c8.c: Regenerated.
        * generated/matmul_i1.c: Regenerated.
        * generated/matmul_i16.c: Regenerated.
        * generated/matmul_i2.c: Regenerated.
        * generated/matmul_i4.c: Regenerated.
        * generated/matmul_i8.c: Regenerated.
        * generated/matmul_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.

From-SVN: r248074
2017-05-15 20:06:06 +00:00
Nathan Sidwell
3a77e7ccc4 re PR c++/79369 (namespace definition with qualified id)
gcc/cp/
	PR c++/79369
	* cp-tree.h (DECL_NAMESPACE_INLINE_P): New.
	* name-lookup.h (push_namespace): Return int, add make_inline arg.
	* name-lookup.c (push_namespace): Deal with inline directly.
	Return pushed count.
	* parser.c (cp_parser_namespace_definition): Adjust for
	push_namespace change.

	gcc/testsuite/
	* g++.dg/cpp0x/pr65558.C: Adjust diagnostic location.
	* g++.dg/cpp0x/pr79369.C: New.

From-SVN: r248073
2017-05-15 19:35:52 +00:00
Steven G. Kargl
0735a1c8cf re PR fortran/80752 (ICE with wrong type initialization)
2017-05-15  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/80752
	* expr.c (gfc_generate_initializer):  If type conversion fails,
	check for error and return NULL.

2017-05-15  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/80752
	gfortran.dg/pr80752.f90: New test.

From-SVN: r248072
2017-05-15 19:34:52 +00:00
Uros Bizjak
900b5b6af2 ChangeLog: Add missing PR number.
* ChangeLog: Add missing PR number.
	* testsuite/ChangeLog: Ditto.

From-SVN: r248071
2017-05-15 21:20:50 +02:00
Uros Bizjak
f108770a89 i386.i386.md (*zero_extendsidi2): Do not penalize non-interunit SSE move alternatives with '?'.
* config/i386.i386.md (*zero_extendsidi2): Do not penalize
	non-interunit SSE move alternatives with '?'.
	(zero-extendsidi peephole2): New peephole to skip intermediate
	general register in SSE zero-extend sequence.

testsuite/ChangeLog:

	* gcc.target/i386/pr80425-1.c: New test.
	* gcc.target/i386/pr80425-2.c: Ditto.

From-SVN: r248070
2017-05-15 21:04:35 +02:00
Jeff Law
e30ce0a36c reorg.c (relax_delay_slots): Create a new variable to hold the temporary target rather than clobbering...
* reorg.c (relax_delay_slots): Create a new variable to hold
	the temporary target rather than clobbering TARGET_LABEL.

	* gcc.target/mips/reorgbug-1.c: New test.

From-SVN: r248067
2017-05-15 11:21:31 -06:00
Jeff Law
cc9d8f3b46 tilegx.c (tilegx_expand_unaligned_load): Add missing argument to extract_bit_field call.
* config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Add
	missing argument to extract_bit_field call.
	* config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Likewise.

From-SVN: r248066
2017-05-15 10:27:07 -06:00
Joseph Myers
982490afa5 * sv.po: Update.
From-SVN: r248064
2017-05-15 15:20:15 +01:00
Jonathan Wakely
85c05b5eec Fix order and types of members in C++17 insert_return_type structs
PR libstdc++/80761
	* include/bits/node_handle.h (_Node_insert_return): Reorder members.
	(tuple_size, tuple_element): Remove partial specializations.
	* include/bits/stl_tree.h (_Rb_tree::insert_return_type): Use
	const_iterator for std::set.
	* testsuite/23_containers/map/modifiers/extract.cc: New.
	* testsuite/23_containers/set/modifiers/extract.cc: New.
	* testsuite/23_containers/unordered_map/modifiers/extract.cc: New.
	* testsuite/23_containers/unordered_set/modifiers/extract.cc: New.

From-SVN: r248062
2017-05-15 14:47:40 +01:00
Martin Liska
511604823d Do not allow empty argument of -o option (PR driver/31468).
2017-05-15  Martin Liska  <mliska@suse.cz>

	PR driver/31468
	* gcc.c (process_command): Do not allow empty argument of -o option.

From-SVN: r248060
2017-05-15 12:48:35 +00:00