1. 29 Jun, 2017 2 commits
  2. 28 Jun, 2017 1 commit
  3. 29 May, 2017 4 commits
    • PR c++/80891 (#1,#5) · 3d7ff728
      	PR c++/80891 (#1,#5)
      	* cp-tree.h (lookup_maybe_add): Add DEDUPING argument.
      	* name-lookup.c (name_lookup): Add deduping field.
      	(name_lookup::preserve_state, name_lookup::restore_state): Deal
      	with deduping.
      	(name_lookup::add_overload): New.
      	(name_lookup::add_value, name_lookup::add_fns): Call add_overload.
      	(name_lookup::search_adl): Set deduping.  Don't unmark here.
      	* pt.c (most_specialized_instantiation): Revert previous change,
      	Assert not given duplicates.
      	* tree.c (lookup_mark): Just mark the underlying decls.
      	(lookup_maybe_add): Dedup using marked decls.
      
      	PR c++/80891 (#5)
      	* g++.dg/lookup/pr80891-5.C: New.
      
      From-SVN: r248578
      Nathan Sidwell committed
    • PR c++/80891 (#4) · a5cfa13a
      	PR c++/80891 (#4)
      	* ptree.c (cxx_print_xnode): Show internal OVERLOAD structure.
      	* tree.c (ovl_insert, ovl_iterator_remove_node): Fix copying
      	assert.
      
      	PR c++/80891 (#4)
      	* g++.dg/lookup/pr80891-4.C: New.
      
      From-SVN: r248576
      Nathan Sidwell committed
    • PR c++/80891 (#3) · 58dec010
      	PR c++/80891 (#3)
      	* cp-tree.h (build_min_nt_call_vec): Declare.
      	* decl.c (build_offset_ref_call_from_tree): Call it.
      	* parser.c (cp_parser_postfix_expression): Likewise.
      	* pt.c (tsubst_copy_and_build): Likewise.
      	* semantics.c (finish_call_expr): Likewise.
      	* tree.c (build_min_nt_loc): Keep unresolved lookups.
      	(build_min): Likewise.
      	(build_min_non_dep): Likewise.
      	(build_min_non_dep_call_vec): Likewise.
      	(build_min_nt_call_vec): New.
      
      	PR c++/80891 (#3)
      	* g++.dg/lookup/pr80891-3.C: New.
      
      From-SVN: r248571
      Nathan Sidwell committed
    • PR c++/80891 (#2) · 724e517a
      	PR c++/80891 (#2)
      	* tree.c (ovl_copy): Adjust assert, copy OVL_LOOKUP.
      	(ovl_used): New.
      	(lookup_keep): Call it.
      
      	PR c++/80891 (#2)
      	* g++.dg/lookup/pr80891-2.C: New.
      
      From-SVN: r248570
      Nathan Sidwell committed
  4. 26 May, 2017 1 commit
    • cp-tree.h (OVL_CHAIN): Check looking at OVERLOAD. · 32196b87
      	* cp-tree.h (OVL_CHAIN): Check looking at OVERLOAD.
      	(ovl_iterator): Add allow_inner field.  Adjust ctor.  Make
      	unduplicatable.
      	(ovl_iterator::maybe_push, ovl_iterator::pop): New.
      	(lkp_iterator): Add outer field.  Adjust ctor.
      	(lkp_iterator::operator++): New.
      	(lookup_mark, lookup_maybe_add): Declare.
      	* name-lookup.c (name_lookup): Delete fn_set member.
      	(name_lookup::preserve_state, name_lookup::restore_state): Unmark
      	and mark lookup.
      	(name_lookup::add_value): Use lookup_add directly.
      	(name_lookup::add_fns: Use lookup_maybe_add.
      	(name_lookup::search_adl): Mark and unmark fns.
      	(pushdecl): Adjust.
      	* pt.c (check_explicit_specialization): Use lookup_add directly.
      	* ptree.c (cxx_print_xnode): Show complete overload structure.
      	* tree.c (lookup_mark, lookup_maybe_add): New.
      
      From-SVN: r248517
      Nathan Sidwell committed
  5. 25 May, 2017 1 commit
    • Kill DECL_NAMESPACE_USERS, DECL_NAMESPACE_ASSOCIATIONS. · 44e00a7a
      	gcc/cp/
      	Kill DECL_NAMESPACE_USERS, DECL_NAMESPACE_ASSOCIATIONS.
      	* cp-tree.h (lang_decl_ns): Remove ns_users field.
      	(DECL_NAMESPACE_USERS, DECL_NAMESPACE_ASSOCIATIONS): Delete.
      	(TREE_INDIRECT_USING): Delete.
      	* name-lookup.h (is_associated_namespace): Delete.
      	* name-lookup.c (name_lookup::search_usings
      	name_lookup::do_queue_usings): Usings are always direct.
      	(is_associated_namespace): Delete.
      	(handle_namespace_attrs): Use DECL_NAMESPACE_INLINE_P.
      	(namespace_ancestor_1, namespace_ancestor): Delete.
      	(push_using_directive_1, push_using_directive): Delete.
      	(add_using_namespace_1): Delete.
      	(add_using_namespace): Reimplement.
      	(emit_debug_info_using_namespace): New.
      	(finish_namespace_using_directive, finish_local_using_directive
      	push_namespace): Adjust.
      	* tree.c (cp_free_lang_data): Remove DECL_NAMESPACE_USERS
      	handling.
      
      	libcc1/
      	* libcp1plugin.cc (plugin_make_namespace_inline): Check and set
      	DECL_NAMESPACE_INLINE_P.
      
      	gcc/testsuite/
      	* g++.dg/lookup/using56.C: New.
      	* g++.dg/lookup/using57.C: New.
      	* g++.dg/lookup/using58.C: New.
      	* g++.dg/lookup/using59.C: New.
      
      From-SVN: r248467
      Nathan Sidwell committed
  6. 24 May, 2017 3 commits
    • cp-tree.h (cp_free_lang_data): Add extern. · d48b9bbe
      	* cp-tree.h (cp_free_lang_data): Add extern.
      	(ovl_skip_hidden, is_overloaded_fn, really_overloaded_fn): Add
      	ATTRIBUTE_PURE.
      	(type_unknown_p): Return bool, make inline, lose TREE_LIST check.
      	* typeck.c (type_unknown_p): Delete.
      	* tree.c (is_overloaded_fn): Use MAYBE_BASELINE_FUNCTIONS, adjust
      	overload management.
      	(dependent_name): Likewise.
      	(decl_anon_ns_mem_p): Simplify.
      
      From-SVN: r248433
      Nathan Sidwell committed
    • cp-tree.h (ovl_skip_hidden): Declare. · c0edbb32
      	* cp-tree.h (ovl_skip_hidden): Declare.
      	* tree.c (ovl_skip_hidden): New.
      	* name-lookup.c (arg_assoc_namespace): Call ovl_skip_hidden.
      	(lookup_arg_dependent_1): Likewise.
      	(ambiguous_decl): Use DECL_HIDDEN_P, ovl_skip_hidden.
      	(hidden_name_p, remove_hidden_names): Delete.
      	(lookup_name_real_1): Do not strip hidden names.
      	* name-lookup.h (hidden_name_p, remove_hidden_names): Delete.
      
      From-SVN: r248423
      Nathan Sidwell committed
    • cp-tree.h (OVL_HIDDEN_P): New. · ef4c5e78
      	gcc/cp/
      	* cp-tree.h (OVL_HIDDEN_P): New.
      	(ovl_iterator::hidden_p, ovl_iterator::reveal_node): New.
      	(ovl_iterator::reveal_node): Declare.
      	* tree.c (ovl_copy): Copy OVL_HIDDEN_P.
      	(ovl_insert): Order on hiddenness.
      	(ovl_iterator::reveal_node): New.
      	* name-lookup.c (anticipated_builtin_p): New.
      	(supplement_binding_1): Use it.
      	(set_local_extern_decl_linkage): Use hidden_p.
      	(do_pushdecl): Deal with unhiding a hidden decl, use
      	anticipated_builtin_p.
      	(do_nonmember_using_decl): Use anticipated_decl_p.
      	(lookup_name_real_1): Use DECL_HIDDEN_P.
      
      	gcc/testsuite/
      	* g++.dg/lookup/extern-c-hidden.C: New.
      	* g++.dg/lookup/extern-redecl1.C: New.
      
      From-SVN: r248406
      Nathan Sidwell committed
  7. 19 May, 2017 1 commit
    • call.c (add_list_candidates): Use OVL_FIRST. · 6f2f4050
      	* call.c (add_list_candidates): Use OVL_FIRST.
      	(build_new_method_call_1): Likewise.
      	* cp-tree.h (OVL_SINGLE_P): New.
      	(TYPE_HIDDEN_P): New.
      	* decl.c (xref_tag_1): Use TYPE_HIDDEN_P.
      	* dump.c (cp_tump_tree): Adjust overload dumping.
      	* error.c (dump_decl): Use OVL_SINGLE_P, simplify context
      	printing.
      	* method.c (lazily_declare_fn): Assert we added it.
      	* parser.c (cp_parser_nested_name_specifier): Use OVL_SINGLE_P,
      	OVL_FIRST.
      	(cp_parser_template_name): Use lkp_iterator.
      	* pt.c (begin_template_parm_list): Fixup comment.
      	(instantiate_class_template_1): Use TYPE_HIDDEN_P.
      	* tree.c (ovl_iterator::remove_node): Cope with inherited ctors.
      	(ovl_scope): Use lkp_iterator.
      
      From-SVN: r248285
      Nathan Sidwell committed
  8. 18 May, 2017 3 commits
    • cp-tree.h (OVL_ARG_DEPENDENT): Delete. · 1bf07cc3
      	* cp-tree.h (OVL_ARG_DEPENDENT): Delete.
      	(OVL_USED_P): New.
      	(lookup_keep): Declare.
      	* name-lookup.c (add_function): Don't set OVL_ARG_DEPENDENT.
      	* pt.c (tsubst_copy): Assert lookup is persistent.
      	* semantics.c (finish_call_expr): Use lkp_iterator, call
      	lookup_keep.
      	* tree.c (ovl_copy): New.
      	(ovl_insert, ovl_iterator::remove_node): Copy immutable nodes.
      	(lookup_keep): New.
      
      From-SVN: r248250
      Nathan Sidwell committed
    • cp-tree.h (OVL_USED): Replace with ... · 2063b07f
      	* cp-tree.h (OVL_USED): Replace with ...
      	(OVL_USING_P): ... this.
      	(ovl_iterator::using_p): Adjust.
      	* name-lookup.c (push_overloaded_decl_1)
      	do_nonmember_using_decl): Adjust.
      	* search.c (lookup_field_r): Adjust.
      	* tree.c (ovl_insert, ovl_scope): Adjust.
      (--This line, and those below, will be ignored--
      
      M    cp/tree.c
      M    cp/cp-tree.h
      M    cp/name-lookup.c
      M    cp/search.c
      M    cp/ChangeLog
      
      From-SVN: r248229
      Nathan Sidwell committed
    • cp-tree.h (lookup_add): Swap args. · 31ab89c1
      	* cp-tree.h (lookup_add): Swap args.
      	(ovl_cons, build_overload): Delete.
      	* name-lookup.c (add_function, push_overloaded_decl_1)
      	do_nonmember_using_decl, merge_functions, remove_hidden_names):
      	Use lookup_add, ovl_insert.
      	* pt.c (check_explicit_specialization): Use lookup_add.
      	(do_class_deduction): Likewise. Refactor if.
      	* tree.c (lookup_add): Swap args.
      	(ovl_cons, build_overload): Delete.
      (--This line, and those below, will be ignored--
      
      M    cp/cp-tree.h
      M    cp/name-lookup.c
      M    cp/pt.c
      M    cp/ChangeLog
      M    cp/tree.c
      
      From-SVN: r248198
      Nathan Sidwell committed
  9. 17 May, 2017 1 commit
    • cp-tree.h (ovl_iterator::using_p): New predicate. · 36f4bc9c
      	* cp-tree.h (ovl_iterator::using_p): New predicate.
      	(ovl_iterator::remove_node): New worker.
      	(ovl_insert): Declare.
      	* tree.c (ovl_insert): New.
      	(ovl_iterator::remove_node): New.
      	* class.c (add_method): Use ovl_iterator, ovl_insert.
      	(clone_function_decl): Fix description.
      	(clone_constructors_and_destructors): Use ovl_iterator.
      
      From-SVN: r248151
      Nathan Sidwell committed
  10. 16 May, 2017 4 commits
    • cp-tree.h (OVL_NESTED_P, [...]): New. · e09ae857
      	* 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
      Nathan Sidwell committed
    • call.c (build_user_type_conversion_1): Use OVL_FIRST. · a736411a
      	* 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
      Nathan Sidwell committed
    • cp-tree.h (OVL_FIRST, OVL_NAME): New. · 848bf88d
      	* 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
      Nathan Sidwell committed
    • pt.c (tsubst_copy_and_build): Remove unnecessary COMPONENT_REF peeking. · 1f0ed17c
      	* 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
      Nathan Sidwell committed
  11. 08 May, 2017 1 commit
    • PR c++/80178 - parameter passing for uncopyable classes · f3ec182d
      	* tree.c (type_has_nontrivial_copy_init): True for classes with only
      	deleted copy/move ctors.
      	(remember_deleted_copy, maybe_warn_parm_abi): New.
      	* decl.c (require_complete_types_for_parms, check_function_type):
      	Call maybe_warn_parm_abi.
      	* call.c (convert_for_arg_passing, build_cxx_call): Likewise.
      
      From-SVN: r247757
      Jason Merrill committed
  12. 04 May, 2017 1 commit
    • PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c · 0f2c4a8f
      gcc/c-family/ChangeLog:
      
      	PR translation/80280
      	* c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
      	(handle_weakref_attribute): Same.
      
      PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c
      
      gcc/ChangeLog:
      
      	PR translation/80280
      	* config/i386/i386.c (ix86_function_versions): Quote a %D directive.
      
      PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c
      
      gcc/cp/ChangeLog:
      
      	PR translation/80280
      	* call.c (print_z_candidate): Add missing quoting to %D and other
      	like directives.
      	(build_op_call_1): Same.
      	* constraint.cc (diagnose_check_constraint): Same.
      	* mangle.c (mangle_decl): Same.
      	* name-lookup.c (cp_binding_level_debug): Same.
      	(set_decl_namespace): Same.
      	* parser.c (cp_parser_tx_qualifier_opt): Same.
      	* pt.c (print_candidates_1): Same.
      	(check_template_variable): Same.
      	(tsubst_default_argument): Same.
      	(most_specialized_partial_spec): Same.
      	* semantics.c (omp_reduction_lookup): Same.
      	* tree.c (check_abi_tag_redeclaration): Same.
      	* typeck.c (comptypes): Same.
      	* typeck2.c (abstract_virtuals_error_sfinae): Same.
      
      PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c
      
      gcc/ChangeLog:
      
      	PR translation/80280
      	* builtins.c (expand_builtin_object_size): Add missing quoting to
      	%D and like directives.
      	* hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
      	(hsa_type_for_tree_type): Same.
      	(verify_function_arguments): Same.
      	* symtab.c (symbol_table::change_decl_assembler_name): Same.
      	* varasm.c (get_section): Same.
      	(mark_weak): Same.
      
      PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c
      
      gcc/objc/ChangeLog:
      
      	PR translation/80280
      	* objc-gnu-runtime-abi-01.c (objc_eh_runtime_type): Add missing
      	quoting to directives.
      	* objc-next-runtime-abi-01.c (objc_eh_runtime_type): Ditto.
      	* objc-next-runtime-abi-02.c (next_runtime_02_eh_type): Ditto.
      
      PR translation/80280 - Missing closing quote (%>) c/semantics.c and c/c-typeck.c
      
      gcc/testsuite/ChangeLog:
      
      	PR translation/80280
      	* g++.dg/abi/Wabi-2-3.C: Adjust.
      	* g++.dg/abi/Wabi-3-2.C: Ditto.
      	* g++.dg/lookup/using17.C: Ditto.
      	* gcc.dg/format/gcc_diag-1.c (foo): Ditto.
      
      From-SVN: r247607
      Martin Sebor committed
  13. 20 Apr, 2017 1 commit
    • re PR middle-end/80423 (GC related -fcompare-debug failure) · 8a59d466
      	PR middle-end/80423
      	* tree.h (build_array_type): Add typeless_storage default argument.
      	* tree.c (type_cache_hasher::equal): Also compare
      	TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
      	(build_array_type): Add typeless_storage argument, set
      	TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
      	recursive call.
      	(build_nonshared_array_type): Adjust build_array_type_1 caller.
      	(build_array_type): Likewise.  Add typeless_storage argument.
      c-family/
      	* c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
      cp/
      	* tree.c (build_cplus_array_type): Call build_array_type
      	with the intended TYPE_TYPELESS_STORAGE flag value, instead
      	of calling build_array_type and modifying later TYPE_TYPELESS_STORAGE
      	on the shared type.
      testsuite/
      	* g++.dg/other/pr80423.C: New test.
      
      From-SVN: r247014
      Jakub Jelinek committed
  14. 18 Apr, 2017 1 commit
  15. 17 Apr, 2017 1 commit
  16. 12 Apr, 2017 1 commit
    • re PR target/79671 (mapnik miscompilation on armv7hl since r235622) · 350792ff
      2017-04-12  Richard Biener  <rguenther@suse.de>
      	Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
      	PR middle-end/79671
      	* alias.c (component_uses_parent_alias_set_from): Handle
      	TYPE_TYPELESS_STORAGE.
      	(get_alias_set): Likewise.
      	* tree-core.h (tree_type_common): Add typeless_storage flag.
      	* tree.h (TYPE_TYPELESS_STORAGE): New macro.
      	* stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
      	for types containing members with TYPE_TYPELESS_STORAGE.
      	(place_field): Likewise.
      	(layout_type): Likewise for ARRAY_TYPE.
      	* lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
      	* tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
      	TYPE_TYPELESS_STORAGE.
      	* tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
      
      	lto/
      	* lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.
      
      	cp/
      	* tree.c (build_cplus_array_type): Set TYPE_TYPELESS_STORAGE
      	for arrays of character or std::byte type.
      
      	* g++.dg/torture/pr79671.C: New testcase.
      	* g++.dg/lto/pr79671_0.C: Likewise.
      	* g++.dg/lto/pr79671_1.c: Likewise.
      
      Co-Authored-By: Bernd Edlinger <bernd.edlinger@hotmail.de>
      
      From-SVN: r246866
      Richard Biener committed
  17. 10 Apr, 2017 1 commit
  18. 07 Apr, 2017 1 commit
    • re PR c++/80095 (ICE with this pointer in NSDMI) · 2166aeb3
      	PR c++/80095
      	* call.c (build_over_call): Don't check cxx_dialect.
      	* cp-gimplify.c (cp_gimplify_init_expr): Don't check cxx_dialect nor
      	whether SUB is a CONSTRUCTOR.
      	* init.c (build_new_1): Don't check cxx_dialect.
      	* tree.c (replace_placeholders): Add a function comment.  Return if
      	not in C++14, or if the object isn't a (member of a) class.
      	* typeck2.c (store_init_value): Don't check cxx_dialect nor whether
      	TYPE is CLASS_TYPE_P.
      
      	* g++.dg/cpp1y/nsdmi-aggr8.C: New test.
      
      From-SVN: r246772
      Marek Polacek committed
  19. 09 Mar, 2017 1 commit
  20. 12 Feb, 2017 1 commit
  21. 10 Feb, 2017 1 commit
  22. 09 Feb, 2017 1 commit
    • PR c++/79316 - default argument in deduction guide · a56c0ac0
      	PR c++/79350 - explicit deduction guide
      	* parser.c (cp_parser_constructor_declarator_p)
      	(cp_parser_direct_declarator): Parse deduction guides more like
      	constructors.
      	* cp-tree.h (enum special_function_kind): Add sfk_deduction_guide.
      	* tree.c (special_function_p): Return it.
      	* decl.c (check_special_function_return_type): Handle it.
      	(grokdeclarator, grokfndecl): Adjust.
      	(cp_finish_decl): Pass flags to do_auto_deduction.
      	* error.c (dump_decl_name): Use TFF_UNQUALIFIED_NAME.
      	* pt.c (dguide_name_p): Take a const_tree.
      	(do_class_deduction): Handle explicit.
      	(do_auto_deduction): Pass flags through.
      	(build_deduction_guide): Copy explicit flag.
      
      From-SVN: r245314
      Jason Merrill committed
  23. 06 Feb, 2017 1 commit
  24. 26 Jan, 2017 1 commit
  25. 24 Jan, 2017 1 commit
  26. 01 Jan, 2017 1 commit
  27. 21 Nov, 2016 1 commit
  28. 15 Nov, 2016 1 commit
    • Various C++17 decomposition fixes. · 47e5d7cc
      	* tree.c (bitfield_p): New.
      	* cp-tree.h: Declare it.
      	* typeck.c (cxx_sizeof_expr, cxx_alignof_expr)
      	(cp_build_addr_expr_1): Use it instead of DECL_C_BIT_FIELD.
      	* decl.c (cp_finish_decomp): Look through reference.  Always
      	SET_DECL_DECOMPOSITION_P.
      	* semantics.c (finish_decltype_type): Adjust decomposition handling.
      
      From-SVN: r242408
      Jason Merrill committed
  29. 14 Nov, 2016 1 commit
    • Implement P0217R3 - C++17 structured bindings · 70f40fea
      gcc/
      	* match.pd: Don't try to compare addresses of variables with
      	DECL_VALUE_EXPR.
      gcc/cp/
      	* cp-tree.h (struct lang_decl_base): Add decomposition_p.
      	(DECL_DECOMPOSITION_P): New
      	(enum auto_deduction_context): Add adc_decomp_type.
      	(enum cp_declarator_kind): Add cdk_decomp.
      	* constexpr.c (cxx_eval_constant_expression): Look through
      	DECL_VALUE_EXPR.
      	(potential_constant_expression_1): Likewise.
      	* decl.c (reshape_init): Preserve CONSTRUCTOR_IS_DIRECT_INIT.
      	(check_initializer): Use build_aggr_init for DECL_DECOMPOSITION_P.
      	(cp_finish_decl): Pass adc_decomp_type for decomposition.
      	(find_decomp_class_base, get_tuple_size, get_tuple_element_type)
      	(get_tuple_decomp_init, cp_finish_decomp): New.
      	(grokdeclarator): Handle decomposition.
      	* init.c (build_aggr_init): Handle decomposition array.
      	(build_vec_init): Handle initialization from { array }.
      	* name-lookup.c (add_function): Always wrap TEMPLATE_DECL in
      	OVERLOAD.
      	* parser.c (declarator_can_be_parameter_pack): Handle cdk_decomp.
      	(function_declarator_p, strip_declarator_types)
      	(cp_parser_check_declarator_template_parameters): Likewise.
      	(cp_parser_range_for, cp_convert_range_for): Handle decomposition.
      	(cp_parser_simple_declaration): Parse decomposition.
      	(cp_parser_decomposition_declaration): New.
      	* pt.c (tsubst_decomp_names): New.
      	(subst_expr) [DECL_EXPR, RANGE_FOR_STMT]: Handle decomposition.
      	(do_auto_deduction): Handle adc_decomp_type.
      	* semantics.c (finish_decltype_type): Look through DECL_VALUE_EXPR.
      	* typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
      	* tree.c (lvalue_kind): Likewise.
      	(cp_build_reference_type): Handle reference collapsing.
      
      Co-Authored-By: Jason Merrill <jason@redhat.com>
      
      From-SVN: r242377
      Jakub Jelinek committed