Mercurial > hg > CbC > CbC_gcc
view gcc/cp/ChangeLog @ 157:dafe684d005c
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:08:54 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
2020-02-12 Jason Merrill <jason@redhat.com> PR c++/92583 PR c++/92654 * tree.c (cp_walk_subtrees): Walk CONSTRUCTOR types here. * pt.c (find_parameter_packs_r): Not here. 2020-02-12 Iain Sandoe <iain@sandoe.co.uk> * coroutines.cc (build_actor_fn): Implement deallocation function selection per n4849, dcl.fct.def.coroutine bullet 12. (morph_fn_to_coro): Implement allocation function selection per n4849, dcl.fct.def.coroutine bullets 9 and 10. 2020-02-12 Marek Polacek <polacek@redhat.com> PR c++/93684 - ICE-on-invalid with broken attribute. * parser.c (cp_parser_std_attribute): Peek a token first before consuming it. 2020-02-11 Jason Merrill <jason@redhat.com> PR c++/93675 * class.c (add_implicitly_declared_members): Use do_friend. * method.c (implicitly_declare_fn): Fix friend handling. (decl_remember_implicit_trigger_p): New. (synthesize_method): Use it. * decl2.c (mark_used): Use it. 2020-02-11 Jason Merrill <jason@redhat.com> PR c++/93650 PR c++/90691 * constexpr.c (maybe_constant_value): Correct earlier change. (cxx_eval_binary_expression) [SPACESHIP_EXPR]: Pass lval through. * method.c (genericize_spaceship): Wrap result in TARGET_EXPR. 2020-02-12 Patrick Palka <ppalka@redhat.com> PR c++/69448 PR c++/80471 * type-utils.h (find_type_usage): Refactor to take a tree * and to return a tree *, and update documentation accordingly. * pt.c (make_auto_1): Set AUTO_IS_DECLTYPE when building a decltype(auto) node. (make_constrained_decltype_auto): No need to explicitly set AUTO_IS_DECLTYPE anymore. (splice_late_return_type): Use find_type_usage to find and replace a possibly nested auto node instead of using is_auto. Check test for is_auto into an assert when deciding whether to late_return_type. (type_uses_auto): Adjust the call to find_type_usage. * parser.c (cp_parser_decltype): No need to explicitly set AUTO_IS_DECLTYPE anymore. * error.c (dump_decl) [CONCEPT_DECL]: Use dump_simple_decl. (dump_simple_decl): Handle standard concept definitions as well as variable concept definitions. 2020-02-10 Jakub Jelinek <jakub@redhat.com> PR other/93641 * error.c (dump_decl_name): Fix up last argument to strncmp. 2020-02-10 Jason Merrill <jason@redhat.com> PR c++/93618 * tree.c (array_of_unknown_bound_p): New. * init.c (perform_member_init): Do nothing for flexible arrays. 2020-02-09 Jakub Jelinek <jakub@redhat.com> PR c++/93633 * constexpr.c (cxx_eval_constant_expression): If obj is heap var with ARRAY_TYPE, use the element type. Punt if objtype after that is not a class type. 2020-02-08 Jason Merrill <jason@redhat.com> PR c++/90691 * expr.c (fold_for_warn): Call maybe_constant_value. * constexpr.c (struct constexpr_ctx): Add uid_sensitive bit-field. (maybe_constant_value): Add uid_sensitive parm. (get_fundef_copy): Don't copy if it's true. (cxx_eval_call_expression): Don't instantiate if it's true. (cxx_eval_outermost_constant_expr): Likewise. PR c++/92852 * constexpr.c (maybe_constant_value): Don't unshare if the cached value is the same as the argument. * typeck.c (maybe_warn_about_returning_address_of_local): Add location parameter. * typeck2.c (process_init_constructor): Also clear TREE_SIDE_EFFECTS if appropriate. 2020-02-08 Jakub Jelinek <jakub@redhat.com> PR c++/93549 * constexpr.c (find_array_ctor_elt): If last element has no index, for flag_checking verify all elts have no index. If i is within the elts, return it directly, if it is right after the last elt, append if NULL index, otherwise force indexes on all elts. (cxx_eval_store_expression): Allow cep->index to be NULL. 2020-02-07 Marek Polacek <polacek@redhat.com> PR c++/92947 - Paren init of aggregates in unevaluated context. * call.c (build_new_method_call_1): Don't check cp_unevaluated_operand. Check the return value of digest_init. 2020-02-06 Jason Merrill <jason@redhat.com> PR c++/92654 * tree.c (cp_walk_subtrees): Walk into type template arguments. * cp-tree.h (TYPE_TEMPLATE_INFO_MAYBE_ALIAS): Use typedef_variant_p instead of TYPE_ALIAS_P. * pt.c (push_template_decl_real): Likewise. (find_parameter_packs_r): Likewise. Remove dead code. * error.c (find_typenames_r): Remove dead code. 2020-02-06 Jason Merrill <jason@redhat.com> PR c++/92517 * parser.c (cp_parser_constraint_primary_expression): Do the main parse non-tentatively. 2020-02-06 Marek Polacek <polacek@redhat.com> PR c++/93597 - ICE with lambda in operator function. * name-lookup.c (maybe_save_operator_binding): Check is_overloaded_fn. 2020-02-05 Jason Merrill <jason@redhat.com> PR c++/93140 * pt.c (tsubst_decl) [PARM_DECL]: Check cp_unevaluated_operand in handling of TREE_CHAIN for empty pack. 2020-02-05 Jakub Jelinek <jakub@redhat.com> PR c++/93557 * semantics.c (cp_build_vec_convert): Call decay_conversion on arg prior to passing it to c_build_vec_convert. 2020-02-05 Marek Polacek <polacek@redhat.com> PR c++/93559 - ICE with CONSTRUCTOR flags verification. * decl.c (reshape_init_array_1): Don't reuse a CONSTRUCTOR with TREE_SIDE_EFFECTS. 2020-02-05 Jason Merrill <jason@redhat.com> PR c++/92593 * decl.c (grokdeclarator): Reject field of current class type even in a template. 2020-02-05 Bin Cheng <bin.cheng@linux.alibaba.com> * coroutines.cc (maybe_promote_captured_temps): Increase the index number for temporary variables' name. 2020-02-05 Jun Ma <JunMa@linux.alibaba.com> * coroutines.cc (build_co_await): Call convert_from_reference to wrap co_await_expr with indirect_ref which avoid reference/non-reference type confusion. (co_await_expander): Sink to call_expr if await_resume is wrapped by indirect_ref. 2020-02-04 Jason Merrill <jason@redhat.com> PR c++/93551 * constraint.cc (satisfy_declaration_constraints): Check return value of push_tinst_level. PR c++/90951 * constexpr.c (cxx_eval_array_reference): {}-initialize missing elements instead of value-initializing them. PR c++/86917 * init.c (perform_member_init): Simplify. * constexpr.c (cx_check_missing_mem_inits): Allow uninitialized flexarray. (cxx_eval_vec_init_1): Handle CONSTRUCTOR. 2020-02-04 Iain Sandoe <iain@sandoe.co.uk> * coroutines.cc (find_promise_type): Delete unused forward declaration. (struct coroutine_info): Add a bool for no promise type error. (coro_promise_type_found_p): Only emit the error for a missing promise once in each affected coroutine. 2020-02-03 Jason Merrill <jason@redhat.com> PR c++/66477 * constexpr.c (cxx_eval_constant_expression) [PARM_DECL]: Don't defer loading the value of a reference. 2020-02-03 Jason Merrill <jason@redhat.com> PR c++/91953 * constexpr.c (potential_constant_expression_1) [PARM_DECL]: Allow empty class type. [COMPONENT_REF]: A member function reference doesn't use the object as an rvalue. 2020-02-03 Iain Sandoe <iain@sandoe.co.uk> PR c++/93458 * coroutines.cc (struct coroutine_info): Add a bool flag to note that we emitted an error for a bad function return type. (get_coroutine_info): Tolerate an unset info table in case of missing traits. (find_coro_traits_template_decl): In case of error or if we didn't find a type template, note we emitted the error and suppress duplicates. (find_coro_handle_template_decl): Likewise. (instantiate_coro_traits): Only check for error_mark_node in the return from lookup_qualified_name. (coro_promise_type_found_p): Reorder initialization so that we check for the traits and their usability before allocation of the info table. Check for a suitable return type and emit a diagnostic for here instead of relying on the lookup machinery. This allows the error to have a better location, and means we can suppress multiple copies. (coro_function_valid_p): Re-check for a valid promise (and thus the traits) before proceeding. Tolerate missing info as a fatal error. 2020-02-03 Jason Merrill <jason@redhat.com> PR c++/88256 * cp-gimplify.c (predeclare_vla): New. (cp_genericize_r) [NOP_EXPR]: Call it. 2020-02-03 Jun Ma <JunMa@linux.alibaba.com> * coroutines.cc (transform_await_wrapper): Set actor funcion as new context of label_decl. (build_actor_fn): Fill new field of await_xform_data. 2020-02-02 Marek Polacek <polacek@redhat.com> PR c++/93530 - ICE on invalid alignas in a template. * decl.c (grokdeclarator): Call cplus_decl_attributes instead of decl_attributes. 2020-01-31 Jason Merrill <jason@redhat.com> PR c++/86216 * semantics.c (process_outer_var_ref): Capture VLAs even in unevaluated context. PR c++/14179 * decl.c (reshape_init_array_1): Reuse a single CONSTRUCTOR with non-aggregate elements. (reshape_init_array): Add first_initializer_p parm. (reshape_init_r): Change first_initializer_p from bool to tree. (reshape_init): Pass init to it. PR c++/14179 * parser.c (cp_parser_initializer_list): Suppress location wrappers after 256 elements. 2020-01-29 Jason Merrill <jason@redhat.com> PR c++/82521 * pt.c (tsubst_copy_and_build) [EQ_EXPR]: Only suppress warnings if the expression was dependent before substitution. 2020-01-30 Bin Cheng <bin.cheng@linux.alibaba.com> * coroutines.cc (act_des_fn): New. (morph_fn_to_coro): Call act_des_fn to build actor/destroy decls. Access promise via actor function's frame pointer argument. (build_actor_fn, build_destroy_fn): Use frame pointer argument. 2020-01-30 Bin Cheng <bin.cheng@linux.alibaba.com> * coroutines.cc (co_await_expander): Handle type conversion case. 2020-01-29 Jason Merrill <jason@redhat.com> PR c++/90333 PR c++/89640 PR c++/60503 * parser.c (cp_parser_type_specifier_seq): Don't parse attributes in a trailing return type. (cp_parser_lambda_declarator_opt): Parse C++11 attributes before parens. 2020-01-29 Marek Polacek <polacek@redhat.com> PR c++/91754 - Fix template arguments comparison with class NTTP. * pt.c (class_nttp_const_wrapper_p): New. (template_args_equal): See through class_nttp_const_wrapper_p arguments. 2020-01-29 Marek Polacek <polacek@redhat.com> PR c++/92948 - Fix class NTTP with template arguments. * pt.c (convert_nontype_argument): Use IMPLICIT_CONV_EXPR when converting a value-dependent expression to a class type. (tsubst_copy) <case VIEW_CONVERT_EXPR>: Allow IMPLICIT_CONV_EXPR as the result of the tsubst_copy call. 2020-01-29 Jakub Jelinek <jakub@redhat.com> PR c++/91118 * cp-gimplify.c (cxx_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED for typeinfo decls. 2020-01-28 Jason Merrill <jason@redhat.com> PR c++/93442 * parser.c (cp_parser_lambda_expression): Clear in_discarded_stmt. PR c++/93477 PR c++/91476 * decl2.c (copy_linkage): Do copy DECL_ONE_ONLY and DECL_WEAK. PR c++/90546 * call.c (build_user_type_conversion_1): Allow a template conversion returning an rvalue reference to bind directly to an lvalue. PR c++/90731 * decl.c (grokdeclarator): Propagate eh spec from typedef. 2020-01-28 Martin Liska <mliska@suse.cz> PR c++/92440 * pt.c (redeclare_class_template): Group couple of errors and inform messages with auto_diagnostic_group. 2020-01-28 Martin Liska <mliska@suse.cz> PR c++/92440 * pt.c (redeclare_class_template): Use inform for the second location. 2020-01-27 Jason Merrill <jason@redhat.com> PR c++/90966 * pt.c (tsubst_copy) [STRING_CST]: Don't use fold_convert. 2020-01-27 Iain Sandoe <iain@sandoe.co.uk> PR c++/93443 * coroutines.cc (morph_fn_to_coro): Check the ramp return value when it is constructed from the 'get return object'. 2020-01-27 Nathan Sidwell <nathan@acm.org> PR c++/91826 * name-lookup.c (is_ancestor): Allow CHILD to be a namespace alias. 2020-01-26 Jason Merrill <jason@redhat.com> PR c++/90992 * except.c (maybe_noexcept_warning): Check DECL_IN_SYSTEM_HEADER and temporarily enable -Wsystem-headers. Change second warning to conditional inform. PR c++/90997 * semantics.c (finish_call_expr): Don't call instantiate_non_dependent_expr before warn_for_memset. 2020-01-25 Marek Polacek <polacek@redhat.com> PR c++/93414 - poor diagnostic for dynamic_cast in constexpr context. * constexpr.c (cxx_eval_dynamic_cast_fn): Add a reference dynamic_cast diagnostic. 2020-01-24 Jason Merrill <jason@redhat.com> PR c++/93400 - ICE with constrained friend. * constraint.cc (maybe_substitute_reqs_for): New. * decl.c (function_requirements_equivalent_p): Call it. * pt.c (tsubst_friend_function): Only substitute TEMPLATE_PARMS_CONSTRAINTS. (tsubst_template_parms): Copy constraints. 2020-01-24 Jason Merrill <jason@redhat.com> PR c++/93279 - ICE with lambda in member operator. * name-lookup.c (maybe_save_operator_binding): Don't remember class-scope bindings. 2020-01-24 Jason Merrill <jason@redhat.com> PR c++/93377 - ICE with member alias in constraint. * pt.c (any_template_parm_r): Look at template arguments for all aliases, not only alias templates. 2020-01-24 Marek Polacek <polacek@redhat.com> PR c++/93299 - ICE in tsubst_copy with parenthesized expression. * pt.c (tsubst_copy): Handle a REF_PARENTHESIZED_P VIEW_CONVERT_EXPR. 2020-01-24 Jason Merrill <jason@redhat.com> PR c++/92852 - ICE with generic lambda and reference var. * constexpr.c (maybe_constant_value): Likewise. 2020-01-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/92804 * parser.c (cp_parser_nested_name_specifier_opt): Properly diagnose concept-ids. 2020-01-23 Jason Merrill <jason@redhat.com> PR c++/93331 - ICE with __builtin_strchr. * constexpr.c (cxx_eval_builtin_function_call): Use the original argument if we didn't manage to extract a STRING_CST. PR c++/93345 - ICE with defaulted dtor and template. PR c++/33799 * decl.c (cxx_maybe_build_cleanup): Don't try to set throwing_cleanup in a template. 2020-01-22 Marek Polacek <polacek@redhat.com> PR c++/92907 - noexcept does not consider "const" in member functions. * g++.dg/cpp0x/noexcept56.C: New test. 2020-01-22 Marek Polacek <polacek@redhat.com> PR c++/93324 - ICE with -Wall on constexpr if. * semantics.c (is_std_constant_evaluated_p): Check fndecl. 2020-01-22 Patrick Palka <ppalka@redhat.com> * constraint.cc (get_mapped_args): Avoid using auto_vec as a vector element. Release the vectors inside the lists vector. * parser.c (cp_literal_operator_id): Free the buffer. 2020-01-22 Jun Ma <JunMa@linux.alibaba.com> * coroutines.cc (finish_co_await_expr): Add error check on return value of build_co_await. (finish_co_yield_expr,): Ditto. 2020-01-22 Jun Ma <JunMa@linux.alibaba.com> * coroutines.cc (lookup_awaitable_member): Lookup an awaitable member. (lookup_promise_method): Emit diagnostic when get NULL_TREE back only. (build_co_await): Use lookup_awaitable_member instead of lookup_member. 2020-01-21 Jason Merrill <jason@redhat.com> PR c++/60855 - ICE with sizeof VLA capture. * lambda.c (is_lambda_ignored_entity): Don't look past VLA capture. PR c++/90732 - ICE with VLA capture and generic lambda. * pt.c (tsubst_lambda_expr): Repeat add_capture for VLAs. 2020-01-21 Iain Sandoe <iain@sandoe.co.uk> Bin Cheng <bin.cheng@linux.alibaba.com> * coroutines.cc (coro_promise_type_found_p): Check for NULL return from complete_type_or_else. (register_param_uses): Likewise. (build_co_await): Do not try to use complete_type_or_else for void types, otherwise for incomplete types, check for NULL return from complete_type_or_else. 2020-01-21 Jason Merrill <jason@redhat.com> PR c++/91476 - anon-namespace reference temp clash between TUs. * decl2.c (copy_linkage): Factor out of get_guard. * call.c (make_temporary_var_for_ref_to_temp): Use it. * decl.c (cp_finish_decomp): Use it. (cp_finish_decl): determine_visibility sooner. 2020-01-21 Bin Cheng <bin.cheng@linux.alibaba.com> * coroutines.cc (finish_co_await_expr): Set return value flag. (finish_co_yield_expr, morph_fn_to_coro): Ditto. 2020-01-19 Jason Merrill <jason@redhat.com> PR c++/33799 - destroy return value, take 2. * cp-tree.h (current_retval_sentinel): New macro. (struct language_function): Add throwing_cleanup bitfield. * decl.c (cxx_maybe_build_cleanup): Set it. * except.c (maybe_set_retval_sentinel) (maybe_splice_retval_cleanup): New functions. * parser.c (cp_parser_compound_statement): Call maybe_splice_retval_cleanup. * typeck.c (check_return_expr): Call maybe_set_retval_sentinel. * parser.c (cp_parser_lambda_body): Use cp_parser_function_body. 2020-01-18 Jakub Jelinek <jakub@redhat.com> * coroutines.cc (get_fn_local_identifier): Fix NO_DOT_IN_LABEL but non-NO_DOLLAR_IN_LABEL case build. 2020-01-18 Iain Sandoe <iain@sandoe.co.uk> * Make-lang.in: Add coroutines.o. * cp-tree.h (lang_decl-fn): coroutine_p, new bit. (DECL_COROUTINE_P): New. * lex.c (init_reswords): Enable keywords when the coroutine flag is set, * operators.def (co_await): New operator. * call.c (add_builtin_candidates): Handle CO_AWAIT_EXPR. (op_error): Likewise. (build_new_op_1): Likewise. (build_new_function_call): Validate coroutine builtin arguments. * constexpr.c (potential_constant_expression_1): Handle CO_AWAIT_EXPR, CO_YIELD_EXPR, CO_RETURN_EXPR. * coroutines.cc: New file. * cp-objcp-common.c (cp_common_init_ts): Add CO_AWAIT_EXPR, CO_YIELD_EXPR, CO_RETRN_EXPR as TS expressions. * cp-tree.def (CO_AWAIT_EXPR, CO_YIELD_EXPR, (CO_RETURN_EXPR): New. * cp-tree.h (coro_validate_builtin_call): New. * decl.c (emit_coro_helper): New. (finish_function): Handle the case when a function is found to be a coroutine, perform the outlining and emit the outlined functions. Set a bit to signal that this is a coroutine component. * parser.c (enum required_token): New enumeration RT_CO_YIELD. (cp_parser_unary_expression): Handle co_await. (cp_parser_assignment_expression): Handle co_yield. (cp_parser_statement): Handle RID_CO_RETURN. (cp_parser_jump_statement): Handle co_return. (cp_parser_operator): Handle co_await operator. (cp_parser_yield_expression): New. (cp_parser_required_error): Handle RT_CO_YIELD. * pt.c (tsubst_copy): Handle CO_AWAIT_EXPR. (tsubst_expr): Handle CO_AWAIT_EXPR, CO_YIELD_EXPR and CO_RETURN_EXPRs. * tree.c (cp_walk_subtrees): Likewise. 2020-01-17 Jason Merrill <jason@redhat.com> PR c++/92531 - ICE with noexcept(lambda). * pt.c (uses_template_parms): Don't try to enumerate all the expression cases. 2020-01-17 Jakub Jelinek <jakub@redhat.com> PR c++/93228 * parser.c (cp_parser_template_name): Look up deprecated attribute in DECL_TEMPLATE_RESULT or its type's attributes. 2020-01-16 Jason Merrill <jason@redhat.com> PR c++/93286 - ICE with __is_constructible and variadic template. * pt.c (tsubst) [TREE_LIST]: Handle pack expansion. (tsubst_copy_and_build) [TRAIT_EXPR]: Always use tsubst for type2. PR c++/93280 - ICE with aggregate assignment and DMI. * init.c (get_nsdmi): Set TARGET_EXPR_DIRECT_INIT_P here. * typeck2.c (digest_nsdmi_init): Not here. 2020-01-15 Paolo Carlini <paolo.carlini@oracle.com> PR c++/91073 * cp-tree.h (is_constrained_auto): New. * parser.c (cp_parser_maybe_commit_to_declaration): Correctly handle concept-check expressions; take a cp_decl_specifier_seq* instead of a bool. (cp_parser_condition): Update call. (cp_parser_simple_declaration): Likewise. (cp_parser_placeholder_type_specifier): Correctly handle concept-check expressions. 2020-01-15 Jason Merrill <jason@redhat.com> Revert PR c++/33799 - destroy return value if local cleanup throws. * cp-tree.h (current_retval_sentinel): New macro. * decl.c (start_preparsed_function): Set up cleanup for retval. * typeck.c (check_return_expr): Set current_retval_sentinel. PR c++/93257 - consteval void function. * constexpr.c (verify_constant): Allow void_node. PR c++/92871 - bad code with xvalue and GNU ?: extension. * call.c (prevent_lifetime_extension): New. (build_conditional_expr_1): Use it. 2020-01-14 Nathan Sidwell <nathan@acm.org> PR c++/90916 * pt.c (retrieve_specialization): Use get_template_info, not open coding access. PR c++/90916 * pt.c (retrieve_specialization): Get the TI from the decl or the classtype as appropriate. 2020-01-14 David Malcolm <dmalcolm@redhat.com> * cp-gimplify.c (source_location_table_entry_hash::empty_zero_p): New static constant. * cp-tree.h (named_decl_hash::empty_zero_p): Likewise. (struct named_label_hash::empty_zero_p): Likewise. * decl2.c (mangled_decl_hash::empty_zero_p): Likewise. 2020-01-14 Jason Merrill <jason@redhat.com> PR c++/92590 - wrong handling of inherited default ctor. * class.c (add_method): A constrained inherited ctor doesn't hide an implicit derived ctor. Revert: PR c++/92552 - ICE with inherited constrained default ctor. * pt.c (instantiate_class_template_1): Copy TYPE_HAS_USER_CONSTRUCTOR. PR c++/91930 - ICE with constrained inherited default ctor. * name-lookup.c (do_class_using_decl): Set TYPE_HAS_USER_CONSTRUCTOR for inherited constructor. PR c++/92594 - ICE with inherited trivial default ctor. * method.c (trivial_fn_p): Treat an inherited default constructor like a normal default constructor. PR c++/92594 - ICE with inherited trivial default ctor. * method.c (trivial_fn_p): Treat an inherited default constructor like a normal default constructor. PR c++/92009 - ICE with punning of typeid. * rtti.c (get_tinfo_desc): Call xref_basetypes. * constexpr.c (cxx_fold_indirect_ref): Don't strip REINTERPRET_CAST_P. 2020-01-13 Jason Merrill <jason@redhat.com> PR c++/92746 - ICE with noexcept of function concept check. * except.c (check_noexcept_r): Handle concept-check. PR c++/92582 - ICE with member template as requirement. * pt.c (struct find_template_parameter_info): Add ctx_parms. (any_template_parm_r): Handle TEMPLATE_DECL. (find_template_parameters): Take parms instead of their depth. * constraint.cc (build_parameter_mapping): Pass them. PR c++/33799 - destroy return value if local cleanup throws. * cp-tree.h (current_retval_sentinel): New macro. * decl.c (start_preparsed_function): Set up cleanup for retval. * typeck.c (check_return_expr): Set current_retval_sentinel. PR c++/93238 - short right-shift with enum. * typeck.c (cp_build_binary_op): Use folded op1 for short_shift. 2020-01-10 Jason Merrill <jason@redhat.com> * typeck.c (cp_build_binary_op): Restore short_shift code. PR c++/93143 - incorrect tree sharing with constexpr. * constexpr.c (cxx_eval_outermost_constant_expr): Don't assume CONSTRUCTORs are already unshared. PR c++/93173 - incorrect tree sharing. PR c++/93033 * cp-gimplify.c (cp_gimplify_init_expr, cp_gimplify_expr): Use copy_if_shared after cp_genericize_tree. * typeck2.c (split_nonconstant_init): Don't unshare here. 2020-01-08 Jason Merrill <jason@redhat.com> * cp-gimplify.c (cp_gimplify_expr) [TARGET_EXPR]: Check TARGET_EXPR_DIRECT_INIT_P. * constexpr.c (cxx_eval_constant_expression): Likewise. 2020-01-08 Jason Merrill <jason@redhat.com> PR c++/91369 - constexpr destructor and member initializer. * constexpr.c (cxx_eval_store_expression): Look through TARGET_EXPR when not preevaluating. 2020-01-08 Jason Merrill <jason@redhat.com> * constexpr.c (cxx_eval_call_expression): Remove DECL_BY_REFERENCE support. 2020-01-07 Paolo Carlini <paolo.carlini@oracle.com> * init.c (build_new): Add location_t parameter and use it throughout. (build_raw_new_expr): Likewise. * parser.c (cp_parser_new_expression): Pass the combined_loc. * pt.c (tsubst_copy_and_build): Adjust call. * cp-tree.h: Update declarations. 2020-01-07 Jason Merrill <jason@redhat.com> PR c++/47877 - -fvisibility-inlines-hidden and member templates. * decl2.c (determine_visibility): -fvisibility-inlines-hidden beats explicit class visibility for a template. 2020-01-07 Richard Sandiford <richard.sandiford@arm.com> * mangle.c (mangle_type_attribute_p): New function, split out from... (write_CV_qualifiers_for_type): ...here. Don't mangle attributes that contain a space. 2020-01-07 Jakub Jelinek <jakub@redhat.com> PR c++/91369 * constexpr.c (struct constexpr_global_ctx): Add heap_alloc_count member, initialize it to zero in ctor. (cxx_eval_call_expression): Bump heap_dealloc_count when deleting a heap object. Don't cache calls to functions which allocate some heap objects and don't deallocate them or deallocate some heap objects they didn't allocate. 2020-01-06 Jason Merrill <jason@redhat.com> PR c++/92552 - ICE with inherited constrained default ctor. * pt.c (instantiate_class_template_1): Copy TYPE_HAS_USER_CONSTRUCTOR. * class.c (one_inherited_ctor): Don't set it here. 2020-01-06 Andrew Sutton <asutton@lock3software.com> PR c++/92739 - parsing requires clause with attributes. * parser.c (cp_parser_constraint_requires_parens): Exclude attributes as postfix expressions. 2020-01-05 Jakub Jelinek <jakub@redhat.com> PR c++/93138 * parser.c (cp_parser_check_class_key): Disable access checks for the simple name lookup. (cp_parser_maybe_warn_enum_key): Likewise. Return early if !warn_redundant_tags. 2010-01-05 Jakub Jelinek <jakub@redhat.com> PR c++/93046 * cp-gimplify.c (cp_gimplify_init_expr): Don't look through TARGET_EXPR if it has been gimplified already. 2020-01-03 Jason Merrill <jason@redhat.com> PR c++/93033 - incorrect tree node sharing with array init. * typeck2.c (split_nonconstant_init): Unshare non-decl. * cp-gimplify.c (cp_gimplify_init_expr): Only split if -fexceptions. 2020-01-02 Jason Merrill <jason@redhat.com> * pt.c (invalid_nontype_parm_type_p): Reject class placeholder in C++17. 2020-01-02 Jakub Jelinek <jakub@redhat.com> PR c/90677 * cp-objcp-common.c (identifier_global_tag): Return NULL_TREE if name has not been found, rather than error_mark_node. 2020-01-01 Jakub Jelinek <jakub@redhat.com> Update copyright years. Copyright (C) 2020 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.