Daily bump.
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2021-07-26  Jakub Jelinek  <jakub@redhat.com>
2
3         * parser.h (struct cp_lexer): Add orphan_p member.
4         * parser.c (cp_parser_statement): Don't change in_omp_attribute_pragma
5         upon restart from CPP_PRAGMA handling.  Fix up condition when a lexer
6         should be destroyed and adjust saved_tokens if it records tokens from
7         the to be destroyed lexer.
8         (cp_parser_omp_section_scan): New function.
9         (cp_parser_omp_scan_loop_body): Use it.  If
10         parser->lexer->in_omp_attribute_pragma, allow optional comma
11         after scan.
12         (cp_parser_omp_sections_scope): Use cp_parser_omp_section_scan.
13
14 2021-07-23  Jakub Jelinek  <jakub@redhat.com>
15
16         * parser.h (struct cp_parser): Add omp_attrs_forbidden_p member.
17         * parser.c (cp_parser_handle_statement_omp_attributes): Diagnose
18         mixing of attribute and pragma syntax directives when seeing
19         omp::directive if parser->omp_attrs_forbidden_p or if attribute syntax
20         directives are followed by OpenMP pragma.
21         (cp_parser_statement): Clear parser->omp_attrs_forbidden_p after
22         the cp_parser_handle_statement_omp_attributes call.
23         (cp_parser_omp_structured_block): Add disallow_omp_attrs argument,
24         if true, set parser->omp_attrs_forbidden_p.
25         (cp_parser_omp_scan_loop_body, cp_parser_omp_sections_scope): Pass
26         false as disallow_omp_attrs to cp_parser_omp_structured_block.
27         (cp_parser_omp_parallel, cp_parser_omp_task): Set
28         parser->omp_attrs_forbidden_p.
29
30 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
31             Joseph Myers  <joseph@codesourcery.com>
32             Cesar Philippidis  <cesar@codesourcery.com>
33
34         * parser.c (cp_parser_omp_clause_name): Handle 'nohost'.
35         (cp_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
36         (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
37         * pt.c (tsubst_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
38         * semantics.c (finish_omp_clauses): Likewise.
39
40 2021-07-21  Jakub Jelinek  <jakub@redhat.com>
41
42         PR c++/101516
43         * semantics.c (finish_omp_reduction_clause): Also call
44         complete_type_or_else and return true if it fails.
45
46 2021-07-19  Iain Sandoe  <iain@sandoe.co.uk>
47
48         PR c++/95520
49         * coroutines.cc (struct coroutine_info): Add fields for
50         actor and destroy function decls.
51         (to_ramp): New.
52         (coro_get_ramp_function): New.
53         (coro_get_actor_function): New.
54         (coro_get_destroy_function): New.
55         (act_des_fn): Set up mapping between ramp, actor and
56         destroy functions.
57         (morph_fn_to_coro): Adjust interface to the builder for
58         helper function decls.
59         * cp-tree.h (DECL_ACTOR_FN, DECL_DESTROY_FN, DECL_RAMP_FN,
60         JOIN_STR): New.
61         * mangle.c (write_encoding): Handle coroutine helpers.
62         (write_unqualified_name): Handle lambda coroutine helpers.
63
64 2021-07-16  Patrick Palka  <ppalka@redhat.com>
65
66         PR c++/101233
67         * pt.c (alias_ctad_tweaks): Clear cp_unevaluated_operand for
68         substituting DECL_ARGUMENTS.
69
70 2021-07-16  Patrick Palka  <ppalka@redhat.com>
71
72         DR 960
73         PR c++/99664
74         * search.c (check_final_overrider): Compare TYPE_REF_IS_RVALUE
75         when the return types are references.
76
77 2021-07-16  Marek Polacek  <polacek@redhat.com>
78
79         * typeck2.c (check_narrowing): Don't suppress the pedantic error
80         in system headers.
81
82 2021-07-15  Jakub Jelinek  <jakub@redhat.com>
83
84         PR c++/101443
85         * cp-gimplify.c (cp_fold): For comparisons with NULLPTR_TYPE
86         operands, fold them right away to true or false.
87
88 2021-07-15  Jason Merrill  <jason@redhat.com>
89
90         PR c++/101095
91         * cp-objcp-common.c (cp_common_init_ts): Mark types as types.
92         (cp_tree_size): Remove redundant entries.
93
94 2021-07-14  Patrick Palka  <ppalka@redhat.com>
95
96         PR c++/88252
97         * cp-tree.h (TEMPLATE_TYPE_PARM_FOR_CLASS): Remove.
98         * pt.c (push_template_decl): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
99         handling.
100         (redeclare_class_template): Likewise.
101         (forwarding_reference_p): Define.
102         (maybe_adjust_types_for_deduction): Use it instead.  Add 'tparms'
103         parameter.
104         (unify_one_argument): Pass tparms to
105         maybe_adjust_types_for_deduction.
106         (try_one_overload): Likewise.
107         (unify): Likewise.
108         (rewrite_template_parm): Remove TEMPLATE_TYPE_PARM_FOR_CLASS
109         handling.
110
111 2021-07-14  Jason Merrill  <jason@redhat.com>
112
113         * class.c (struct find_final_overrider_data): Use auto_vec.
114         (find_final_overrider): Remove explicit release.
115         * coroutines.cc (process_conditional): Use auto_vec.
116         * cp-gimplify.c (struct cp_genericize_data): Use auto_vec.
117         (cp_genericize_tree): Remove explicit release.
118         * parser.c (cp_parser_objc_at_property_declaration): Use
119         auto_delete_vec.
120         * semantics.c (omp_reduction_lookup): Use auto_vec.
121
122 2021-07-14  Marek Polacek  <polacek@redhat.com>
123
124         PR c++/101371
125         * constexpr.c (cxx_eval_array_reference): Create a new .object
126         and .ctor for the non-aggregate non-scalar case too when
127         value-initializing.
128
129 2021-07-12  Patrick Palka  <ppalka@redhat.com>
130
131         PR c++/79501
132         PR c++/100983
133         * decl.c (grokfndecl): Don't require that deduction guides are
134         declared at namespace scope.  Check that class-scope deduction
135         guides have the same access as the member class template.
136         (grokdeclarator): Pretend class-scope deduction guides are static.
137         * search.c (lookup_member): Don't use a BASELINK for (class-scope)
138         deduction guides.
139
140 2021-07-10  Patrick Palka  <ppalka@redhat.com>
141
142         PR c++/82110
143         * init.c (build_aggr_init): Return error_mark_node if
144         expand_aggr_init_1 returns false.
145         (expand_default_init): Change return type to bool.  Return false
146         on error, true on success.
147         (expand_aggr_init_1): Likewise.
148
149 2021-07-09  Jason Merrill  <jason@redhat.com>
150
151         PR c++/101098
152         * decl.c (function_requirements_equivalent_p): Only compare
153         trailing requirements on a specialization.
154
155 2021-07-09  Iain Sandoe  <iain@sandoe.co.uk>
156
157         * coroutines.cc (build_actor_fn): Move common code to
158         act_des_fn.
159         (build_destroy_fn): Likewise.
160         (act_des_fn): Build the void return here.  Ensure that the
161         source location matches the original function.
162
163 2021-07-09  Iain Sandoe  <iain@sandoe.co.uk>
164
165         * coroutines.cc
166         (coro_rewrite_function_body): Connect the replacement
167         function block to the block nest correctly.
168
169 2021-07-09  Patrick Palka  <ppalka@redhat.com>
170
171         PR c++/101181
172         * constraint.cc (tsubst_requires_expr): Pass complain/in_decl to
173         add_extra_args.
174         * cp-tree.h (add_extra_args): Add complain/in_decl parameters.
175         * pt.c (build_extra_args): Make a copy of args.
176         (add_extra_args): Add complain/in_decl parameters.  Enable the
177         code for handling the case where the extra arguments are
178         dependent.
179         (tsubst_pack_expansion): Pass complain/in_decl to
180         add_extra_args.
181         (tsubst_template_args): Handle missing template arguments.
182         (tsubst_expr) <case IF_STMT>: Pass complain/in_decl to
183         add_extra_args.
184
185 2021-07-09  Patrick Palka  <ppalka@redhat.com>
186
187         PR c++/101247
188         * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Just walk the
189         DECL_CONTEXT.
190
191 2021-07-08  Martin Sebor  <msebor@redhat.com>
192
193         PR bootstrap/101372
194         * module.cc (identifier): Suppress warning.
195         (module_state::read_macro_maps): Remove warning suppression.
196         (module_state::install_macros): Ditto.
197
198 2021-07-08  Marek Polacek  <polacek@redhat.com>
199
200         PR c++/101087
201         * cp-tree.h (unevaluated_p): New.
202         * except.c (check_noexcept_r): Use it.  Don't walk into
203         unevaluated operands.
204
205 2021-07-08  Martin Sebor  <msebor@redhat.com>
206
207         PR bootstrap/101374
208         * module.cc (module_state::read_macro_maps): Temporarily disable
209         -Warray-bounds.
210         (module_state::install_macros): Same.
211
212 2021-07-06  Martin Sebor  <msebor@redhat.com>
213
214         * error.c (cp_printer):  Remove support for %G and %K.
215
216 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
217
218         * parser.h (struct cp_lexer): Add in_omp_attribute_pragma member.
219         (struct cp_omp_declare_simd_data): Likewise.
220         * cp-tree.h (enum cp_tree_index): Add CPTI_OMP_IDENTIFIER.
221         (omp_identifier): Define.
222         * parser.c (cp_parser_skip_to_pragma_eol): Handle
223         in_omp_attribute_pragma CPP_PRAGMA_EOL followed by CPP_EOF.
224         (cp_parser_require_pragma_eol): Likewise.
225         (struct cp_omp_attribute_data): New type.
226         (cp_parser_handle_statement_omp_attributes): New function.
227         (cp_parser_statement): Handle OpenMP directives in statement's
228         attribute-specifier-seq.
229         (cp_parser_omp_directive_args, cp_parser_omp_sequence_args): New
230         functions.
231         (cp_parser_std_attribute): Handle omp::directive and omp::sequence
232         attributes.
233         (cp_parser_omp_all_clauses): If in_omp_attribute_pragma, allow
234         a comma also before the first clause.
235         (cp_parser_omp_allocate): Likewise.
236         (cp_parser_omp_atomic): Likewise.
237         (cp_parser_omp_depobj): Likewise.
238         (cp_parser_omp_flush): Likewise.
239         (cp_parser_omp_ordered): Likewise.
240         (cp_parser_omp_declare_simd): Save in_omp_attribute_pragma
241         into struct cp_omp_declare_simd_data.
242         (cp_finish_omp_declare_variant): Add in_omp_attribute_pragma
243         argument.  If set, allow a comma also before match clause.
244         (cp_parser_late_parsing_omp_declare_simd): If in_omp_attribute_pragma,
245         allow a comma also before the first clause.  Adjust
246         cp_finish_omp_declare_variant caller.
247         (cp_parser_omp_declare_target): If in_omp_attribute_pragma, allow
248         a comma also before the first clause.
249         (cp_parser_omp_declare_reduction_exprs): Likewise.
250         (cp_parser_omp_requires): Likewise.
251         * decl.c (initialize_predefined_identifiers): Initialize
252         omp_identifier.
253         * decl2.c (cplus_decl_attributes): Reject omp::directive and
254         omp::sequence attributes.
255
256 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
257
258         PR c/101297
259         * parser.c (cp_parser_omp_atomic): Consume comma only if it
260         appears before a CPP_NAME.
261
262 2021-07-02  Patrick Palka  <ppalka@redhat.com>
263
264         PR c++/101247
265         * pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Rewrite to
266         use common_enclosing_class and to not depend on the TREE_TYPE
267         of outer levels pointing to the corresponding primary template.
268
269 2021-07-01  Patrick Palka  <ppalka@redhat.com>
270
271         PR c++/101194
272         * constexpr.c (cxx_eval_array_reference): When the element type
273         is an empty type and the corresponding element is omitted, just
274         return an empty CONSTRUCTOR instead of attempting value
275         initialization.
276
277 2021-07-01  Patrick Palka  <ppalka@redhat.com>
278
279         PR c++/96204
280         * pt.c (finish_template_variable): Pass the partially
281         instantiated template and its args to instantiate_template.
282         (instantiate_class_template_1): No need to call
283         push_nested_class and pop_nested_class around the call to
284         most_specialized_partial_spec.
285         (instantiate_template_1): Pass the partially instantiated
286         template to lookup_template_variable.
287         (most_specialized_partial_spec):  Use push_access_scope_guard
288         to set the access scope appropriately.  Use
289         deferring_access_check_sentinel to force access to get checked
290         immediately.
291         (instantiate_decl): Just pass the VAR_DECL to
292         most_specialized_partial_spec.
293
294 2021-06-30  Patrick Palka  <ppalka@redhat.com>
295
296         * constraint.cc (get_normalized_constraints_from_decl): Use
297         push_access_scope_guard instead of push_nested_class_guard.
298         * cp-tree.h (struct push_nested_class_guard): Replace with ...
299         (struct push_access_scope_guard): ... this.
300         * pt.c (push_access_scope): When the argument corresponds to
301         a class type, push the class instead of its context.
302         (pop_access_scope): Adjust accordingly.
303
304 2021-06-30  Marek Polacek  <polacek@redhat.com>
305
306         PR c++/100975
307         DR 2397
308         * decl.c (create_array_type_for_decl): Allow array of auto.
309
310 2021-06-29  Jason Merrill  <jason@redhat.com>
311
312         * pt.c (instantiate_decl): Only consider partial specializations of
313         actual variable templates.
314
315 2021-06-26  Patrick Palka  <ppalka@redhat.com>
316
317         PR c++/96204
318         * pt.c (instantiate_class_template_1): Enter the scope of the
319         type when calling most_specialized_partial_spec.
320
321 2021-06-26  Jason Merrill  <jason@redhat.com>
322
323         PR c++/101040
324         PR c++/97566
325         * class.c (is_empty_field): Handle null argument.
326         * constexpr.c (cxx_eval_bare_aggregate): Discard initializer
327         for empty field.
328
329 2021-06-26  Marek Polacek  <polacek@redhat.com>
330
331         PR c++/100752
332         * parser.c (cp_parser_declarator): Pass flags down to
333         cp_parser_declarator.  Also pass static_p/member_p.
334
335 2021-06-25  Martin Sebor  <msebor@redhat.com>
336
337         * call.c (build_over_call): Replace direct uses of TREE_NO_WARNING
338         with warning_suppressed_p, suppress_warning, and copy_no_warning, or
339         nothing if not necessary.
340         (set_up_extended_ref_temp): Same.
341         * class.c (layout_class_type): Same.
342         * constraint.cc (constraint_satisfaction_value): Same.
343         * coroutines.cc (finish_co_await_expr): Same.
344         (finish_co_yield_expr): Same.
345         (finish_co_return_stmt): Same.
346         (build_actor_fn): Same.
347         (coro_rewrite_function_body): Same.
348         (morph_fn_to_coro): Same.
349         * cp-gimplify.c (genericize_eh_spec_block): Same.
350         (gimplify_expr_stmt): Same.
351         (cp_genericize_r): Same.
352         (cp_fold): Same.
353         * cp-ubsan.c (cp_ubsan_instrument_vptr): Same.
354         * cvt.c (cp_fold_convert): Same.
355         (convert_to_void): Same.
356         * decl.c (wrapup_namespace_globals): Same.
357         (grokdeclarator): Same.
358         (finish_function): Same.
359         (require_deduced_type): Same.
360         * decl2.c (no_linkage_error): Same.
361         (c_parse_final_cleanups): Same.
362         * except.c (expand_end_catch_block): Same.
363         * init.c (build_new_1): Same.
364         (build_new): Same.
365         (build_vec_delete_1): Same.
366         (build_vec_init): Same.
367         (build_delete): Same.
368         * method.c (defaultable_fn_check): Same.
369         * parser.c (cp_parser_fold_expression): Same.
370         (cp_parser_primary_expression): Same.
371         * pt.c (push_tinst_level_loc): Same.
372         (tsubst_copy): Same.
373         (tsubst_omp_udr): Same.
374         (tsubst_copy_and_build): Same.
375         * rtti.c (build_if_nonnull): Same.
376         * semantics.c (maybe_convert_cond): Same.
377         (finish_return_stmt): Same.
378         (finish_parenthesized_expr): Same.
379         (cp_check_omp_declare_reduction): Same.
380         * tree.c (build_cplus_array_type): Same.
381         * typeck.c (build_ptrmemfunc_access_expr): Same.
382         (cp_build_indirect_ref_1): Same.
383         (cp_build_function_call_vec): Same.
384         (warn_for_null_address): Same.
385         (cp_build_binary_op): Same.
386         (unary_complex_lvalue): Same.
387         (cp_build_modify_expr): Same.
388         (build_x_modify_expr): Same.
389         (convert_for_assignment): Same.
390
391 2021-06-24  Patrick Palka  <ppalka@redhat.com>
392
393         PR c++/98832
394         * pt.c (maybe_aggr_guide): Handle alias templates appropriately.
395
396 2021-06-24  Patrick Palka  <ppalka@redhat.com>
397
398         PR c++/101182
399         * constraint.cc (evaluate_requires_expr): Adjust function comment.
400         * cp-gimplify.c (cp_genericize_r) <case REQUIRES_EXPR>: Move to ...
401         (cp_fold) <case REQUIRES_EXPR>: ... here.
402
403 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
404
405         * parser.c (cp_omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
406         C_ORT_OMP for clauses on target construct.
407         (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
408         (cp_parser_omp_target): For non-combined target add
409         map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION.  Pass
410         C_ORT_OMP_TARGET to finish_omp_clauses.
411         * semantics.c (handle_omp_array_sections_1): Adjust ort handling
412         for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
413         never present on C_ORT_*DECLARE_SIMD.
414         (handle_omp_array_sections): Likewise.
415         (finish_omp_clauses): Likewise.  Handle OMP_CLAUSE_IN_REDUCTION
416         on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
417         corresponding map clauses.
418         * pt.c (tsubst_expr): Pass C_ORT_OMP_TARGET instead of C_ORT_OMP for
419         clauses on target construct.
420
421 2021-06-23  Patrick Palka  <ppalka@redhat.com>
422
423         PR c++/101174
424         * pt.c (push_access_scope): For artificial deduction guides,
425         set the access scope to that of the constructor.
426         (pop_access_scope): Likewise.
427         (build_deduction_guide): Don't set DECL_CONTEXT on the guide.
428
429 2021-06-23  Patrick Palka  <ppalka@redhat.com>
430
431         PR c++/86439
432         * call.c (print_error_for_call_failure): Constify 'args' parameter.
433         (perform_dguide_overload_resolution): Define.
434         * cp-tree.h: (perform_dguide_overload_resolution): Declare.
435         * pt.c (do_class_deduction): Use perform_dguide_overload_resolution
436         instead of build_new_function_call.  Don't use tf_decltype or
437         set cp_unevaluated_operand.  Remove unnecessary NULL_TREE tests.
438
439 2021-06-21  Patrick Palka  <ppalka@redhat.com>
440
441         PR c++/67302
442         * typeck.c (check_return_expr): Call maybe_undo_parenthesized_ref
443         sooner, before the NRVO handling.
444
445 2021-06-21  Patrick Palka  <ppalka@redhat.com>
446
447         PR c++/80431
448         * tree.c (bot_replace): Use convert_to_base to build the
449         conversion to the (morally) virtual base.
450
451 2021-06-21  Jakub Jelinek  <jakub@redhat.com>
452
453         PR inline-asm/100785
454         * typeck.c (cxx_mark_addressable): Diagnose trying to make
455         bit-fields addressable.
456
457 2021-06-17  Jason Merrill  <jason@redhat.com>
458
459         PR c++/101106
460         * decl.c (duplicate_decls): Make 'deleted after first declaration'
461         pedwarn on by default.
462
463 2021-06-17  Jason Merrill  <jason@redhat.com>
464
465         PR c++/101029
466         * init.c (build_vec_init): Preserve the type of base.
467
468 2021-06-16  Jason Merrill  <jason@redhat.com>
469
470         PR c++/101078
471         PR c++/91706
472         * pt.c (tsubst_baselink): Update binfos in non-dependent case.
473
474 2021-06-15  Robin Dapp  <rdapp@linux.ibm.com>
475
476         * decl.c (duplicate_decls): Likewise.
477
478 2021-06-14  Tobias Burnus  <tobias@codesourcery.com>
479
480         PR c/100913
481         * parser.c (cp_parser_omp_clause_affinity): No need to set iterator
482         var in the error case.
483
484 2021-06-13  Trevor Saunders  <tbsaunde@tbsaunde.org>
485
486         * constexpr.c (cxx_eval_call_expression): Iterate over vec<>
487         with range based for.
488         (cxx_eval_store_expression): Likewise.
489         (cxx_eval_loop_expr): Likewise.
490         * decl.c (wrapup_namespace_globals): Likewise.
491         (cp_finish_decl): Likewise.
492         (cxx_simulate_enum_decl): Likewise.
493         * parser.c (cp_parser_postfix_expression): Likewise.
494
495 2021-06-12  Jason Merrill  <jason@redhat.com>
496
497         PR c++/101029
498         * init.c (build_vec_init): Shortcut [0] case.
499
500 2021-06-12  Jason Merrill  <jason@redhat.com>
501
502         * pt.c (lookup_template_class_1): Shortcut current_class_type.
503
504 2021-06-11  Patrick Palka  <ppalka@redhat.com>
505
506         DR 1227
507         PR c++/96560
508         * pt.c (tsubst_arg_types): Rearrange so that we substitute into
509         TYPE_ARG_TYPES in forward order while short circuiting
510         appropriately.  Adjust formatting.
511
512 2021-06-11  Jakub Jelinek  <jakub@redhat.com>
513
514         PR c++/100974
515         * cp-tree.h (struct saved_scope): Add consteval_if_p
516         member.  Formatting fix for the discarded_stmt comment.
517         (in_consteval_if_p, IF_STMT_CONSTEVAL_P): Define.
518         * parser.c (cp_parser_lambda_expression): Temporarily disable
519         in_consteval_if_p when parsing lambda body.
520         (cp_parser_selection_statement): Parse consteval if.
521         * decl.c (struct named_label_entry): Add in_consteval_if member.
522         (level_for_consteval_if): New function.
523         (poplevel_named_label_1, check_previous_goto_1, check_goto): Handle
524         consteval if.
525         * constexpr.c (cxx_eval_builtin_function_call): Clarify in comment
526         why CP_BUILT_IN_IS_CONSTANT_EVALUATED needs to *non_constant_p
527         for !ctx->manifestly_const_eval.
528         (cxx_eval_conditional_expression): For IF_STMT_CONSTEVAL_P evaluate
529         condition as if it was __builtin_is_constant_evaluated call.
530         (potential_constant_expression_1): For IF_STMT_CONSTEVAL_P always
531         recurse on both branches.
532         * cp-gimplify.c (genericize_if_stmt): Genericize IF_STMT_CONSTEVAL_P
533         as the else branch.
534         * pt.c (tsubst_expr) <case IF_STMT>: Copy IF_STMT_CONSTEVAL_P.
535         Temporarily set in_consteval_if_p when recursing on
536         IF_STMT_CONSTEVAL_P then branch.
537         (tsubst_lambda_expr): Temporarily disable
538         in_consteval_if_p when instantiating lambda body.
539         * call.c (immediate_invocation_p): Return false when
540         in_consteval_if_p.
541
542 2021-06-11  Marek Polacek  <polacek@redhat.com>
543
544         PR c++/100995
545         * constexpr.c (maybe_constexpr_fn): New.
546         * cp-tree.h (maybe_constexpr_fn): Declare.
547         * semantics.c (find_std_constant_evaluated_r): New.
548         (maybe_warn_for_constant_evaluated): New.
549         (finish_if_stmt_cond): Call it.
550
551 2021-06-10  Patrick Palka  <ppalka@redhat.com>
552
553         PR c++/67829
554         * pt.c (unify) <case BOUND_TEMPLATE_TEMPLATE_PARM>: When
555         the TEMPLATE_DECL of a BOUND_TEMPLATE_TEMPLATE_PARM argument is
556         a template template parameter, adjust to the
557         TEMPLATE_TEMPLATE_PARAMETER before falling through.
558
559 2021-06-10  Patrick Palka  <ppalka@redhat.com>
560
561         PR c++/100946
562         * constraint.cc (normalize_placeholder_type_constraints): When
563         normalizing a non-templated return-type-requirement, add a dummy
564         level to initial_parms.
565
566 2021-06-08  Marek Polacek  <polacek@redhat.com>
567
568         PR c++/100065
569         * decl.c (grokdeclarator): Store a value-dependent
570         explicit-specifier even for deduction guides.
571
572 2021-06-08  Jason Merrill  <jason@redhat.com>
573
574         * parser.c (cp_parser_string_literal): Adjust diagnostic.
575
576 2021-06-08  Jason Merrill  <jason@redhat.com>
577
578         PR c++/100963
579         * call.c (perfect_conversion_p): Check check_narrowing.
580
581 2021-06-08  Jason Merrill  <jason@redhat.com>
582
583         PR c++/91706
584         * name-lookup.c (get_class_binding): Keep a BASELINK.
585         (set_inherited_value_binding_p): Adjust.
586         * lambda.c (is_lambda_ignored_entity): Adjust.
587         * pt.c (lookup_template_function): Copy a BASELINK before
588         modifying it.
589
590 2021-06-08  Jason Merrill  <jason@redhat.com>
591
592         PR c++/91706
593         * semantics.c (baselink_for_fns): Fix BASELINK_BINFO.
594
595 2021-06-08  Jason Merrill  <jason@redhat.com>
596
597         * module.cc (duplicate_hash::hash): Comment out.
598         (trees_in::tree_value): Adjust loop counter.
599
600 2021-06-08  Jason Merrill  <jason@redhat.com>
601
602         PR c++/100102
603         * init.c (build_offset_ref): Return the BASELINK for a static
604         member function.
605
606 2021-06-07  Patrick Palka  <ppalka@redhat.com>
607
608         PR c++/100918
609         * parser.c (cp_parser_lookup_name): Check access of the lookup
610         result before we potentially adjust an injected-class-name to
611         its TEMPLATE_DECL.
612
613 2021-06-06  Jakub Jelinek  <jakub@redhat.com>
614
615         PR c/100902
616         * parser.c (cp_parser_omp_target): Call c_omp_adjust_map_clauses
617         even when target is combined with other constructs.
618
619 2021-06-04  Patrick Palka  <ppalka@redhat.com>
620
621         PR c++/100893
622         * pt.c (convert_template_argument): Strip top-level cv-quals
623         on the substituted type of a non-type template parameter.
624
625 2021-06-04  Patrick Palka  <ppalka@redhat.com>
626
627         PR c++/100102
628         * pt.c (tsubst_function_decl): Remove old code for reducing
629         args when it has excess levels.
630
631 2021-06-04  Jakub Jelinek  <jakub@redhat.com>
632
633         PR c++/100872
634         * name-lookup.c (maybe_save_operator_binding): Add op_attr after all
635         ATTR_IS_DEPENDENT attributes in the DECL_ATTRIBUTES list rather than
636         to the start.
637
638 2021-06-03  Patrick Palka  <ppalka@redhat.com>
639
640         PR c++/100592
641         * decl.c (make_typename_type): After calling
642         lookup_template_class, adjust the result to its TYPE_NAME and
643         then consider the tf_keep_type_decl flag.
644
645 2021-06-03  Patrick Palka  <ppalka@redhat.com>
646
647         PR c++/100862
648         * pt.c (set_current_access_from_decl): Move to ...
649         * class.c (set_current_access_from_decl): ... here.
650         (handle_using_decl): Use it to propagate the access of the
651         using-enum decl to the copy of the imported enumerator.
652         * cp-tree.h (set_current_access_from_decl): Declare.
653         * decl.c (build_enumerator): Simplify using make_temp_override
654         and set_current_access_from_decl.
655
656 2021-06-03  Jakub Jelinek  <jakub@redhat.com>
657
658         PR c++/100859
659         * semantics.c (handle_omp_array_sections_1): For
660         OMP_CLAUSE_{AFFINITY,DEPEND} handle FIELD_DECL base using
661         finish_non_static_data_member and allow this as base.
662         (finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
663         after depend only cases.  Let this be diagnosed by !lvalue_p
664         case for OMP_CLAUSE_{AFFINITY,DEPEND} and remove useless
665         assert.
666         * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_AFFINITY.
667
668 2021-06-02  Jason Merrill  <jason@redhat.com>
669
670         PR c++/100838
671         * call.c (convert_like_internal): Clear tf_no_cleanup when
672         recursing.
673         (build_user_type_conversion_1): Only add ck_rvalue if
674         LOOKUP_ONLYCONVERTING.
675
676 2021-06-01  Patrick Palka  <ppalka@redhat.com>
677
678         PR c++/65816
679         * init.c (expand_aggr_init_1): Check
680         type_has_non_user_provided_default_constructor instead of
681         type_has_user_provided_constructor.
682
683 2021-06-01  Jason Merrill  <jason@redhat.com>
684
685         PR c++/91859
686         * call.c (build_op_delete_call): Don't set CALL_FROM_NEW_OR_DELETE_P
687         for destroying delete.
688         * init.c (build_delete): Don't clobber before destroying delete.
689
690 2021-06-01  Jason Merrill  <jason@redhat.com>
691
692         PR c++/94492
693         * decl2.c (cp_warn_deprecated_use): Check warning_enabled_at.
694
695 2021-05-31  Richard Biener  <rguenther@suse.de>
696
697         PR c++/88601
698         * cp-objcp-common.c (names_builtin_p): Handle
699         RID_BUILTIN_SHUFFLEVECTOR.
700         * cp-tree.h (build_x_shufflevector): Declare.
701         * parser.c (cp_parser_postfix_expression): Handle
702         RID_BUILTIN_SHUFFLEVECTOR.
703         * pt.c (tsubst_copy_and_build): Handle IFN_SHUFFLEVECTOR.
704         * typeck.c (build_x_shufflevector): Build either a lowered
705         VEC_PERM_EXPR or an unlowered shufflevector via a temporary
706         internal function IFN_SHUFFLEVECTOR.
707
708 2021-05-28  Jason Merrill  <jason@redhat.com>
709
710         * constexpr.c (build_data_member_initialization): Use tsi_range.
711         (build_constexpr_constructor_member_initializers): Likewise.
712         (constexpr_fn_retval, cxx_eval_statement_list): Likewise.
713         (potential_constant_expression_1): Likewise.
714         * coroutines.cc (await_statement_expander): Likewise.
715         (await_statement_walker): Likewise.
716         * module.cc (trees_out::core_vals): Likewise.
717         * pt.c (tsubst_expr): Likewise.
718         * semantics.c (set_cleanup_locs): Likewise.
719
720 2021-05-28  Jason Merrill  <jason@redhat.com>
721
722         PR c++/100797
723         PR c++/95719
724         * call.c (build_over_call): Adjust base_binfo in
725         resolves_to_fixed_type_p case.
726
727 2021-05-28  Jakub Jelinek  <jakub@redhat.com>
728
729         PR middle-end/99928
730         * semantics.c (handle_omp_array_sections): Copy
731         OMP_CLAUSE_MAP_IMPLICIT.
732         (finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
733         marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT.  Add
734         map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
735         maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
736         present too.  For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
737         if present in map_head, map_field_head or map_firstprivate_head
738         bitmaps.
739
740 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
741
742         * parser.c (cp_parser_omp_clause_affinity): New.
743         (cp_parser_omp_clause_name, cp_parser_omp_var_list_no_open,
744         cp_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity
745         clause.
746         * semantics.c (handle_omp_array_sections_1, handle_omp_array_sections,
747         finish_omp_clauses): Likewise.
748
749 2021-05-27  Matthias Kretz  <kretz@kde.org>
750
751         PR c++/100716
752         * error.c (dump_template_bindings): Include code to print
753         "[with" and ']', conditional on whether anything is printed at
754         all. This is tied to whether a semicolon is needed to separate
755         multiple template parameters. If the template argument repeats
756         the template parameter (T = T), then skip the parameter.
757         (dump_substitution): Moved code to print "[with" and ']' to
758         dump_template_bindings.
759         (dump_function_decl): Partial revert of PR50828, which masked
760         TFF_TEMPLATE_NAME for all of dump_function_decl. Now
761         TFF_TEMPLATE_NAME is masked for the scope of the function and
762         only carries through to dump_function_name.
763         (dump_function_name): Avoid calling dump_template_parms if
764         TFF_TEMPLATE_NAME is set.
765
766 2021-05-27  Matthias Kretz  <kretz@kde.org>
767
768         PR c++/100763
769         * error.c: Call dump_scope when printing a typedef.
770
771 2021-05-27  Patrick Palka  <ppalka@redhat.com>
772
773         PR c++/99893
774         * tree.c (cp_walk_subtrees) <case STATIC_ASSERT>: New case.
775
776 2021-05-27  Jason Merrill  <jason@redhat.com>
777
778         PR c++/86355
779         * pt.c (use_pack_expansion_extra_args_p): Don't compare
780         args from the same argument pack.
781
782 2021-05-27  Patrick Palka  <ppalka@redhat.com>
783
784         DR 1315
785         PR c++/67593
786         PR c++/96555
787         * pt.c (process_partial_specialization): Don't error on a
788         non-simple non-type template argument that involves template
789         parameters.
790         (for_each_template_parm_r): Don't walk TRAIT_EXPR, PLUS_EXPR,
791         MULT_EXPR, or SCOPE_REF when include_nondeduced_p is false.
792
793 2021-05-26  Patrick Palka  <ppalka@redhat.com>
794
795         PR c++/100502
796         * typeck.c (finish_class_member_access_expr): Disable ahead
797         of time access checking during the member lookup.
798
799 2021-05-26  Patrick Palka  <ppalka@redhat.com>
800
801         PR c++/100368
802         * tree.c (build_target_expr_with_type): Don't call force_rvalue
803         on CALL_EXPR initializer.  Simplify now that bot_manip is no
804         longer a caller.
805         (bot_manip): Use force_target_expr instead of
806         build_target_expr_with_type.
807
808 2021-05-26  Patrick Palka  <ppalka@redhat.com>
809
810         PR c++/97420
811         * cvt.c (noexcept_conv_p): Remove redundant checks and simplify.
812         (fnptr_conv_p): Don't call non_reference.  Use INDIRECT_TYPE_P
813         instead of TYPE_PTR_P.
814         * pt.c (convert_nontype_argument_function): Look through
815         implicit INDIRECT_REFs before calling strip_fnptr_conv.
816
817 2021-05-25  Jakub Jelinek  <jakub@redhat.com>
818
819         PR c++/100666
820         * call.c (convert_arg_to_ellipsis): For expressions with NULLPTR_TYPE
821         and side-effects, temporarily disable -Wunused-result warning when
822         building COMPOUND_EXPR.
823
824 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
825
826         PR middle-end/99928
827         * semantics.c (finish_omp_clauses): Move firstprivate clauses with
828         OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain.  Don't error
829         if a decl is mentioned both in map clause and in such firstprivate
830         clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
831
832 2021-05-20  Jason Merrill  <jason@redhat.com>
833
834         * call.c (reference_binding): Check for designator.
835         (implicit_conversion_1, build_special_member_call): Likewise.
836         * decl.c (reshape_init_r): Likewise.
837         * pt.c (do_class_deduction): Likewise.
838         * typeck2.c (digest_init_r): Likewise.
839
840 2021-05-20  Jason Merrill  <jason@redhat.com>
841
842         PR c++/100489
843         * decl.c (reshape_init_class): Handle designator for
844         member of anonymous aggregate here.
845         * typeck2.c (process_init_constructor_record): Not here.
846
847 2021-05-20  Jonathan Wakely  <jwakely@redhat.com>
848
849         * call.c (maybe_warn_array_conv): Use new warning option.
850         * decl.c (mark_inline_variable, grokdeclarator): Likewise.
851         * error.c (maybe_warn_cpp0x): Likewise.
852         * parser.c (cp_parser_primary_expression)
853         (cp_parser_unqualified_id)
854         (cp_parser_pseudo_destructor_name)
855         (cp_parser_lambda_introducer)
856         (cp_parser_lambda_declarator_opt)
857         (cp_parser_selection_statement)
858         (cp_parser_init_statement)
859         (cp_parser_decomposition_declaration)
860         (cp_parser_function_specifier_opt)
861         (cp_parser_static_assert)
862         (cp_parser_namespace_definition)
863         (cp_parser_using_declaration)
864         (cp_parser_asm_definition)
865         (cp_parser_ctor_initializer_opt_and_function_body)
866         (cp_parser_initializer_list)
867         (cp_parser_type_parameter_key)
868         (cp_parser_member_declaration)
869         (cp_parser_try_block)
870         (cp_parser_std_attribute_spec): Likewise.
871         * pt.c (check_template_variable): Likewise.
872
873 2021-05-20  Jason Merrill  <jason@redhat.com>
874
875         PR c++/100634
876         * pt.c (invalid_nontype_parm_type_p): Return true for COMPLEX_TYPE.
877
878 2021-05-20  Jason Merrill  <jason@redhat.com>
879
880         PR c++/100659
881         * cp-tree.h (CONST_DECL_USING_P): Check for null TREE_TYPE.
882
883 2021-05-19  Jason Merrill  <jason@redhat.com>
884
885         PR c++/100367
886         PR c++/96299
887         * method.c (genericize_spaceship): Use fold_build2 for scalar
888         operands.
889
890 2021-05-19  Jason Merrill  <jason@redhat.com>
891
892         * pt.c (build_deduction_guide): Treat the implicit deduction guide
893         as a member of the class.
894
895 2021-05-19  Marek Polacek  <polacek@redhat.com>
896
897         PR c++/100596
898         * cp-tree.h (any_non_type_attribute_p): Remove.
899         * decl.c (grokdeclarator): Turn an error into a warning and only
900         warn for standard attributes.
901         * decl2.c (any_non_type_attribute_p): Remove.
902         * parser.c (cp_parser_elaborated_type_specifier): Turn an error
903         into a warning and only warn for standard attributes.
904         (cp_parser_member_declaration): Likewise.
905
906 2021-05-19  Martin Liska  <mliska@suse.cz>
907
908         PR testsuite/100658
909         * mangle.c (write_encoding): Fix typos.
910
911 2021-05-19  Jakub Jelinek  <jakub@redhat.com>
912
913         PR middle-end/99928
914         * parser.c (cp_parser_omp_master): Set OMP_MASTER_COMBINED on
915         master when combined with taskloop.
916         (cp_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
917         parallel master when not combined with taskloop.
918
919 2021-05-19  Jason Merrill  <jason@redhat.com>
920
921         PR c++/100261
922         * rtti.c (get_tinfo_decl_direct): Check TYPE_TRANSPARENT_AGGR.
923
924 2021-05-19  Jason Merrill  <jason@redhat.com>
925
926         PR c++/100372
927         * tree.c (strip_typedefs): Only look at the pattern of a
928         TYPE_PACK_EXPANSION if it's a type.
929
930 2021-05-18  Marek Polacek  <polacek@redhat.com>
931
932         * class.c (classtype_has_non_deleted_copy_ctor): Remove.
933         * constraint.cc (contains_wildcard_p): Likewise.
934         (get_template_head_requirements): Likewise.
935         (check_constrained_friend): Likewise.
936         (subsumes_constraints): Likewise.
937         * cp-tree.h (classtype_has_non_deleted_copy_ctor): Likewise.
938         (push_void_library_fn): Likewise.
939         (get_pattern_parm): Likewise.
940         (get_template_parms_at_level): Likewise.
941         (lambda_return_type): Likewise.
942         (get_template_head_requirements): Likewise.
943         (check_constrained_friend): Likewise.
944         (subsumes_constraints): Likewise.
945         * decl.c (push_void_library_fn): Likewise.
946         * lambda.c (lambda_return_type): Likewise.
947         * pt.c (get_template_parms_at_level): Likewise.
948         (get_pattern_parm): Likewise.
949
950 2021-05-18  Jason Merrill  <jason@redhat.com>
951
952         PR c++/100644
953         * call.c (perfect_candidate_p): An implicitly deleted move
954         is not perfect.
955
956 2021-05-18  Andreas Krebbel  <krebbel@linux.ibm.com>
957
958         PR c++/100281
959         * cvt.c (cp_convert_to_pointer): Use the size of the target
960         pointer type.
961         * tree.c (cp_build_reference_type): Call
962         cp_build_reference_type_for_mode with VOIDmode.
963         (cp_build_reference_type_for_mode): Rename from
964         cp_build_reference_type.  Add MODE argument and invoke
965         build_reference_type_for_mode.
966         (strip_typedefs): Use build_pointer_type_for_mode and
967         cp_build_reference_type_for_mode for pointers and references.
968
969 2021-05-17  Jonathan Wakely  <jwakely@redhat.com>
970
971         PR c++/100635
972         * call.c (convert_like_internal): Print different diagnostic if
973         the lvalue reference is const.
974
975 2021-05-14  Jason Merrill  <jason@redhat.com>
976
977         PR c++/95870
978         * pt.c (enclosing_instantiation_of): Just compare
979         DECL_SOURCE_LOCATION.
980         (regenerate_decl_from_template): Copy DECL_SOURCE_LOCATION.
981
982 2021-05-14  Marek Polacek  <polacek@redhat.com>
983             Jason Merrill  <jason@redhat.com>
984
985         PR c++/99032
986         * cp-tree.h (any_non_type_attribute_p): Declare.
987         * decl.c (grokdeclarator): Diagnose when an attribute appertains to
988         a friend declaration that is not a definition.
989         * decl2.c (any_non_type_attribute_p): New.
990         * parser.c (cp_parser_decl_specifier_seq): Diagnose standard attributes
991         in the middle of decl-specifiers.
992         (cp_parser_elaborated_type_specifier): Diagnose when an attribute
993         appertains to a friend declaration that is not a definition.
994         (cp_parser_member_declaration): Likewise.
995
996 2021-05-12  Marek Polacek  <polacek@redhat.com>
997
998         * pt.c (tsubst_copy_and_build): Add warn_int_in_bool_context
999         sentinel.
1000
1001 2021-05-12  Marcel Vollweiler  <marcel@codesourcery.com>
1002
1003         * parser.c (cp_parser_omp_clause_map): Support map-type-modifier
1004         'close'.
1005
1006 2021-05-11  Jason Merrill  <jason@redhat.com>
1007
1008         PR c++/100517
1009         * typeck.c (build_reinterpret_cast_1): Check intype on
1010         cast to vector.
1011
1012 2021-05-11  Patrick Palka  <ppalka@redhat.com>
1013
1014         PR c++/51577
1015         * name-lookup.c (maybe_save_operator_binding): Unconditionally
1016         enable for all function templates, not just generic lambdas.
1017         Handle compound-assignment operator expressions.
1018         * typeck.c (build_x_compound_expr): Call maybe_save_operator_binding
1019         in the type-dependent case.
1020         (build_x_modify_expr): Likewise.  Move declaration of 'op' closer
1021         to its first use.
1022
1023 2021-05-11  Patrick Palka  <ppalka@redhat.com>
1024
1025         PR c++/100138
1026         * constraint.cc (tsubst_constraint): Set up cp_unevaluated.
1027         (satisfy_atom): Set up iloc_sentinel before calling
1028         cxx_constant_value.
1029         * pt.c (tsubst_pack_expansion): When returning a rebuilt pack
1030         expansion, carry over PACK_EXPANSION_LOCAL_P and
1031         PACK_EXPANSION_SIZEOF_P from the original pack expansion.
1032
1033 2021-05-10  Richard Biener  <rguenther@suse.de>
1034
1035         PR middle-end/100464
1036         PR c++/100468
1037         * call.c (set_up_extended_ref_temp): Mark the temporary
1038         addressable if the TARGET_EXPR was.
1039
1040 2021-05-10  Martin Liska  <mliska@suse.cz>
1041
1042         * decl.c (duplicate_decls): Use startswith
1043         function instead of strncmp.
1044         (cxx_builtin_function): Likewise.
1045         (omp_declare_variant_finalize_one): Likewise.
1046         (grokfndecl): Likewise.
1047         * error.c (dump_decl_name): Likewise.
1048         * mangle.c (find_decomp_unqualified_name): Likewise.
1049         (write_guarded_var_name): Likewise.
1050         (decl_tls_wrapper_p): Likewise.
1051         * parser.c (cp_parser_simple_type_specifier): Likewise.
1052         (cp_parser_tx_qualifier_opt): Likewise.
1053         * pt.c (template_parm_object_p): Likewise.
1054         (dguide_name_p): Likewise.
1055
1056 2021-05-10  Martin Liska  <mliska@suse.cz>
1057
1058         PR c++/99616
1059         * decl.c (grokdeclarator): Remove redundant NULL check.
1060
1061 2021-05-07  Jason Merrill  <jason@redhat.com>
1062
1063         * tree.c (rvalue): Assert expr is not a class lvalue.
1064
1065 2021-05-07  Jason Merrill  <jason@redhat.com>
1066
1067         * cp-tree.h (build_stub_object): Declare.
1068         * method.c (build_stub_object): No longer static.
1069         * call.c (can_convert): Use it.
1070         * tree.c (build_dummy_object): Adjust comment.
1071         * typeck.c (cp_build_binary_op): Wrap SPACESHIP_EXPR in a
1072         TARGET_EXPR.
1073
1074 2021-05-07  Jason Merrill  <jason@redhat.com>
1075
1076         * coroutines.cc (build_co_await): Don't call 'rvalue'.
1077         (flatten_await_stmt): Simplify initialization.
1078         (morph_fn_to_coro): Change 'rvalue' to 'move'.  Simplify.
1079
1080 2021-05-04  Tobias Burnus  <tobias@codesourcery.com>
1081
1082         * semantics.c (finish_omp_reduction_clause): Accept float + complex
1083         for || and && reductions.
1084
1085 2021-05-03  Patrick Palka  <ppalka@redhat.com>
1086
1087         PR c++/100362
1088         * parser.c (cp_parser_class_head): Reinstate calls to pushclass
1089         and popclass when parsing the base-clause that were removed in
1090         r11-6815.
1091
1092 2021-05-03  Patrick Palka  <ppalka@redhat.com>
1093
1094         PR c++/68942
1095         PR c++/100344
1096         * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: Set tf_conv
1097         only when the callee is a FUNCTION_DECL.
1098
1099 2021-05-03  Marek Polacek  <polacek@redhat.com>
1100
1101         PR c++/100055
1102         * decl.c (grokfndecl): Check current_template_parms.
1103
1104 2021-05-03  Marek Polacek  <polacek@redhat.com>
1105
1106         DR 1312
1107         * constexpr.c (cxx_eval_constant_expression): Don't check
1108         integer_zerop.
1109
1110 2021-05-01  Jason Merrill  <jason@redhat.com>
1111
1112         * cp-tree.h (class ovl_iterator): Allow copying.  Add op==.
1113         (class ovl_range, class lkp_range): New.
1114         * call.c (build_op_call_1, add_candidates): Use them.
1115         (build_op_delete_call, has_trivial_copy_assign_p): Likewise.
1116         (has_trivial_copy_p): Likewise.
1117         * class.c (handle_using_decl, get_basefndecls): Likewise.
1118         (maybe_warn_about_overly_private_class): Likewise.
1119         (warn_hidden, add_implicitly_declared_members): Likewise.
1120         (check_methods, clone_constructors_and_destructors): Likewise.
1121         (type_has_user_nondefault_constructor): Likewise.
1122
1123 2021-04-29  Jason Merrill  <jason@redhat.com>
1124
1125         * constexpr.c (cxx_fold_indirect_ref_1): Only set *empty_base if we
1126         don't find a field.
1127
1128 2021-04-29  Jason Merrill  <jason@redhat.com>
1129
1130         PR c++/51344
1131         * decl2.c (grokfield): Call cplus_decl_attributes for friend.
1132         (save_template_attributes): Use chainon.
1133         * friend.c (do_friend): Remove attrlist parm.
1134         * cp-tree.h (do_friend): Adjust.
1135         * class.c (add_implicitly_declared_members): Adjust.
1136         * decl.c (grokdeclarator): Adjust.
1137         * pt.c (apply_late_template_attributes): Optimize.
1138
1139 2021-04-29  Jason Merrill  <jason@redhat.com>
1140
1141         PR c++/97974
1142         * class.c (finish_struct_anon_r): Drop complain parm.
1143         Remove non-field diagnostic.
1144         (finish_struct_anon): Adjust.
1145         * decl.c (fixup_anonymous_aggr): Move non-field diagnostic here.
1146
1147 2021-04-29  Jason Merrill  <jason@redhat.com>
1148
1149         * cp-tree.h (cp_evaluated): Add reset parm to constructor.
1150         * parser.c (cp_parser_constant_expression): Change
1151         allow_non_constant_p to int.  Use cp_evaluated.
1152         (cp_parser_initializer_clause): Pass 2 to allow_non_constant_p.
1153         * semantics.c (finish_id_expression_1): Don't mess with
1154         cp_unevaluated_operand here.
1155
1156 2021-04-29  Jason Merrill  <jason@redhat.com>
1157
1158         * cp-tree.h: Clarify comments.
1159         * pt.c (get_template_parm_object): Add assert.
1160         * semantics.c (finish_compound_literal): Clear TREE_HAS_CONSTRUCTOR.
1161         * tree.c (zero_init_expr_p): Check TREE_HAS_CONSTRUCTOR.
1162         * typeck2.c (store_init_value): Likewise.
1163
1164 2021-04-29  Patrick Palka  <ppalka@redhat.com>
1165
1166         PR c++/68942
1167         * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: When KOENIG_P,
1168         set tf_conv during the initial substitution into the function.
1169
1170 2021-04-29  Jakub Jelinek  <jakub@redhat.com>
1171
1172         PR c++/100319
1173         * semantics.c (finish_omp_clauses): Fix up check that variable
1174         mentioned in detach clause doesn't appear in data-sharing clauses.
1175
1176 2021-04-28  Jakub Jelinek  <jakub@redhat.com>
1177
1178         * module.cc: Remove #error that triggers if DEV-PHASE is empty.
1179
1180 2021-04-27  Jason Merrill  <jason@redhat.com>
1181
1182         PR c++/92145
1183         * class.c (classtype_has_depr_implicit_copy): Check DECL_CONTEXT
1184         of operator=.
1185
1186 2021-04-27  Patrick Palka  <ppalka@redhat.com>
1187
1188         PR c++/88580
1189         * pt.c (tsubst_initializer_list): Correctly handle the case
1190         where an argument inside a base initializer pack expansion is
1191         itself a pack expansion.
1192
1193 2021-04-26  Patrick Palka  <ppalka@redhat.com>
1194
1195         PR c++/100209
1196         * constexpr.c (cxx_fold_indirect_ref): Try to canonicalize the
1197         object/offset pair for a POINTER_PLUS_EXPR of a COMPONENT_REF
1198         with a negative offset into one whose offset is nonnegative
1199         before calling cxx_fold_indirect_ref_1.
1200
1201 2021-04-24  Patrick Palka  <ppalka@redhat.com>
1202
1203         PR c++/89565
1204         PR c++/93383
1205         PR c++/95291
1206         PR c++/99200
1207         PR c++/99683
1208         * pt.c (do_class_deduction): Punt if the initializer is
1209         type-dependent.
1210
1211 2021-04-24  Patrick Palka  <ppalka@redhat.com>
1212
1213         PR c++/87709
1214         * parser.c (cp_parser_type_id_1): If we see a template
1215         placeholder, first try simulating an error before issuing
1216         a real error.
1217
1218 2021-04-23  Patrick Palka  <ppalka@redhat.com>
1219
1220         PR c++/98767
1221         * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause):
1222         Adjust parameter list loop to iterate over 'types' instead of
1223         'args'.  Output the trailing '...' for a variadic function.
1224         Remove PARM_DECL support.
1225         (pp_cxx_requires_expr): Pretty print the parameter list directly
1226         instead of going through pp_cxx_parameter_declaration_clause.
1227
1228 2021-04-23  Patrick Palka  <ppalka@redhat.com>
1229
1230         DR 2374
1231         * decl.c (is_direct_enum_init): Check the implicit
1232         convertibility requirement added by CWG 2374.
1233
1234 2021-04-23  Martin Liska  <mliska@suse.cz>
1235
1236         * cp-tree.h (STATIC_ASSERT): Prefer static assert.
1237         * lex.c (init_operators): Remove run-time check.
1238
1239 2021-04-22  Marek Polacek  <polacek@redhat.com>
1240
1241         PR c++/100161
1242         * pt.c (tsubst_copy_and_build) <case PLUS_EXPR>: Test op0 and
1243         op1 separately for value- or type-dependence.
1244
1245 2021-04-21  Marek Polacek  <polacek@redhat.com>
1246
1247         PR c++/96380
1248         * parser.c (cp_parser_enum_specifier): Don't allow defining
1249         types in enum-base.
1250
1251 2021-04-21  Martin Liska  <mliska@suse.cz>
1252
1253         Revert:
1254         2021-04-21  Martin Liska  <mliska@suse.cz>
1255
1256         * error.c (dump_decl): Use flags in dump_generic_node call.
1257
1258 2021-04-21  Martin Liska  <mliska@suse.cz>
1259
1260         * error.c (dump_decl): Use flags in dump_generic_node call.
1261
1262 2021-04-21  Martin Liska  <mliska@suse.cz>
1263
1264         * error.c (dump_decl): Support anonymous labels.
1265
1266 2021-04-20  Jason Merrill  <jason@redhat.com>
1267
1268         PR c++/100109
1269         * pt.c (find_parameter_packs_r): Look into enum initializers.
1270
1271 2021-04-19  Marek Polacek  <polacek@redhat.com>
1272
1273         PR c++/97536
1274         * decl.c (grokvardecl): Given an error when a concept is not defined
1275         at namespace scope.
1276
1277 2021-04-16  Jakub Jelinek  <jakub@redhat.com>
1278
1279         PR c++/100111
1280         * constexpr.c (cxx_eval_store_expression): Don't add CONSTRUCTORs
1281         for empty classes into *valp when types don't match even when *valp
1282         is NULL.
1283
1284 2021-04-16  Marek Polacek  <polacek@redhat.com>
1285
1286         PR c++/99803
1287         * decl.c (make_typename_type): Give an error and return when
1288         name is is_overloaded_fn.
1289         * parser.c (cp_parser_class_name): Don't check is_overloaded_fn
1290         before calling make_typename_type.
1291
1292 2021-04-16  Patrick Palka  <ppalka@redhat.com>
1293
1294         PR c++/99700
1295         * constexpr.c (reduced_constant_expression_p): For array
1296         CONSTRUCTORs, use a dedicated loop that additionally verifies
1297         the CONSTRUCTOR spans the entire array.
1298
1299 2021-04-16  Jakub Jelinek  <jakub@redhat.com>
1300
1301         PR c++/99850
1302         * parser.c (cp_parser_constraint_requires_parens) <case CPP_DEREF>:
1303         If lambda_p, return pce_ok instead of pce_maybe_postfix.
1304
1305 2021-04-16  Jakub Jelinek  <jakub@redhat.com>
1306
1307         PR c++/99833
1308         * pt.c (extract_locals_r): When handling DECL_EXPR of a structured
1309         binding, add to data.internal also all corresponding structured
1310         binding decls.
1311
1312 2021-04-16  Jason Merrill  <jason@redhat.com>
1313
1314         PR c++/100079
1315         * cp-tree.h (first_field): Declare.
1316         * mangle.c (range_expr_nelts): New.
1317         (write_expression): Improve class NTTP mangling.
1318         * pt.c (get_template_parm_object): Clear TREE_HAS_CONSTRUCTOR.
1319         * tree.c (zero_init_expr_p): Improve class NTTP handling.
1320         * decl.c: Adjust comment.
1321
1322 2021-04-15  Jason Merrill  <jason@redhat.com>
1323
1324         PR c++/80456
1325         * call.c (build_new_method_call_1): Check again for side-effects
1326         with a volatile object.
1327
1328 2021-04-15  Jason Merrill  <jason@redhat.com>
1329
1330         PR c++/100101
1331         PR c++/99583
1332         * pt.c (find_parameter_packs_r) [FUNCTION_TYPE]: Walk into
1333         TYPE_RAISES_EXCEPTIONS here.
1334         * tree.c (cp_walk_subtrees): Not here.
1335
1336 2021-04-15  Jason Merrill  <jason@redhat.com>
1337
1338         PR c++/100091
1339         PR c++/99478
1340         * parser.c (cp_parser_default_type_template_argument): Set
1341         parser->local_variables_forbidden_p.
1342
1343 2021-04-15  Richard Sandiford  <richard.sandiford@arm.com>
1344
1345         PR c++/98852
1346         * typeck.c (merge_type_attributes_from): New function.
1347         (cp_common_type): Use it for vector types.
1348
1349 2021-04-14  Jason Merrill  <jason@redhat.com>
1350
1351         PR c++/100078
1352         PR c++/93085
1353         * pt.c (uses_outer_template_parms): Also look at default
1354         template argument.
1355
1356 2021-04-14  Jason Merrill  <jason@redhat.com>
1357
1358         PR c++/93314
1359         * semantics.c (finish_id_expression_1): Clear cp_unevaluated_operand
1360         for a non-static data member in a constant-expression.
1361
1362 2021-04-14  Patrick Palka  <ppalka@redhat.com>
1363
1364         PR c++/83476
1365         PR c++/99885
1366         * pt.c (deducible_expression): Look through implicit
1367         INDIRECT_REFs as well.
1368
1369 2021-04-14  Jason Merrill  <jason@redhat.com>
1370
1371         PR c++/99478
1372         * parser.c (cp_parser_lambda_expression): Reject lambda
1373         in template parameter type.
1374
1375 2021-04-14  Jason Merrill  <jason@redhat.com>
1376
1377         PR c++/90674
1378         * decl.c (duplicate_decls): Don't propagate
1379         DECL_INITIALIZED_IN_CLASS_P to a specialization.
1380
1381 2021-04-14  Jason Merrill  <jason@redhat.com>
1382
1383         PR c++/88742
1384         PR c++/49951
1385         PR c++/58123
1386         * semantics.c (set_cleanup_locs): New.
1387         (do_poplevel): Call it.
1388         * parser.c (cp_parser_compound_statement): Consume the }
1389         before finish_compound_stmt.
1390
1391 2021-04-13  Jason Merrill  <jason@redhat.com>
1392
1393         PR c++/100032
1394         * pt.c (get_underlying_template): Compare TYPE_QUALS.
1395
1396 2021-04-13  Jason Merrill  <jason@redhat.com>
1397
1398         PR c++/100054
1399         PR c++/90479
1400         * init.c (get_nsdmi): Do more context adjustment for local classes.
1401
1402 2021-04-13  Patrick Palka  <ppalka@redhat.com>
1403
1404         PR c++/99008
1405         * pt.c (do_class_deduction): Reject alias CTAD in C++17 mode
1406         rather than issuing a pedwarn.
1407         * typeck2.c (build_functional_cast_1): Handle CTAD uniformly
1408         for consistent diagnostics.
1409
1410 2021-04-13  Jason Merrill  <jason@redhat.com>
1411
1412         PR c++/91933
1413         * class.c (build_base_path): Shortcut simple non-pointer case.
1414
1415 2021-04-13  Eric Botcazou  <ebotcazou@adacore.com>
1416
1417         * module.cc (ordinary_loc_of): Test LINEMAPS_MACRO_LOWEST_LOCATION
1418         of the linemap.
1419         (module_state::write_location): Likewise.
1420
1421 2021-04-13  Patrick Palka  <ppalka@redhat.com>
1422
1423         PR c++/97134
1424         * pt.c (do_class_deduction): Look through EXPR_PACK_EXPANSION
1425         when checking if the initializer is an equivalent class
1426         placeholder template parameter.
1427
1428 2021-04-13  Patrick Palka  <ppalka@redhat.com>
1429
1430         PR c++/99961
1431         PR c++/99994
1432         * constraint.cc (satisfy_normalized_constraints): Set
1433         cp_unevaluated.
1434         * parser.c (cp_parser_concept_definition): Likewise.
1435         (cp_parser_requires_clause_opt): Likewise.
1436
1437 2021-04-12  Jason Merrill  <jason@redhat.com>
1438
1439         PR c++/93085
1440         * pt.c (uses_outer_template_parms): Handle non-type and template
1441         template parameters specifically.
1442
1443 2021-04-11  Jason Merrill  <jason@redhat.com>
1444
1445         PR c++/97974
1446         * decl.c (fixup_anonymous_aggr): Prune all functions from
1447         CLASSTYPE_MEMBER_VEC.
1448
1449 2021-04-10  Jason Merrill  <jason@redhat.com>
1450
1451         PR c++/98800
1452         PR c++/97399
1453         * parser.c (cp_parser_direct_declarator): Don't
1454         inject_this_parameter if static_p.
1455         (cp_parser_omp_var_list_no_open): Parse 'this' even if
1456         current_class_ptr isn't set for a better diagnostic.
1457
1458 2021-04-10  Jason Merrill  <jason@redhat.com>
1459
1460         PR c++/99180
1461         PR c++/93295
1462         PR c++/93867
1463         PR c++/99118
1464         PR c++/96873
1465         * pt.c (alias_ctad_tweaks): Handle failure better.
1466
1467 2021-04-10  Jason Merrill  <jason@redhat.com>
1468
1469         PR c++/100006
1470         * pt.c (find_parameter_packs_r) [TAG_DEFN]: Look into bases.
1471
1472 2021-04-09  Patrick Palka  <ppalka@redhat.com>
1473
1474         * cp-tree.h (LAMBDA_EXPR_REGENERATED_FROM)
1475         (LAMBDA_EXPR_REGENERATING_TARGS): Replace these with ...
1476         (LAMBDA_EXPR_REGEN_INFO): ... this.
1477         (tree_lambda_expr::regenerated_from)
1478         (tree_lambda_expr::regenerating_targs): Replace these with ...
1479         (tree_lambda_expr::regen_info): ... this.
1480         * constraint.cc (satisfy_declaration_constraints): Adjust
1481         accordingly.
1482         * lambda.c (build_lambda_expr): Likewise.
1483         * pt.c (regenerated_lambda_fn_p): Likewise.
1484         (most_general_lambda): Likewise.
1485         (tsubst_lambda_expr): Likewise.
1486
1487 2021-04-09  Marek Polacek  <polacek@redhat.com>
1488
1489         PR c++/99806
1490         * parser.c (cp_parser_member_declaration): Call
1491         cp_parser_save_default_args even for function templates.  Use
1492         STRIP_TEMPLATE on the declaration we're passing.
1493
1494 2021-04-08  Patrick Palka  <ppalka@redhat.com>
1495
1496         PR c++/99874
1497         * constraint.cc (get_normalized_constraints_from_decl): Handle
1498         regenerated lambdas.
1499         (satisfy_declaration_constraints): Likewise.  Check for
1500         dependent args later.
1501         * cp-tree.h (LAMBDA_EXPR_INSTANTIATED): Replace with ...
1502         (LAMBDA_EXPR_REGENERATED_FROM): ... this.
1503         (LAMBDA_EXPR_REGENERATING_TARGS): New.
1504         (tree_lambda_expr::regenerated_from): New data member.
1505         (tree_lambda_expr::regenerating_targs): New data member.
1506         (add_to_template_args): Declare.
1507         (regenerated_lambda_fn_p): Likewise.
1508         (most_general_lambda): Likewise.
1509         * lambda.c (build_lambda_expr): Set LAMBDA_EXPR_REGENERATED_FROM
1510         and LAMBDA_EXPR_REGENERATING_TARGS.
1511         * pt.c (add_to_template_args): No longer static.
1512         (tsubst_function_decl): Unconditionally propagate constraints on
1513         the substituted function decl.
1514         (instantiated_lambda_fn_p): Rename to ...
1515         (regenerated_lambda_fn_p): ... this.  Check
1516         LAMBDA_EXPR_REGENERATED_FROM instead of
1517         LAMBDA_EXPR_INSTANTIATED.
1518         (most_general_lambda): Define.
1519         (enclosing_instantiation_of): Adjust after renaming
1520         instantiated_lambda_fn_p.
1521         (tsubst_lambda_expr): Don't set LAMBDA_EXPR_INSTANTIATED.  Set
1522         LAMBDA_EXPR_REGENERATED_FROM and LAMBDA_EXPR_REGENERATING_TARGS.
1523         Don't substitute or set constraints on the regenerated lambda.
1524
1525 2021-04-08  Patrick Palka  <ppalka@redhat.com>
1526
1527         PR c++/97679
1528         * pt.c (build_deduction_guide): Document OUTER_ARGS.  Substitute
1529         them into the propagated constraints.
1530
1531 2021-04-08  Jason Merrill  <jason@redhat.com>
1532
1533         PR c++/91849
1534         * call.c (convert_like_internal): Improve reference diagnostic.
1535
1536 2021-04-08  Jakub Jelinek  <jakub@redhat.com>
1537
1538         PR c++/99859
1539         * constexpr.c (addr_of_non_const_var): New function.
1540         (cxx_bind_parameters_in_call): Set *non_constant_args to true
1541         even if cp_walk_tree on arg with addr_of_non_const_var callback
1542         returns true.
1543
1544 2021-04-08  Jason Merrill  <jason@redhat.com>
1545
1546         PR c++/94529
1547         * pt.c (determine_specialization): Improve diagnostic.
1548
1549 2021-04-08  Marek Polacek  <polacek@redhat.com>
1550
1551         PR c++/99844
1552         * decl.c (build_explicit_specifier): Call
1553         check_for_bare_parameter_packs.
1554         * except.c (build_noexcept_spec): Likewise.
1555
1556 2021-04-07  Jason Merrill  <jason@redhat.com>
1557
1558         PR c++/41723
1559         * parser.c (cp_parser_class_name): Check dependent_scope_p.
1560
1561 2021-04-07  Jason Merrill  <jason@redhat.com>
1562
1563         PR c++/52625
1564         * pt.c (maybe_process_partial_specialization): Check
1565         DECL_SELF_REFERENCE_P.
1566
1567 2021-04-07  Jason Merrill  <jason@redhat.com>
1568
1569         PR c++/92918
1570         * name-lookup.c (push_class_level_binding_1): Do overload a new
1571         function with a previous using-declaration.
1572
1573 2021-04-06  Jason Merrill  <jason@redhat.com>
1574
1575         PR c++/96673
1576         * init.c (get_nsdmi): Don't defer access checking.
1577
1578 2021-04-06  Jason Merrill  <jason@redhat.com>
1579
1580         PR c++/99901
1581         * decl.c (cp_finish_decl): mark_needed an implicitly inline
1582         static data member with an out-of-class redeclaration.
1583
1584 2021-04-06  Jason Merrill  <jason@redhat.com>
1585
1586         PR c++/91241
1587         * mangle.c (write_compact_number): Add sanity check.
1588         (write_local_name): Use list_length for parm number.
1589
1590 2021-04-06  Patrick Palka  <ppalka@redhat.com>
1591
1592         PR c++/99899
1593         * pt.c (do_auto_deduction): Don't exit early when deducing the
1594         array type of a structured binding.  Also handle adc_decomp_type
1595         during constraint checking.
1596
1597 2021-04-05  Jason Merrill  <jason@redhat.com>
1598
1599         PR c++/96311
1600         * typeck.c (check_return_expr): Call mark_exp_read in dependent
1601         case.
1602
1603 2021-04-05  Jason Merrill  <jason@redhat.com>
1604
1605         PR c++/98440
1606         * typeck.c (build_reinterpret_cast_1): Don't perform
1607         temporary materialization.
1608
1609 2021-04-05  Jason Merrill  <jason@redhat.com>
1610
1611         PR c++/95317
1612         * pt.c (lookup_template_class_1): Do tsubst_enum when
1613         tsubsting a generic lambda.
1614
1615 2021-04-05  Jason Merrill  <jason@redhat.com>
1616
1617         PR c++/95870
1618         * pt.c (enclosing_instantiation_of): Compare DECL_SOURCE_LOCATION if
1619         there is no enclosing non-lambda function.
1620
1621 2021-04-05  Nathan Sidwell  <nathan@acm.org>
1622
1623         PR c++/99380
1624         * module.cc (name_pending_imports): Drop 'atend' parm.  Don't
1625         query export when not needed.
1626         (preprocess_module, preprocessed_module): Adjust.
1627
1628 2021-04-05  Jason Merrill  <jason@redhat.com>
1629
1630         PR c++/99066
1631         * pt.c (mark_decl_instantiated): Set DECL_EXTERNAL.
1632
1633 2021-04-05  Jason Merrill  <jason@redhat.com>
1634
1635         PR c++/99201
1636         * pt.c (class el_data): Add visited field.
1637         (extract_local_specs): Pass it to cp_walk_tree.
1638         (extract_locals_r): Walk into the body of a lambda.
1639
1640 2021-04-05  Jason Merrill  <jason@redhat.com>
1641
1642         * ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P on
1643         template result.
1644
1645 2021-04-04  Jason Merrill  <jason@redhat.com>
1646
1647         PR c++/99643
1648         * typeck2.c (massage_init_elt): Don't strip TARGET_EXPR.
1649
1650 2021-04-03  Marek Polacek  <polacek@redhat.com>
1651
1652         PR c++/91416
1653         * parser.c: Create a GC root for attributes in a decl specifier.
1654         (cp_parser_type_specifier): Push/pop ->attributes onto/from it.
1655
1656 2021-04-03  Jason Merrill  <jason@redhat.com>
1657
1658         PR c++/91217
1659         * pt.c (tsubst_lambda_expr): Skip the body block from
1660         DECL_SAVED_TREE.
1661
1662 2021-04-03  Jason Merrill  <jason@redhat.com>
1663
1664         PR c++/90664
1665         * cvt.c (can_convert_qual): Check fnptr_conv_p.
1666
1667 2021-04-03  Jason Merrill  <jason@redhat.com>
1668
1669         PR c++/97900
1670         * pt.c (regenerate_decl_from_template): tsubst_decl
1671         the parms.
1672
1673 2021-04-02  Patrick Palka  <ppalka@redhat.com>
1674
1675         PR c++/99869
1676         * parser.c (do_range_for_auto_deduction): Pass adc_variable_type
1677         to do_auto_deduction.
1678
1679 2021-04-02  Patrick Palka  <ppalka@redhat.com>
1680
1681         PR c++/99586
1682         * semantics.c (finish_compound_literal): Check
1683         template_placeholder_p instead of type_uses_auto.
1684
1685 2021-04-02  Jason Merrill  <jason@redhat.com>
1686
1687         PR c++/97938
1688         * cp-tree.h (PACK_EXPANSION_AUTO_P): New.
1689         * lambda.c (add_capture): Set it.
1690         * pt.c (tsubst_pack_expansion): Handle it.
1691
1692 2021-04-02  Nathan Sidwell  <nathan@acm.org>
1693
1694         * cp-tree.h (lang_decl_base): Correct module flag comment.
1695         * module.cc (trees_in::assert_definition): Break out
1696         not_tmpl var.
1697         (trees_out::lang_decl_bools): Do not write purview for header units.
1698
1699 2021-04-01  Marek Polacek  <polacek@redhat.com>
1700
1701         PR c++/99831
1702         * method.c (defaulted_late_check): ++ and -- function_depth around
1703         the call to synthesize_method.
1704         * pt.c: Remove the saved_trees global.
1705
1706 2021-04-01  Jason Merrill  <jason@redhat.com>
1707
1708         PR c++/99583
1709         PR c++/99584
1710         * tree.c (cp_walk_subtrees) [FUNCTION_TYPE]: Walk into
1711         TYPE_RAISES_EXCEPTIONS.
1712
1713 2021-04-01  Iain Sandoe  <iain@sandoe.co.uk>
1714
1715         * mapper-client.cc (INCLUDE_MAP): New; require map to be
1716         included from system.h.
1717         * mapper-resolver.cc (INCLUDE_MAP): Likewise.
1718
1719 2021-04-01  Jason Merrill  <jason@redhat.com>
1720
1721         PR c++/98481
1722         * mangle.c (write_expression): Adjust.
1723         * class.c (find_abi_tags_r): Disable PR98481 fix for ABI v14.
1724         (mark_abi_tags_r): Likewise.
1725
1726 2021-04-01  Nathan Sidwell  <nathan@acm.org>
1727
1728         PR c++/99283
1729         * module.cc (trees_out::decl_node): Adjust importedness reference
1730         assert.
1731         (module_state::intercluster_seed): New.  Seed both imports and
1732         inter-cluster references.  Broken out of ...
1733         (module_state::write_cluster): ... here.  Call it.
1734
1735 2021-03-31  Jason Merrill  <jason@redhat.com>
1736
1737         PR c++/99445
1738         * tree.c (strip_typedefs): Handle TYPE_PACK_EXPANSION.
1739
1740 2021-03-31  Patrick Palka  <ppalka@redhat.com>
1741
1742         PR c++/88115
1743         * mangle.c (write_expression): Adjust the mangling of
1744         __alignof__.
1745
1746 2021-03-31  Patrick Palka  <ppalka@redhat.com>
1747
1748         PR c++/99815
1749         * pt.c (placeholder_type_constraint_dependent_p): Expand
1750         argument packs to separate the first non-pack argument
1751         from the rest.
1752
1753 2021-03-30  Nathan Sidwell  <nathan@acm.org>
1754
1755         PR c++/99283
1756         * module.cc (dumper::operator): Make less brittle.
1757         (trees_out::core_bools): VAR_DECLs always have a context.
1758         (trees_out::key_mergeable): Use same_type_p for asserting.
1759         (trees_in::read_var_def): Propagate
1760         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1761
1762 2021-03-30  Jakub Jelinek  <jakub@redhat.com>
1763
1764         PR c++/99790
1765         * cp-gimplify.c (cp_gimplify_expr): Handle PTRMEM_CST.
1766
1767 2021-03-26  Marek Polacek  <polacek@redhat.com>
1768
1769         PR c++/98352
1770         * method.c (implicitly_declare_fn): Pass &raises to
1771         synthesized_method_walk.
1772
1773 2021-03-26  Nathan Sidwell  <nathan@acm.org>
1774
1775         PR c++/99283
1776         * cp-tree.h (DECL_MODULE_CHECK): Ban TEMPLATE_DECL.
1777         (SET_TYPE_TEMPLATE_INFO): Restore Alias template setting.
1778         * decl.c (duplicate_decls): Remove template_decl module flag
1779         propagation.
1780         * module.cc (merge_kind_name): Add alias tmpl spec as a thing.
1781         (dumper::impl::nested_name): Adjust for template-decl module flag
1782         change.
1783         (trees_in::assert_definition): Likewise.
1784         (trees_in::install_entity): Likewise.
1785         (trees_out::decl_value): Likewise.  Remove alias template
1786         separation of template and type_decl.
1787         (trees_in::decl_value): Likewise.
1788         (trees_out::key_mergeable): Likewise,
1789         (trees_in::key_mergeable): Likewise.
1790         (trees_out::decl_node): Adjust for template-decl module flag
1791         change.
1792         (depset::hash::make_dependency): Likewise.
1793         (get_originating_module, module_may_redeclare): Likewise.
1794         (set_instantiating_module, set_defining_module): Likewise.
1795         * name-lookup.c (name_lookup::search_adl): Likewise.
1796         (do_pushdecl): Likewise.
1797         * pt.c (build_template_decl): Likewise.
1798         (lookup_template_class_1): Remove special alias_template handling
1799         of DECL_TI_TEMPLATE.
1800         (tsubst_template_decl): Likewise.
1801
1802 2021-03-26  Jakub Jelinek  <jakub@redhat.com>
1803
1804         PR c++/99705
1805         * tree.c (bot_manip): Remap artificial automatic temporaries mentioned
1806         in DECL_EXPR or in BIND_EXPR_VARS.
1807
1808 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
1809
1810         PR c++/99672
1811         * parser.c (cp_parser_postfix_expression): For calls, create
1812         combined_loc and temporarily set input_location to it before
1813         calling finish_call_expr.
1814
1815 2021-03-25  Marek Polacek  <polacek@redhat.com>
1816
1817         PR c++/94751
1818         * call.c (build_over_call): Maybe call mark_used in case
1819         deduce_inheriting_ctor fails and return error_mark_node.
1820         * cp-tree.h (deduce_inheriting_ctor): Adjust declaration.
1821         * method.c (deduce_inheriting_ctor): Return bool if the deduction
1822         fails.
1823         (implicitly_declare_fn): If raises is error_mark_node, call
1824         synthesized_method_walk with diag being true.
1825
1826 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
1827
1828         PR c++/99745
1829         * decl2.c (grokbitfield): Diagnose bitfields containing bare parameter
1830         packs and don't set DECL_BIT_FIELD_REPRESENTATIVE in that case.
1831
1832 2021-03-25  Marek Polacek  <polacek@redhat.com>
1833
1834         PR c++/99331
1835         * call.c (build_converted_constant_expr_internal): Don't emit
1836         -Wconversion warnings.
1837
1838 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
1839
1840         PR c++/99565
1841         * call.c (build_conditional_expr_1): Pass OEP_ADDRESS_OF_SAME_FIELD
1842         to operand_equal_p.
1843         * cvt.c (convert_to_void): Preserve location_t on COND_EXPR or
1844         or COMPOUND_EXPR.
1845
1846 2021-03-23  Nathan Sidwell  <nathan@acm.org>
1847
1848         PR c++/99283
1849         * name-lookup.c (check_module_override): Set global or partition
1850         DUP on the binding vector.
1851
1852 2021-03-23  Marek Polacek  <polacek@redhat.com>
1853
1854         PR c++/99318
1855         * decl2.c (cp_warn_deprecated_use_scopes): Only call
1856         cp_warn_deprecated_use when decl is a namespace, class, or enum.
1857
1858 2021-03-23  Nathan Sidwell  <nathan@acm.org>
1859
1860         PR c++/99239
1861         * decl.c (duplicate_decls): Remove assert about maybe-imported
1862         artificial decls.
1863
1864 2021-03-23  Jakub Jelinek  <jakub@redhat.com>
1865
1866         PR c++/99650
1867         * decl.c (cp_finish_decomp): Diagnose void initializers when
1868         using tuple_element and get.
1869
1870 2021-03-22  Nathan Sidwell  <nathan@acm.org>
1871
1872         PR c++/99480
1873         * module.cc (depset::hash::make_dependency): Propagate flags for
1874         partial specialization.
1875         (module_may_redeclare): Handle partial specialization.
1876
1877 2021-03-22  Nathan Sidwell  <nathan@acm.org>
1878
1879         PR c++/99425
1880         * cp-tree.h (map_context_from, map_context_to): Delete.
1881         (add_mergeable_specialization): Add is_alias parm.
1882         * pt.c (add_mergeable_specialization): Add is_alias parm, add them.
1883         * module.cc (map_context_from, map_context_to): Delete.
1884         (trees_in::decl_value): Add specializations later, adjust call.
1885         Drop useless alias lookup. Set duplicate fn parm context.
1886         (check_mergeable_decl): Drop context mapping.
1887         (trees_in::is_matching_decl): Likewise.
1888         (trees_in::read_function_def): Drop parameter context adjustment
1889         here.
1890
1891 2021-03-22  Martin Liska  <mliska@suse.cz>
1892
1893         PR c++/99687
1894         * module.cc (fini_modules): Call vec_free instead of delete.
1895
1896 2021-03-20  Jakub Jelinek  <jakub@redhat.com>
1897
1898         PR debug/99230
1899         * cp-gimplify.c (cp_genericize_r) <case STATEMENT_LIST>: Remove
1900         special code, instead call c_genericize_control_stmt.
1901
1902 2021-03-19  Jakub Jelinek  <jakub@redhat.com>
1903
1904         PR c++/99456
1905         * constexpr.c (cxx_eval_constant_expression): For CONVERT_EXPR from
1906         INDIRECT_TYPE_P to ARITHMETIC_TYPE_P, when !ctx->manifestly_const_eval
1907         don't diagnose it, set *non_constant_p nor return t.
1908
1909 2021-03-19  Marek Polacek  <polacek@redhat.com>
1910
1911         PR c++/99500
1912         * parser.c (cp_parser_requirement_parameter_list): Handle
1913         error_mark_node.
1914
1915 2021-03-18  Marek Polacek  <polacek@redhat.com>
1916
1917         * pt.c (tsubst_copy_and_build) <case FLOAT_EXPR>: Remove.
1918
1919 2021-03-18  Marek Polacek  <polacek@redhat.com>
1920
1921         * pt.c (tsubst_copy_and_build): Add assert.
1922
1923 2021-03-18  Iain Sandoe  <iain@sandoe.co.uk>
1924
1925         PR objc++/49070
1926         * parser.c (cp_debug_parser): Add Objective-C++ message
1927         state flag.
1928         (cp_parser_nested_name_specifier_opt): Allow colon to
1929         terminate an assignment-expression when parsing Objective-
1930         C++ messages.
1931         (cp_parser_objc_message_expression): Set and clear message
1932         parsing state on entry and exit.
1933         * parser.h (struct cp_parser): Add a context flag for
1934         Objective-C++ message state.
1935
1936 2021-03-18  Martin Liska  <mliska@suse.cz>
1937
1938         PR c++/99617
1939         * coroutines.cc (struct var_nest_node): Init then_cl and else_cl
1940         to NULL.
1941
1942 2021-03-17  Marek Polacek  <polacek@redhat.com>
1943
1944         PR c++/97973
1945         * call.c (conv_unsafe_in_template_p): New.
1946         (convert_like): Use it.
1947
1948 2021-03-17  Anthony Sharp  <anthonysharp15@gmail.com>
1949             Jason Merrill  <jason@redhat.com>
1950
1951         * semantics.c (get_class_access_diagnostic_decl): New
1952         function that examines special cases when a parent
1953         class causes a private access failure.
1954         (enforce_access): Slightly modified to call function
1955         above.
1956
1957 2021-03-16  Jason Merrill  <jason@redhat.com>
1958
1959         * tree.c (cp_tree_equal): Use real_identical.
1960
1961 2021-03-16  Jakub Jelinek  <jakub@redhat.com>
1962
1963         PR c++/99613
1964         * decl.c (expand_static_init): For thread guards, call __cxa_atexit
1965         before calling __cxa_guard_release rather than after it.  Formatting
1966         fixes.
1967
1968 2021-03-16  Martin Liska  <mliska@suse.cz>
1969             Jason Merrill  <jason@redhat.com>
1970
1971         PR c++/99108
1972         * call.c (get_function_version_dispatcher): Handle
1973         DECL_LOCAL_DECL_P.
1974         * decl.c (maybe_version_functions): Likewise.
1975         (maybe_mark_function_versioned): New.
1976         * name-lookup.c (push_local_extern_decl_alias): No longer static.
1977         * name-lookup.h (push_local_extern_decl_alias): Adjust.
1978
1979 2021-03-16  Nathan Sidwell  <nathan@acm.org>
1980
1981         PR c++/99496
1982         * module.cc (trees_out::decl_value): Adjust typedef streaming,
1983         indicate whether it is a dependent alias.
1984         (trees_in::decl_value): Likewise.  Set as dependent alias, if it
1985         is one.
1986
1987 2021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
1988
1989         PR c++/99047
1990         * coroutines.cc (expand_one_await_expression): If the
1991         await_ready() expression is not a boolean then convert it
1992         as required.
1993
1994 2021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
1995
1996         PR c++/98704
1997         * coroutines.cc (build_actor_fn): Make destroy index 1
1998         correspond to the abnormal unhandled_exception() exit.
1999         Substitute the proxy for the resume index.
2000         (coro_rewrite_function_body): Arrange to reset the resume
2001         index and make done = true for a rethrown exception from
2002         unhandled_exception ().
2003         (morph_fn_to_coro): Adjust calls to build_actor_fn and
2004         coro_rewrite_function_body.
2005
2006 2021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
2007
2008         PR c++/98480
2009         * coroutines.cc (replace_continue): Rewrite continue into
2010         'goto label'.
2011         (await_statement_walker): Handle await expressions in the
2012         initializer, condition and iteration expressions of for
2013         loops.
2014
2015 2021-03-15  Iain Sandoe  <iain@sandoe.co.uk>
2016
2017         PR c++/96749
2018         * coroutines.cc (flatten_await_stmt): Allow for the case
2019         where a target expression variable only has uses in the
2020         second part of a compound expression.
2021         (maybe_promote_temps): Avoid emiting empty statements.
2022
2023 2021-03-15  Tobias Burnus  <tobias@codesourcery.com>
2024
2025         PR c++/99509
2026         * decl.c (cp_finish_decl): For 'omp declare target implicit' vars,
2027         ensure that the varpool node is marked as offloadable.
2028
2029 2021-03-12  Nathan Sidwell  <nathan@acm.org>
2030
2031         PR c++/99238
2032         * module.cc (depset::hash::add_binding_entity): Assert not
2033         visited.
2034         (depset::add::add_specializations): Likewise.
2035         * name-lookup.c (name_lookup::dedup): New.
2036         (name_lookup::~name_lookup): Assert not deduping.
2037         (name_lookup::restore_state): Likewise.
2038         (name_lookup::add_overload): Replace outlined code with dedup
2039         call.
2040         (name_lookup::add_value): Likewise.
2041         (name_lookup::search_namespace_only): Likewise.
2042         (name_lookup::adl_namespace_fns): Likewise.
2043         (name_lookup::adl_class_fns): Likewise.
2044         (name_lookup::search_adl): Likewise.  Add clearing dedup call.
2045         (name_lookup::search_qualified): Likewise.
2046         (name_lookup::search_unqualified): Likewise.
2047
2048 2021-03-12  Jakub Jelinek  <jakub@redhat.com>
2049
2050         PR c++/99507
2051         * call.c (build_over_call): For immediate evaluation of functions
2052         that return references, undo convert_from_reference effects before
2053         calling cxx_constant_value and call convert_from_reference
2054         afterwards.
2055
2056 2021-03-11  Nathan Sidwell  <nathan@acm.org>
2057
2058         PR c++/99248
2059         * name-lookup.c (lookup_elaborated_type_1): Access slot not bind
2060         when there's a binding vector.
2061         * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.
2062
2063 2021-03-11  Nathan Sidwell  <nathan@acm.org>
2064
2065         PR c++/99528
2066         * module.cc (enum merge_kind): Delete MK_type_tmpl_spec,
2067         MK_decl_tmpl_spec.
2068         (trees_in::decl_value): Adjust add_mergeable_specialization call.
2069         (trees_out::get_merge_kind): Adjust detecting a partial template
2070         instantiation.
2071         (trees_out::key_mergeable): Adjust handling same.
2072         (trees_in::key_mergeabvle): Likewise.
2073
2074 2021-03-10  Nathan Sidwell  <nathan@acm.org>
2075
2076         PR c++/99423
2077         * module.cc (post_load_processing): Assert not gcable.
2078         (laxy_load_pendings): Extend no-gc region around
2079         post_load_processing.
2080
2081 2021-03-10  Nathan Sidwell  <nathan@acm.org>
2082
2083         PR c++/99508
2084         * decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's
2085         assembler name to the ns alias.
2086
2087 2021-03-09  Jakub Jelinek  <jakub@redhat.com>
2088
2089         PR c++/99459
2090         * coroutines.cc (build_co_await): Look through NOP_EXPRs in
2091         build_special_member_call return value to find the CALL_EXPR.
2092         Simplify.
2093
2094 2021-03-09  Nathan Sidwell  <nathan@acm.org>
2095
2096         PR c++/99472
2097         * parser.c (cp_parser_diagnose_invalid_type_name): Clarify
2098         that C++20 does not yet imply modules.
2099
2100 2021-03-08  Nathan Sidwell  <nathan@acm.org>
2101
2102         PR c++/99436
2103         * name-lookup.c (get_cxx_dialect_name): Add cxx23.
2104
2105 2021-03-08  Nathan Sidwell  <nathan@acm.org>
2106
2107         * lex.c (module_token_filter::resume): Ignore module-decls inside
2108         header-unit.
2109         * parser.c (cp_parser_module_declaration): Reject in header-unit.
2110
2111 2021-03-08  Nathan Sidwell  <nathan@acm.org>
2112
2113         PR c++/99285
2114         * cp-tree.h (match_mergeable_specialization)
2115         (add_mergeable_specialization): Adjust parms.
2116         * module.cc (trees_in::decl_value): Adjust
2117         add_mergeable_specialization calls.
2118         (trees_out::key_mergeable): Adjust match_mergeable_specialization
2119         calls.
2120         (specialization_add): Likewise.
2121         * pt.c (match_mergeable_specialization): Do not insert.
2122         (add_mergeable_specialization): Add to hash table here.
2123
2124 2021-03-06  Patrick Palka  <ppalka@redhat.com>
2125             Jakub Jelinek  <jakub@redhat.com>
2126
2127         PR c++/99287
2128         * constexpr.c (cxx_eval_increment_expression): Pass lval when
2129         evaluating the MODIFY_EXPR, and update 'mod' with the result of
2130         this evaluation.  Check *non_constant_p afterwards.  For prefix
2131         ops, just return 'mod'.
2132
2133 2021-03-06  Patrick Palka  <ppalka@redhat.com>
2134             Jakub Jelinek  <jakub@redhat.com>
2135
2136         PR c++/96330
2137         * pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
2138         variable 'fn' to 'tmpl'.  Handle a variable template-id by
2139         calling lookup_template_variable.
2140
2141 2021-03-06  Patrick Palka  <ppalka@redhat.com>
2142
2143         PR c++/99365
2144         * pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
2145         outer_targs to do_auto_deduction.
2146         (placeholder_type_constraint_dependent_p): Define.
2147         (do_auto_deduction): When processing_template_decl != 0
2148         and context is adc_unify and we have constraints, pretend the
2149         constraints are satisfied instead of punting.  Otherwise don't
2150         punt unless placeholder_type_constraint_dependent_p holds.
2151         Add some clarifying sanity checks.  Add a hack to add missing
2152         outermost template levels to outer_args before checking
2153         satisfaction.  Don't substitute outer_targs into type if it's
2154         already been done.
2155
2156 2021-03-05  Marek Polacek  <polacek@redhat.com>
2157
2158         PR c++/99374
2159         * call.c (standard_conversion): When converting pointers to
2160         member, don't return NULL when the bases are equivalent but
2161         incomplete.
2162
2163 2021-03-05  Marek Polacek  <polacek@redhat.com>
2164
2165         PR c++/99120
2166         * name-lookup.c (check_local_shadow): Check if the type of decl
2167         is non-null before checking TYPE_PTR*.
2168
2169 2021-03-05  Nathan Sidwell  <nathan@acm.org>
2170
2171         PR c++/99245
2172         * module.cc (module_state::write_cluster): Relax binding assert.
2173
2174 2021-03-05  Nathan Sidwell  <nathan@acm.org>
2175
2176         PR c++/99377
2177         * pt.c (instantiate_decl): Call set_instantiating_module.
2178
2179 2021-03-05  Iain Sandoe  <iain@sandoe.co.uk>
2180
2181         PR c++/98118
2182         * coroutines.cc (build_co_await): Use type_build_ctor_call()
2183         to determine cases when a CTOR needs to be built.
2184         (flatten_await_stmt): Likewise.
2185         (morph_fn_to_coro): Likewise.
2186
2187 2021-03-05  Iain Sandoe  <iain@sandoe.co.uk>
2188
2189         PR c++/95616
2190         * coroutines.cc (coro_diagnose_throwing_fn): New helper.
2191         (coro_diagnose_throwing_final_aw_expr): New helper.
2192         (build_co_await): Diagnose throwing final await expression
2193         components.
2194         (build_init_or_final_await): Diagnose a throwing promise
2195         final_suspend() call.
2196
2197 2021-03-05  Iain Sandoe  <iain@sandoe.co.uk>
2198
2199         PR c++/95615
2200         * coroutines.cc (struct param_info): Track parameter copies that need
2201         a DTOR.
2202         (coro_get_frame_dtor): New helper function factored from build_actor().
2203         (build_actor_fn): Use coro_get_frame_dtor().
2204         (morph_fn_to_coro): Track parameters that need DTORs on exception,
2205         likewise the frame promise and the return object.  On exception, run the
2206         DTORs for these, destroy the frame and then rethrow the exception.
2207
2208 2021-03-05  Nathan Sidwell  <nathan@acm.org>
2209
2210         PR c++/99389
2211         * pt.c (instantiate_class_template_1): Set instantiating module
2212         here.
2213
2214 2021-03-05  Tobias Burnus  <tobias@codesourcery.com>
2215
2216         PR c/99137
2217         * parser.c (cp_parser_oacc_clause_async): Reject comma expressions.
2218
2219 2021-03-04  Jakub Jelinek  <jakub@redhat.com>
2220
2221         PR c++/88146
2222         PR c++/99362
2223         * cvt.c (convert_to_void): Revert 2019-10-17 changes.  Clarify
2224         comment.
2225
2226 2021-03-04  Nathan Sidwell  <nathan@acm.org>
2227
2228         PR c++/99170
2229         * module.cc (class uintset): Delete.
2230         (typedef attached_map_t): A hash map.
2231         (attached_table): Use attached_map_t.  Adjust uses ...
2232         (trees_out::decl_value, trees_in::decl_value): ... here ...
2233         (trees_out::key_mergeable): ... here ...
2234         (trees_in::key_mergeable): ... here ...
2235         (maybe_attach_decl): ... here ...
2236         (direct_import): ... and here.
2237
2238 2021-03-04  Nathan Sidwell  <nathan@acm.org>
2239
2240         PR c++/99170
2241         * cp-tree.h
2242         * lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
2243         rename.
2244         * module.cc (class pending_key): New.
2245         (default_hash_traits<pending_key>): New specialization.
2246         (pending_map_t): New typedef.
2247         (pending_table): Replace old table.
2248         (trees_out::lang_decl_bools): Adjust.
2249         (trees_in::lang_decl_bools): Adjust.
2250         (trees_in::install_entity): Drop pending member and specialization
2251         handling.
2252         (find_pending_key): New.
2253         (depset::hash::fiund_dependencies): Use it.
2254         (pendset_lazy_load): Delete.
2255         (module_state::write_cluster): Don't count pendings here.  Bye
2256         Duff's device-like thing.
2257         (module_state::write_pendings): Reimplement.
2258         (module_state::read_pendings): Reimplement.
2259         (lazy_specializations_p): Delete.
2260         (module_state::write): Adjust write_pendings call.
2261         (lazy_load_pendings): New.
2262         (lazy_load_specializations): Delete.
2263         (lazy_load_members): Delete.
2264         (init_modules): Adjust.
2265         * name-lookup.c (maybe_lazily_declare): Call lazy_load_pendings
2266         not lazy_load_members.
2267         (note_pending_specializations): Delete.
2268         (load_pending_specializations): Delete.
2269         * name-lookup.h (BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
2270         (BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
2271         (BINDING_VECTR_PENDING_MEMBERS_P): Delete.
2272         (note_pending_specializations): Delete.
2273         (load_pending_specializations): Delete.
2274         * pt.c (lookup_template_class_1): Call lazy_load_pendings not
2275         lazy_load_specializations.
2276         (instantiate_template_class_1): Likewise.
2277         (instantiate_decl): Call lazy_load_pendings.
2278         * typeck.c (complete_type): Likewise.
2279
2280 2021-03-03  Nathan Sidwell  <nathan@acm.org>
2281
2282         PR c++/99170
2283         * module.cc (post_load_decls): New.
2284         (lazy_snum, recursive_lazy): Move earlier.
2285         (module_state::read_cluster): Push cloning onto post_load_decls.
2286         (post_load_processing): New.  Do the cloning here.
2287         (module_state::read_inits): Call post_load_processing.
2288         (module_state::read_language): Likewise.
2289         (lazy_load_binding, lazy_load_specializations): Likewise
2290         (lazy_load_members): Likewise
2291
2292 2021-03-03  Nathan Sidwell  <nathan@acm.org>
2293
2294         PR c++/99170
2295         * module.cc (trees_out::decl_value): Stream specialization keys
2296         after decl.
2297         (trees_in::decl_value): Stream them back and insert after
2298         completing the decl.
2299         (trees_out::key_mergeable): Drop some streaming here ...
2300         (trees_in::key_mergeable): ... and here.  Don't insert into
2301         specialization tables.
2302
2303 2021-03-03  Patrick Palka  <ppalka@redhat.com>
2304
2305         * constraint.cc (struct sat_info): Document the different
2306         meanings of noisy() and diagnose_unsatisfaction_p() during
2307         satisfaction and requires-expression evaluation.
2308         (tsubst_valid_expression_requirement): Take a sat_info instead
2309         of a subst_info.  Perform the substitution quietly first.  Fold
2310         in error-replaying code from diagnose_valid_expression.
2311         (tsubst_simple_requirement): Take a sat_info instead of a
2312         subst_info.
2313         (tsubst_type_requirement_1): New.  Fold in error-replaying code
2314         from diagnose_valid_type.
2315         (tsubst_type_requirement): Use the above.  Take a sat_info
2316         instead of a subst_info.
2317         (tsubst_compound_requirement): Likewise.  Fold in
2318         error-replaying code from diagnose_compound_requirement.
2319         (tsubst_nested_requirement): Take a sat_info instead of a
2320         subst_info.  Fold in error-replaying code from
2321         diagnose_nested_requirement.
2322         (tsubst_requirement): Take a sat_info instead of a subst_info.
2323         (tsubst_requires_expr): Split into two versions, one that takes
2324         a sat_info argument and another that takes a complain and
2325         in_decl argument.  Remove outdated documentation.  Document the
2326         effects of the sat_info argument.  Don't short-circuit
2327         processing of requirements when diagnosing unsatisfaction,
2328         mirroring diagnose_requires_expr.
2329         (satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
2330         assert, and se the three-parameter version of tsubst_requires_expr.
2331         (diagnose_trait_expr): Make static.  Take a template argument
2332         vector instead of a parameter mapping.
2333         (diagnose_valid_expression): Remove.
2334         (diagnose_valid_type): Remove.
2335         (diagnose_simple_requirement): Remove.
2336         (diagnose_compound_requirement): Remove.
2337         (diagnose_type_requirement): Remove.
2338         (diagnose_nested_requirement): Remove.
2339         (diagnose_requirement): Remove.
2340         (diagnose_requires_expr): Remove.
2341         (diagnose_atomic_constraint): Take a sat_info instead of a
2342         subst_info.  Adjust call to diagnose_trait_expr.  Call
2343         tsubst_requires_expr instead of diagnose_requires_expr.
2344         (diagnose_constraints): Remove special casing of REQUIRES_EXPR
2345         and just always call constraint_satisfaction_value.
2346
2347 2021-03-03  Patrick Palka  <ppalka@redhat.com>
2348
2349         * constexpr.c (cxx_eval_call_expression): Adjust call to
2350         evaluate_concept_check.
2351         (cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
2352         evaluate_requires_expression instead of
2353         satisfy_constraint_expression.
2354         <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
2355         * constraint.cc (struct sat_info): Adjust comment about which
2356         satisfaction entrypoints use noisy-unsat.
2357         (normalize_template_requirements): Remove (and adjust callers
2358         appropriately).
2359         (normalize_nontemplate_requirements): Likewise.
2360         (tsubst_nested_requirement): Use constraint_satisfaction_value
2361         instead of satisfy_constraint_expression, which'll do the
2362         noisy replaying of ill-formed quiet satisfaction for us.
2363         (decl_satisfied_cache): Adjust comment.
2364         (satisfy_constraint): Rename to ...
2365         (satisfy_normalized_constraints): ... this.
2366         (satisfy_associated_constraints): Remove (and make its
2367         callers check for dependent arguments).
2368         (satisfy_constraint_expression): Rename to ...
2369         (satisfy_nondeclaration_constraints): ... this.  Assert that
2370         'args' is empty when 't' is a concept-id.  Removing handling
2371         bare constraint-expressions, and handle REQUIRES_EXPRs
2372         specially.  Adjust comment accordingly.
2373         (satisfy_declaration_constraints): Assert in the two-parameter
2374         version that 't' is not a TEMPLATE_DECL.  Adjust following
2375         removal of normalize_(non)?template_requirements and
2376         satisfy_asociated_constraints.
2377         (constraint_satisfaction_value): Combine the two- and
2378         three-parameter versions in the natural way.
2379         (constraints_satisfied_p): Combine the one- and two-parameter
2380         versions in the natural way.  Improve documentation.
2381         (evaluate_requires_expr): Define.
2382         (evaluate_concept_check): Remove 'complain' parameter.  Use
2383         constraint_satisfaction_value instead of
2384         satisfy_constraint_expression.
2385         (diagnose_nested_requirement): Adjust following renaming of
2386         satisfy_constraint_expression.
2387         (diagnose_constraints): Handle REQUIRES_EXPR by going through
2388         diagnose_requires_expr directly instead of treating it as a
2389         constraint-expression.  Improve documentation.
2390         * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
2391         to evaluate_concept_check.
2392         <case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
2393         constraints_satisfied_p.
2394         <case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
2395         * cp-tree.h (evaluate_requires_expr): Declare.
2396         (evaluate_concept_check): Remove tsubst_flag_t parameter.
2397         (satisfy_constraint_expression): Remove declaration.
2398         (constraints_satisfied_p): Remove one-parameter declaration.
2399         Add a default argument to the two-parameter declaration.
2400         * cvt.c (convert_to_void): Adjust call to
2401         evaluate_concept_check.
2402
2403 2021-03-03  Jakub Jelinek  <jakub@redhat.com>
2404
2405         PR c++/82959
2406         * call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
2407         and COMPOUND_EXPR.
2408
2409 2021-03-03  Marek Polacek  <polacek@redhat.com>
2410
2411         PR c++/97034
2412         PR c++/99009
2413         * pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
2414         (maybe_aggr_guide): Use the original template type where needed.  In
2415         a class member template, partially instantiate the result of
2416         collect_ctor_idx_types.
2417         (do_class_deduction): Defer the deduction until the enclosing
2418         scope is non-dependent.
2419
2420 2021-03-03  Jason Merrill  <jason@redhat.com>
2421
2422         PR c++/95675
2423         * call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
2424         if it didn't get one before.
2425
2426 2021-03-03  Nathan Sidwell  <nathan@acm.org>
2427
2428         PR c++/99344
2429         * module.cc (trees_out::decl_node): Small refactor.
2430         (depset::hash::add_binding_entity): Return true on meeting an
2431         import.  Set namespace's import here.
2432         (module_state:write_namespaces): Inform of purview too.
2433         (module_state:read_namespaces): Adjust.
2434         * name-lookup.c (implicitly_export_namespace): Delete.
2435         (do_pushdecl): Don't call it.
2436         (push_namespace): Likewise, set purview.
2437         (add_imported_namespace): Reorder parms.
2438         * name-lookup.h (add_imported_namespace): Alter param ordering.
2439
2440 2021-03-02  Martin Sebor  <msebor@redhat.com>
2441
2442         PR c++/99251
2443         * class.c (build_base_path): Call build_if_nonnull.
2444         * cp-tree.h (build_if_nonnull): Declare.
2445         * rtti.c (ifnonnull): Rename...
2446         (build_if_nonnull): ...to this.  Set no-warning bit on COND_EXPR.
2447         (build_dynamic_cast_1): Adjust to name change.
2448
2449 2021-03-02  Patrick Palka  <ppalka@redhat.com>
2450
2451         PR c++/96443
2452         PR c++/96960
2453         * constraint.cc (type_deducible_p): Don't substitute into the
2454         constraints, and instead just pass 'args' to do_auto_deduction
2455         as the outer template arguments.
2456         (tsubst_parameter_mapping): Remove confused code for handling
2457         placeholder type arguments.
2458         (normalize_placeholder_type_constraint): Define.
2459         (satisfy_constraint_expression): Use it to handle placeholder
2460         'auto' types.
2461         * cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
2462         (PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
2463         * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
2464         PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
2465         (make_constrained_placeholder_type): Set
2466         PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
2467         (do_auto_deduction): Clarify comments about the outer_targs
2468         parameter.  Rework satisfaction of a placeholder type constraint
2469         to pass in the complete set of template arguments directly to
2470         constraints_satisfied_p.
2471         (splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
2472         instead.  Also rebuild the the constraint info on the new auto.
2473
2474 2021-03-02  Patrick Palka  <ppalka@redhat.com>
2475
2476         * constraint.cc (build_parameter_mapping): Rely on the caller to
2477         determine the in-scope template parameters.
2478         (norm_info::norm_info): Delegate the tsubst_flags_t constructor
2479         to the two-parameter constructor.  In the two-parameter
2480         constructor, fold in the definition of make_context, set
2481         initial_parms appropriately, and don't set the now-removed
2482         orig_decl member.
2483         (norm_info::make_context): Remove, now that its only use is
2484         inlined into the caller.
2485         (norm_info::update_context): Adjust call to
2486         build_parameter_mapping to pass in the relevant set of in-scope
2487         template parameters.
2488         (norm_info::ctx_parms): Define this member function.
2489         (norm_info::context): Initialize to NULL_TREE.
2490         (norm_info::orig_decl): Remove this data member.
2491         (norm_info::initial_parms): Define this data member.
2492         (normalize_atom): Adjust call to build_parameter_mapping to pass
2493         in the relevant set of in-scope template parameters.  Use
2494         info.initial_parms instead of info.orig_decl.
2495         (normalize_constraint_expression): Take a norm_info object
2496         instead of a bool.  Cache the result of normalization.
2497         (tsubst_nested_requirement): Call satisfy_constraint_expression
2498         instead of satisfy_constraint, so that we normalize on demand.
2499         (satisfy_constraint_expression): Handle a NESTED_REQ argument.
2500         Adjust call to normalize_constraint_expression.
2501         (finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
2502         to current_template_parms.
2503         (diagnose_nested_requirements): Go through
2504         satisfy_constraint_expression, as with tsubst_nested_requirement.
2505
2506 2021-03-02  Patrick Palka  <ppalka@redhat.com>
2507
2508         * constraint.cc (tsubst_parameter_mapping): Canonicalize the
2509         arguments of a substituted TYPE_ARGUMENT_PACK even if we've
2510         started with a TYPE_ARGUMENT_PACK.
2511         (finish_requires_expr): Don't set DECL_CONTEXT and
2512         CONSTRAINT_VAR_P on each of the introduced parameters here.
2513         * parser.c (cp_parser_requirement_parameter_list): Instead set
2514         these fields earlier, here.
2515         * pt.c (do_auto_deduction): Canonicalize the result of
2516         do_auto_deduction.  Pass 'complain' to finish_decltype_type.
2517
2518 2021-03-02  Patrick Palka  <ppalka@redhat.com>
2519
2520         * constraint.cc (tsubst_simple_requirement): Just return
2521         boolean_true_node on success.
2522         (tsubst_type_requirement): Likewise.
2523         (tsubst_compound_requirement): Likewise.
2524         (tsubst_nested_requirement): Likewise.
2525         (tsubst_requirement_body): Remove.
2526         (check_constaint_variables): Rename to ...
2527         (check_constraint_variables): ... this.
2528         (tsubst_constraint_variables): Adjust.
2529         (tsubst_requires_expr): Fold tsubst_requirement_body into here.
2530
2531 2021-03-01  Nathan Sidwell  <nathan@acm.org>
2532
2533         PR c++/99294
2534         * class.c (fixup_type_variants): Propagate mode, precision,
2535         alignment & emptiness.
2536         * module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
2537         (trees_in::tree_node): Rematerialize alignment here.
2538
2539 2021-02-27  Jason Merrill  <jason@redhat.com>
2540
2541         PR c++/90333
2542         * parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
2543         between () and ->.
2544
2545 2021-02-26  Jakub Jelinek  <jakub@redhat.com>
2546
2547         * parser.c (cp_parser_lambda_declarator_opt): Implement
2548         P1102R2 - Down with ()! Make ()s optional before lambda specifiers
2549         for -std={c,gnu}++2b or with pedwarn in earlier versions.
2550
2551 2021-02-26  Jakub Jelinek  <jakub@redhat.com>
2552
2553         PR c++/95451
2554         * lambda.c (is_lambda_ignored_entity): Before checking for
2555         LAMBDA_FUNCTION_P, use OVL_FIRST.  Drop FUNCTION_DECL check.
2556
2557 2021-02-26  Jason Merrill  <jason@redhat.com>
2558
2559         PR c++/98810
2560         * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
2561         to a class non-type template argument that needs it.
2562
2563 2021-02-26  Patrick Palka  <ppalka@redhat.com>
2564
2565         PR c++/98990
2566         * pt.c (splice_late_return_type): Rebuild the entire return type
2567         if we have to adjust the level of an auto within.
2568         (type_uses_auto): Adjust call to find_type_usage.
2569         * type-utils.h (find_type_usage): Revert r10-6571 change that
2570         made this function return a pointer to the auto node.
2571
2572 2021-02-25  Patrick Palka  <ppalka@redhat.com>
2573
2574         PR c++/99213
2575         PR c++/94521
2576         * error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
2577         TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.
2578
2579 2021-02-25  Patrick Palka  <ppalka@redhat.com>
2580
2581         PR c++/99103
2582         * pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
2583         (maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.
2584
2585 2021-02-25  Marek Polacek  <polacek@redhat.com>
2586
2587         DR 1312
2588         PR c++/99176
2589         * constexpr.c (is_std_construct_at): New overload.
2590         (is_std_allocator_allocate): New overload.
2591         (cxx_eval_call_expression): Use the new overloads.
2592         (cxx_eval_constant_expression): Reject casting
2593         from void * as per DR 1312.  Don't check can_convert.
2594
2595 2021-02-25  Iain Sandoe  <iain@sandoe.co.uk>
2596
2597         PR c++/97587
2598         * coroutines.cc (struct param_info): Track rvalue refs.
2599         (morph_fn_to_coro): Track rvalue refs, and call the promise
2600         CTOR with the frame copy of passed parms.
2601
2602 2021-02-25  Iain Sandoe  <iain@sandoe.co.uk>
2603
2604         PR c++/95822
2605         * coroutines.cc (morph_fn_to_coro): Unconditionally remove any
2606         set throwing_cleanup marker.
2607
2608 2021-02-25  Nathan Sidwell  <nathan@acm.org>
2609
2610         PR c++/99166
2611         * module.cc (module_state::inform_cmi_p): Renamed field.
2612         (module_state::do_import): Adjust.
2613         (init_modules, finish_module_processing): Likewise.
2614         (handle_module_option): Likewise.
2615
2616 2021-02-25  Nathan Sidwell  <nathan@acm.org>
2617
2618         PR c++/98318
2619         * mapper-client.cc (module_client::open_module_client): Fix typo
2620         of fd init.
2621
2622 2021-02-24  Nathan Sidwell  <nathan@acm.org>
2623
2624         PR c++/98718
2625         * module.cc (ool): New indirection vector.
2626         (loc_spans::maybe_propagate): Location is not optional.
2627         (loc_spans::open): Likewise.  Assert monotonically advancing.
2628         (module_for_ordinary_loc): Use ool indirection vector.
2629         (module_state::write_prepare_maps): Do not count empty macro
2630         expansions.  Elide empty spans.
2631         (module_state::write_macro_maps): Skip empty expansions.
2632         (ool_cmp): New qsort comparator.
2633         (module_state::write): Create and destroy ool vector.
2634         (name_pending_imports): Fix dump push/pop.
2635         (preprocess_module): Likewise.  Add more dumping.
2636         (preprocessed_module): Likewise.
2637
2638 2021-02-24  Iain Sandoe  <iain@sandoe.co.uk>
2639
2640         PR c++/96251
2641         * coroutines.cc (coro_common_keyword_context_valid_p): Suppress
2642         error reporting when instantiating for a constexpr.
2643
2644 2021-02-23  Nathan Sidwell  <nathan@acm.org>
2645
2646         PR c++/99208
2647         * decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
2648         identity.
2649
2650 2021-02-23  Patrick Palka  <ppalka@redhat.com>
2651
2652         PR c++/95468
2653         * pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
2654         over from tsubst_copy.
2655
2656 2021-02-23  Patrick Palka  <ppalka@redhat.com>
2657
2658         * pt.c (instantiation_dependent_expression_p): Check
2659         processing_template_decl before calling
2660         potential_constant_expression.
2661
2662 2021-02-22  Nathan Sidwell  <nathan@acm.org>
2663
2664         PR c++/99174
2665         * module.cc (struct module_state): Add visited_p flag.
2666         (name_pending_imports): Use it to avoid duplicate requests.
2667         (preprocess_module): Don't read preprocessor state if we failed to
2668         load a module's config.
2669
2670 2021-02-22  Nathan Sidwell  <nathan@acm.org>
2671
2672         PR c++/99153
2673         * decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
2674         to common-path.
2675         * module.cc (set_defining_module): Add assert.
2676
2677 2021-02-19  Nathan Sidwell  <nathan@acm.org>
2678
2679         PR c++/98741
2680         * module.cc (pending_imports): New.
2681         (declare_module): Adjust test condition.
2682         (name_pending_imports): New.
2683         (preprocess_module): Reimplement using pending_imports.
2684         (preprocessed_module): Move name-getting to name_pending_imports.
2685         * name-lookup.c (append_imported_binding_slot): Assert module
2686         ordering is increasing.
2687
2688 2021-02-19  Nathan Sidwell  <nathan@acm.org>
2689
2690         * module.cc (note_cmis): New.
2691         (struct module_state): Add inform_read_p bit.
2692         (module_state::do_import): Inform of CMI location, if enabled.
2693         (init_modules): Canonicalize note_cmis entries.
2694         (handle_module_option): Handle -flang-info-module-read=FOO.
2695
2696 2021-02-19  Jason Merrill  <jason@redhat.com>
2697
2698         PR c++/96926
2699         * call.c (perfect_conversion_p): Limit rvalueness
2700         test to reference bindings.
2701
2702 2021-02-19  Jason Merrill  <jason@redhat.com>
2703
2704         PR c++/96926
2705         * call.c (perfect_conversion_p): New.
2706         (perfect_candidate_p): New.
2707         (add_candidates): Ignore templates after a perfect non-template.
2708
2709 2021-02-18  Nathan Sidwell  <nathan@acm.org>
2710
2711         PR c++/99023
2712         * module.cc (canonicalize_header_name): Use
2713         cpp_probe_header_unit.
2714         (maybe_translate_include): Fix note_includes comparison.
2715         (init_modules): Fix note_includes string termination.
2716
2717 2021-02-18  Jakub Jelinek  <jakub@redhat.com>
2718
2719         PR c++/99132
2720         * cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
2721         cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
2722         for immediate function calls.
2723
2724 2021-02-17  Nathan Sidwell  <nathan@acm.org>
2725
2726         PR c++/99023
2727         * module.cc (struct macro_export): Add GTY markers.
2728         (macro_exports): Likewise, us a va_gc Vector.
2729
2730 2021-02-17  Jakub Jelinek  <jakub@redhat.com>
2731
2732         PR sanitizer/99106
2733         * init.c (build_zero_init_1): For flexible array members just return
2734         NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
2735         ARRAY_TYPE.
2736
2737 2021-02-17  Nathan Sidwell  <nathan@acm.org>
2738
2739         PR c++/99116
2740         * name-lookup.c (do_pushdecl): Don't peek under template_parm
2741         bindings here ...
2742         (set_identifier_type_value_with_scope): ... or here.
2743         (do_pushtag): Only set_identifier_type_value_with_scope at
2744         non-class template parm scope, and use parent scope.
2745
2746 2021-02-17  Nathan Sidwell  <nathan@acm.org>
2747
2748         PR c++/99071
2749         * name-lookup.c (maybe_record_mergeable_decl): Deref the correct
2750         pointer.
2751
2752 2021-02-17  Patrick Palka  <ppalka@redhat.com>
2753
2754         PR debug/96997
2755         PR c++/94034
2756         * tree.c (build_aggr_init_expr): Revert r10-7718 change.
2757
2758 2021-02-12  Nathan Sidwell  <nathan@acm.org>
2759
2760         * module.cc (module_state::write_cluster): Check bindings for
2761         imported using-decls.
2762
2763 2021-02-12  Nathan Sidwell  <nathan@acm.org>
2764
2765         PR c++/99040
2766         * module.cc (trees_in::decl_value): Call add_module_namespace_decl
2767         for new namespace-scope entities.
2768         (module_state::read_cluster): Don't call add_module_decl here.
2769         * name-lookup.h (add_module_decl): Rename to ...
2770         (add_module_namespace_decl): ... this.
2771         * name-lookup.c (newbinding_bookkeeping): Move into ...
2772         (do_pushdecl): ... here.  Its only remaining caller.
2773         (add_module_decl): Rename to ...
2774         (add_module_namespace_decl): ... here.  Add checking-assert for
2775         circularity. Don't call newbinding_bookkeeping, just extern_c
2776         checking and incomplete var checking.
2777
2778 2021-02-12  Nathan Sidwell  <nathan@acm.org>
2779
2780         PR c++/99039
2781         PR c++/99040
2782         * cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
2783         (global_type_node): Delete.
2784         (IDENTIFIER_TYPE_VALUE): Delete.
2785         (IDENTIFIER_HAS_TYPE_VALUE): Delete.
2786         (get_type_value): Delete.
2787         * name-lookup.h (identifier_type_value): Delete.
2788         * name-lookup.c (check_module_override): Don't
2789         SET_IDENTIFIER_TYPE_VALUE here.
2790         (do_pushdecl): Nor here.
2791         (identifier_type_value_1, identifier_type_value): Delete.
2792         (set_identifier_type_value_with_scope): Only
2793         SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
2794         (pushdecl_nanmespace_level): Remove shadow stack nadgering.
2795         (do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
2796         * call.c (check_dtor_name): Use lookup_name.
2797         * decl.c (cxx_init_decl_processing): Drop global_type_node.
2798         * decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
2799         here.
2800         * init.c (get_type_value): Delete.
2801         * pt.c (instantiate_class_template_1): Don't call pushtag or
2802         SET_IDENTIFIER_TYPE_VALUE here.
2803         (tsubst): Assert never an identifier.
2804         (dependent_type_p): Drop global_type_node assert.
2805         * typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
2806         to determine ctorness.
2807
2808 2021-02-12  Jakub Jelinek  <jakub@redhat.com>
2809
2810         PR c++/97742
2811         * parser.c (cp_parser_requirement_seq): Stop iterating after reaching
2812         CPP_EOF.
2813
2814 2021-02-12  Jason Merrill  <jason@redhat.com>
2815
2816         PR c++/97246
2817         PR c++/94546
2818         * pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
2819         (register_parameter_specializations): Not here.
2820
2821 2021-02-11  Marek Polacek  <polacek@redhat.com>
2822
2823         PR c++/95888
2824         * pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
2825         for the partial instantiation.
2826
2827 2021-02-11  Jakub Jelinek  <jakub@redhat.com>
2828
2829         PR c++/99033
2830         * init.c (build_zero_init_1): Handle zero initialiation of
2831         flexible array members like initialization of [0] arrays.
2832         Use integer_minus_onep instead of comparison to integer_minus_one_node
2833         and integer_zerop instead of comparison against size_zero_node.
2834         Formatting fixes.
2835
2836 2021-02-11  Marek Polacek  <polacek@redhat.com>
2837
2838         PR c++/99063
2839         * semantics.c (finish_do_stmt): Check for unexpanded parameter packs.
2840
2841 2021-02-11  Patrick Palka  <ppalka@redhat.com>
2842
2843         PR c++/97582
2844         * name-lookup.c (op_unqualified_lookup): Handle an ambiguous
2845         lookup result by discarding it if the first element is a
2846         class-scope declaration, otherwise return it.
2847         (push_operator_bindings): Handle an ambiguous lookup result by
2848         doing push_local_binding on each element in the list.
2849
2850 2021-02-11  Marek Polacek  <polacek@redhat.com>
2851
2852         * parser.c (cp_parser_selection_statement): Use vec_free.
2853
2854 2021-02-10  Jakub Jelinek  <jakub@redhat.com>
2855
2856         PR c++/98988
2857         PR c++/99031
2858         * constexpr.c: Include cgraph.h.
2859         (cxx_eval_call_expression): Call varpool_node::finalize_decl on
2860         heap artificial vars.
2861         (cxx_eval_outermost_constant_expr): Remove varpool nodes for
2862         heap artificial vars.
2863
2864 2021-02-10  Nathan Sidwell  <nathan@acm.org>
2865
2866         PR c++/99030
2867         * pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
2868         answer if there's no local specialization.
2869
2870 2021-02-09  Nathan Sidwell  <nathan@acm.org>
2871
2872         PR c++/98944
2873         * module.cc (module_state::is_rooted): Rename to ...
2874         (module_state::has_location): ... here.  Adjust callers.
2875         (module_state::read_partitions): Adjust validity check.
2876         Don't overwrite a known location.
2877
2878 2021-02-09  Jason Merrill  <jason@redhat.com>
2879
2880         PR c++/96905
2881         * pt.c (mark_decl_instantiated): Exit early if consteval.
2882
2883 2021-02-09  Jason Merrill  <jason@redhat.com>
2884
2885         PR c++/98326
2886         PR c++/20408
2887         * cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
2888         parm.
2889
2890 2021-02-09  Jason Merrill  <jason@redhat.com>
2891
2892         PR c++/98994
2893         PR c++/97566
2894         * constexpr.c (cxx_eval_store_expression): Only skip empty fields in
2895         RECORD_TYPE.
2896
2897 2021-02-08  Nathan Sidwell  <nathan@acm.org>
2898
2899         * decl.c (start_cleanup_fn): Push function into
2900         namespace.
2901
2902 2021-02-08  Nathan Sidwell  <nathan@acm.org>
2903
2904         PR c++/98531
2905         * cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
2906         * decl.c (push_abi_namespace, pop_abi_namespace): Moved
2907         from rtti.c, add default namespace arg.
2908         (check_redeclaration_exception_specification): Allow a lazy
2909         builtin's eh spec to differ from an lready-declared user
2910         declaration.
2911         (declare_global_var): Use push/pop_abi_namespace.
2912         (get_atexit_node): Push the fndecl into a namespace.
2913         * rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
2914         decl.c.
2915
2916 2021-02-08  Marek Polacek  <polacek@redhat.com>
2917
2918         * cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.
2919
2920 2021-02-05  Marek Polacek  <polacek@redhat.com>
2921
2922         PR c++/98947
2923         * call.c (build_conditional_expr_1): Don't call mark_lvalue_use
2924         on arg2/arg3.
2925         * expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
2926         issuing the -Wvolatile warning.  Only set TREE_THIS_VOLATILE if
2927         a warning was emitted.
2928
2929 2021-02-05  Marek Polacek  <polacek@redhat.com>
2930
2931         PR c++/96462
2932         * name-lookup.c (lookup_using_decl): Hoist the destructor check.
2933
2934 2021-02-05  Jakub Jelinek  <jakub@redhat.com>
2935
2936         PR c++/97878
2937         * decl.c (check_array_initializer): For structured bindings, require
2938         the array type to be complete.
2939
2940 2021-02-04  Jason Merrill  <jason@redhat.com>
2941
2942         PR c++/98717
2943         * constraint.cc (build_concept_check_arguments): Remove assert.
2944         (build_concept_check): Allow empty args.
2945
2946 2021-02-04  Tom Greenslade (thomgree)  <thomgree@cisco.com>
2947
2948         PR c++/90926
2949         * call.c (can_convert_array): Extend to handle all valid aggregate
2950         initializers of an array; including by string literals, not just by
2951         brace-init-list.
2952         (build_aggr_conv): Call can_convert_array more often, not just in
2953         brace-init-list case.
2954         * typeck2.c (array_string_literal_compatible_p): New function.
2955         (digest_init_r): call array_string_literal_compatible_p
2956         * cp-tree.h: (array_string_literal_compatible_p): Declare.
2957
2958 2021-02-04  Jason Merrill  <jason@redhat.com>
2959
2960         PR c++/98802
2961         * pt.c (do_class_deduction): No aggregate guide if any_dguides_p.
2962
2963 2021-02-04  Jason Merrill  <jason@redhat.com>
2964
2965         PR c++/95192
2966         * pt.c (tsubst_attribute): Handle error.
2967         (apply_late_template_attributes): Return false on error.
2968         (tsubst_function_decl): Check its return value.
2969         (tsubst_decl): Likewise.
2970         (push_template_decl): Assert current_template_parms.
2971         (tsubst_template_decl): Set current_template_parms.
2972
2973 2021-02-03  Marek Polacek  <polacek@redhat.com>
2974
2975         PR c++/98951
2976         * call.c (struct z_candidate): Mark rewritten and reversed as const.
2977         (struct NonPublicField): Mark operator() as const.
2978         (struct NonTrivialField): Likewise.
2979
2980 2021-02-03  Jason Merrill  <jason@redhat.com>
2981
2982         PR c++/98926
2983         PR c++/98570
2984         * pt.c (spec_hasher::equal): Set processing_template_decl.
2985         * Make-lang.in (check-g++-strict-gc): Add --param
2986         hash-table-verification-limit=10000.
2987
2988 2021-02-03  Marek Polacek  <polacek@redhat.com>
2989
2990         PR c++/98899
2991         * parser.c (cp_parser_class_specifier_1): Use any possible
2992         DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
2993         (cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
2994         * pt.c (tsubst_exception_specification): Stash new_specs into
2995         DEFPARSE_INSTANTIATIONS.
2996         * tree.c (fixup_deferred_exception_variants): Use
2997         UNPARSED_NOEXCEPT_SPEC_P.
2998
2999 2021-02-02  Jason Merrill  <jason@redhat.com>
3000
3001         PR c++/98929
3002         PR c++/96199
3003         * error.c (dump_expr): Ignore dummy object.
3004         * pt.c (tsubst_baselink): Handle dependent scope.
3005
3006 2021-02-01  Patrick Palka  <ppalka@redhat.com>
3007
3008         PR c++/98295
3009         * constexpr.c (cxx_eval_array_reference): Also set
3010         new_ctx.object when setting new_ctx.ctor.
3011
3012 2021-02-01  Marek Polacek  <polacek@redhat.com>
3013
3014         PR c++/98355
3015         * parser.c (cp_parser_has_attribute_expression): Use
3016         uses_template_parms instead of type_dependent_expression_p.
3017
3018 2021-02-01  Jason Merrill  <jason@redhat.com>
3019
3020         PR c++/98570
3021         * cp-tree.h: Declare it.
3022         * pt.c (comparing_dependent_aliases): New flag.
3023         (template_args_equal, spec_hasher::equal): Set it.
3024         (dependent_alias_template_spec_p): Assert that we don't
3025         get non-types other than error_mark_node.
3026         (instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
3027         on complex alias specializations.  Set TYPE_DEPENDENT_P here.
3028         (tsubst_decl): Not here.
3029         * module.cc (module_state::read_cluster): Set
3030         comparing_dependent_aliases instead of
3031         comparing_specializations.
3032         * tree.c (cp_tree_equal): Remove comparing_specializations
3033         module handling.
3034         * typeck.c (structural_comptypes): Adjust.
3035         (comptypes): Remove comparing_specializations handling.
3036
3037 2021-01-29  Nathan Sidwell  <nathan@acm.org>
3038
3039         PR c++/98843
3040         * module.cc (module_state_config): Add num_entities field.
3041         (module_state::read_entities): The entity_ary span is
3042         already allocated.
3043         (module_state::write_config): Write num_entities.
3044         (module_state::read_config): Read num_entities.
3045         (module_state::write): Set config's num_entities.
3046         (module_state::read_initial): Allocate the entity ary
3047         span here.
3048         (module_state::read_language): Do not set entity_lwm
3049         here.
3050
3051 2021-01-29  Marek Polacek  <polacek@redhat.com>
3052
3053         PR c++/96137
3054         * parser.c (cp_parser_class_name): If parser->scope is
3055         error_mark_node, return it, otherwise continue.
3056
3057 2021-01-28  Jakub Jelinek  <jakub@redhat.com>
3058
3059         PR c++/98841
3060         * typeck.c (build_x_indirect_ref): For *this, return current_class_ref.
3061
3062 2021-01-28  Jakub Jelinek  <jakub@redhat.com>
3063
3064         PR c++/33661
3065         PR c++/98847
3066         * decl.c (cp_finish_decl): For register vars with asmspec in templates
3067         call set_user_assembler_name and set DECL_HARD_REGISTER.
3068         * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
3069         pass asmspec_tree to cp_finish_decl.
3070
3071 2021-01-28  Nathan Sidwell  <nathan@acm.org>
3072
3073         PR c++/98770
3074         * module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
3075         check order.
3076         (trees_in::decl_value): Do typedef frobbing only when installing
3077         a new typedef, adjust is_matching_decl call.  Swap is_typedef
3078         & TYPE_NAME check.
3079         (trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
3080         names and deal with typedef checking.
3081
3082 2021-01-27  Jason Merrill  <jason@redhat.com>
3083
3084         PR c++/97874
3085         * name-lookup.c (lookup_using_decl): Clean up handling
3086         of dependency and inherited constructors.
3087         (finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
3088         * pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.
3089
3090 2021-01-26  Jason Merrill  <jason@redhat.com>
3091
3092         PR c++/97474
3093         * call.c (type_passed_as): Don't mark invisiref restrict.
3094
3095 2021-01-26  Jason Merrill  <jason@redhat.com>
3096
3097         PR c++/97566
3098         PR c++/98463
3099         * class.c (layout_class_type): An empty field gets size 0.
3100         (is_empty_field): New.
3101         (check_bases): Check it.
3102         * cp-tree.h (is_empty_field): Declare it.
3103         * constexpr.c (cxx_eval_store_expression): Check it.
3104         (cx_check_missing_mem_inits): Likewise.
3105         * init.c (perform_member_init): Likewise.
3106         * typeck2.c (process_init_constructor_record): Likewise.
3107
3108 2021-01-25  Martin Sebor  <msebor@redhat.com>
3109
3110         PR c++/98646
3111         * cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.
3112
3113 2021-01-25  Jason Merrill  <jason@redhat.com>
3114
3115         PR c++/98463
3116         * constexpr.c (get_or_insert_ctor_field): Add check.
3117         (cxx_eval_store_expression): Handle discontinuity of refs.
3118
3119 2021-01-23  Anthony Sharp  <anthonysharp15@gmail.com>
3120
3121         * call.c (complain_about_access): Altered function.
3122         * cp-tree.h (complain_about_access): Changed parameters of function.
3123         (get_parent_with_private_access): Declared new function.
3124         * search.c (get_parent_with_private_access): Defined new function.
3125         * semantics.c (enforce_access): Modified function.
3126         * typeck.c (complain_about_unrecognized_member): Updated function
3127         arguments in complain_about_access.
3128
3129 2021-01-23  Patrick Palka  <ppalka@redhat.com>
3130
3131         PR c++/97399
3132         * cp-tree.h (shared_member_p): Adjust declaration.
3133         * parser.c (cp_parser_init_declarator): If the storage class
3134         specifier is sc_static, pass true for static_p to
3135         cp_parser_declarator.
3136         (cp_parser_direct_declarator): Don't do inject_this_parm when
3137         the declarator is a friend.
3138         * search.c (shared_member_p): Change return type to bool and
3139         adjust function body accordingly.  Return false for a dependent
3140         USING_DECL instead of aborting.
3141         * semantics.c (finish_qualified_id_expr): Rely on shared_member_p
3142         even when type-dependent.
3143
3144 2021-01-22  Marek Polacek  <polacek@redhat.com>
3145
3146         PR c++/96623
3147         * parser.c (inject_parm_decls): Remove a redundant assignment.
3148         (cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
3149         before calling inject_parm_decls.
3150
3151 2021-01-22  Jason Merrill  <jason@redhat.com>
3152
3153         PR c++/98744
3154         * call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.
3155
3156 2021-01-22  Jakub Jelinek  <jakub@redhat.com>
3157
3158         PR sanitizer/95693
3159         * init.c (build_zero_init_1): Revert the 2018-03-06 change to
3160         return build_zero_cst for reference types.
3161         * typeck2.c (process_init_constructor_record): Instead call
3162         build_zero_cst here during error recovery instead of build_zero_init.
3163
3164 2021-01-22  Marek Polacek  <polacek@redhat.com>
3165
3166         PR c++/98545
3167         * mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
3168         warnings regardless of abi_version_at_least.
3169         (write_expression): When the expression is a dependent name
3170         and an operator name, write "on" before writing its name.
3171
3172 2021-01-22  Marek Polacek  <polacek@redhat.com>
3173
3174         PR c++/97966
3175         * pt.c (instantiate_class_template_1): Instantiate members
3176         marked with attribute used only after we're done instantiating
3177         the class.
3178
3179 2021-01-21  Patrick Palka  <ppalka@redhat.com>
3180
3181         PR c++/71879
3182         * semantics.c (finish_decltype_type): Set up a cp_unevaluated
3183         sentinel at the start of the function.  Remove a now-redundant
3184         manual adjustment of cp_unevaluated_operand.
3185
3186 2021-01-21  Nathan Sidwell  <nathan@acm.org>
3187
3188         PR c++/98624
3189         * module.cc (depset::hash::find_dependencies): Add
3190         module arg.
3191         (trees_out::core_vals): Check state before calling
3192         write_location.
3193         (sort_cluster, module_state::write): Adjust
3194         find_dependencies call.
3195
3196 2021-01-21  Jakub Jelinek  <jakub@redhat.com>
3197
3198         PR c++/98672
3199         * constexpr.c (check_for_return_continue_data): Add break_stmt member.
3200         (check_for_return_continue): Also look for BREAK_STMT.  Handle
3201         SWITCH_STMT by ignoring break_stmt from its body.
3202         (potential_constant_expression_1) <case FOR_STMT>,
3203         <case WHILE_STMT>: If the condition isn't constant true, check if
3204         the loop body can contain a return stmt.
3205         <case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
3206         <case IF_STMT>: If recursion with tf_none is successful,
3207         merge *jump_target from the branches - returns with highest priority,
3208         breaks or continues lower.  If then branch is potentially constant and
3209         doesn't return, check the else branch if it could return, break or
3210         continue.
3211
3212 2021-01-21  Nathan Sidwell  <nathan@acm.org>
3213
3214         PR c++/98530
3215         * name-lookup.c (lookup_class_binding): Rearrange a stat-hack.
3216
3217 2021-01-20  Nathan Sidwell  <nathan@acm.org>
3218
3219         * module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
3220         signed type.
3221
3222 2021-01-20  Patrick Palka  <ppalka@redhat.com>
3223
3224         PR c++/95434
3225         * pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
3226         CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
3227         adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
3228
3229 2021-01-20  Patrick Palka  <ppalka@redhat.com>
3230
3231         PR c++/82613
3232         * parser.c (cp_parser_class_head): Defer access checking when
3233         parsing the base-clause until all bases are seen and attached
3234         to the class type.
3235         * pt.c (instantiate_class_template): Likewise when substituting
3236         into dependent bases.
3237
3238 2021-01-20  Jakub Jelinek  <jakub@redhat.com>
3239
3240         PR c++/98742
3241         * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
3242         error_operand_p, remove clause without further checking.  Check
3243         for non-NULL TYPE_NAME.
3244
3245 2021-01-19  Marek Polacek  <polacek@redhat.com>
3246
3247         PR c++/98659
3248         * pt.c (maybe_instantiate_noexcept): Return false if FN is
3249         error_mark_node.
3250
3251 2021-01-19  Marek Polacek  <polacek@redhat.com>
3252
3253         PR c++/98687
3254         * name-lookup.c (push_using_decl_bindings): New, broken out of...
3255         (finish_nonmember_using_decl): ...here.
3256         * name-lookup.h (push_using_decl_bindings): Update declaration.
3257         * pt.c (tsubst_expr): Update the call to push_using_decl_bindings.
3258
3259 2021-01-19  Patrick Palka  <ppalka@redhat.com>
3260
3261         PR c++/41437
3262         PR c++/58993
3263         * search.c (friend_accessible_p): If scope is a hidden friend
3264         defined inside a dependent class, consider access from the
3265         class.
3266         * parser.c (cp_parser_late_parsing_for_member): Don't push a
3267         dk_no_check access state.
3268
3269 2021-01-19  Marek Polacek  <polacek@redhat.com>
3270
3271         PR c++/98333
3272         * parser.c (cp_parser_class_specifier_1): Perform late-parsing
3273         of NSDMIs before late-parsing of noexcept-specifiers.
3274
3275 2021-01-19  Nathan Sidwell  <nathan@acm.org>
3276
3277         * module.cc (identifier): Merge overloads.
3278
3279 2021-01-19  Nathan Sidwell  <nathan@acm.org>
3280
3281         PR c++/98624
3282         * module.cc (trees_out::write_location): Make static.
3283
3284 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
3285
3286         * parser.c (cp_parser_omp_clause_detach): New.
3287         (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
3288         (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
3289         * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
3290         * semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
3291         Prevent use of detach with mergeable and overriding the data sharing
3292         mode of the event handle.
3293
3294 2021-01-15  Nathan Sidwell  <nathan@acm.org>
3295
3296         PR c++/98538
3297         * tree.c (cp_build_qualified_type_real): Propagate an array's
3298         dependentness to the copy, if known.
3299
3300 2021-01-15  Jason Merrill  <jason@redhat.com>
3301
3302         PR c++/98642
3303         * call.c (unsafe_return_slot_p): Return int.
3304         (init_by_return_slot_p): Split out from...
3305         (unsafe_copy_elision_p): ...here.
3306         (unsafe_copy_elision_p_opt): New name for old meaning.
3307         (build_over_call): Adjust.
3308         (make_safe_copy_elision): New.
3309         * typeck2.c (split_nonconstant_init_1): Elide copy from safe
3310         list-initialization.
3311         * cp-tree.h: Adjust.
3312
3313 2021-01-15  Jason Merrill  <jason@redhat.com>
3314
3315         * call.c (base_ctor_for, make_base_init_ok): New.
3316         (build_over_call): Use make_base_init_ok.
3317
3318 2021-01-15  Jason Merrill  <jason@redhat.com>
3319
3320         PR c++/63707
3321         * tree.c (build_vec_init_expr): Don't call build_vec_init_elt
3322         if we got a CONSTRUCTOR.
3323
3324 2021-01-15  Nathan Sidwell  <nathan@acm.org>
3325
3326         PR c++/98591
3327         * lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
3328
3329 2021-01-14  Jason Merrill  <jason@redhat.com>
3330
3331         * typeck2.c (process_init_constructor_record): Use fldtype
3332         variable consistently.
3333
3334 2021-01-14  Nathan Sidwell  <nathan@acm.org>
3335
3336         PR c++/98372
3337         * tree.c (cp_tree_equal): Correct map_context logic.
3338
3339 2021-01-13  Marek Polacek  <polacek@redhat.com>
3340
3341         PR c++/98231
3342         * name-lookup.c (push_using_decl_bindings): New.
3343         * name-lookup.h (push_using_decl_bindings): Declare.
3344         * pt.c (tsubst_expr): Call push_using_decl_bindings.
3345
3346 2021-01-13  Nathan Sidwell  <nathan@acm.org>
3347
3348         PR c++/98626
3349         * module.cc (module_add_import_initializers):  Pass a
3350         zero-element argument vector.
3351
3352 2021-01-12  Patrick Palka  <ppalka@redhat.com>
3353
3354         PR c++/98611
3355         * tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
3356         the template of a CTAD placeholder.
3357
3358 2021-01-12  Marek Polacek  <polacek@redhat.com>
3359
3360         PR c++/98620
3361         * typeck2.c (process_init_constructor_record): Don't emit
3362         -Wmissing-field-initializers warnings in unevaluated contexts.
3363
3364 2021-01-11  Jakub Jelinek  <jakub@redhat.com>
3365
3366         PR c++/98481
3367         * class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
3368         for types.
3369         (mark_abi_tags_r): Likewise.
3370         * decl2.c (min_vis_r): Likewise.
3371         * tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
3372         typedefs.
3373
3374 2021-01-08  Patrick Palka  <ppalka@redhat.com>
3375
3376         PR c++/98551
3377         * constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
3378         instead of AGGREGATE_TYPE_P before calling replace_result_decl.
3379
3380 2021-01-08  Patrick Palka  <ppalka@redhat.com>
3381
3382         PR c++/98515
3383         * semantics.c (check_accessibility_of_qualified_id): Punt if
3384         we're checking access of a scoped non-static member inside a
3385         class template.
3386
3387 2021-01-07  Jakub Jelinek  <jakub@redhat.com>
3388
3389         PR c++/98329
3390         * pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
3391         cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
3392         its location.
3393         (tsubst_copy_and_build): Handle BIT_CAST_EXPR.
3394
3395 2021-01-07  Marek Polacek  <polacek@redhat.com>
3396
3397         PR c++/98441
3398         * decl.c (grokdeclarator): Move the !funcdecl_p check inside the
3399         !late_return_type block.
3400
3401 2021-01-07  Jason Merrill  <jason@redhat.com>
3402
3403         * constexpr.c (cxx_bind_parameters_in_call): Add comment.
3404         (cxx_eval_store_expression): Add comment.
3405
3406 2021-01-07  Jason Merrill  <jason@redhat.com>
3407
3408         * call.c (has_next): Factor out from...
3409         (next_conversion): ...here.
3410         (strip_standard_conversion): And here.
3411         (is_subseq): And here.
3412         (build_conv): Check it.
3413         (standard_conversion): Don't call build_conv
3414         for ck_identity.
3415
3416 2021-01-06  Martin Sebor  <msebor@redhat.com>
3417
3418         PR c++/95768
3419         * error.c (dump_expr): Call c_pretty_printer::unary_expression.
3420
3421 2021-01-05  Patrick Palka  <ppalka@redhat.com>
3422
3423         * pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
3424         the type of the NTTP, substitute into the type again.  If the
3425         type is still dependent, don't unify the NTTP.
3426
3427 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
3428
3429         * Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
3430         $(CODYLIB) after $(BACKEND).
3431
3432 2021-01-05  Jakub Jelinek  <jakub@redhat.com>
3433
3434         PR c++/98469
3435         * constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
3436         Punt if lval is true.
3437         * semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
3438         the result if it has a class type.
3439
3440 2021-01-05  Marek Polacek  <polacek@redhat.com>
3441
3442         PR c++/82099
3443         * pt.c (resolve_overloaded_unification): Call
3444         maybe_instantiate_noexcept after instantiating the function
3445         decl.
3446
3447 2021-01-05  Nathan Sidwell  <nathan@acm.org>
3448
3449         * parser.c (cp_parser_module_declaration): Alter diagnostic
3450         text to say where is permissable.
3451
3452 2021-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3453
3454         PR c++/98316
3455         * Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).
3456
3457 2021-01-02  Jan Hubicka  <jh@suse.cz>
3458
3459         * cp-tree.h (cp_tree_c_finish_parsing): Declare.
3460         * decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
3461         * tree.c (cp_tree_c_finish_parsing): New function.
3462
3463 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
3464
3465         * ChangeLog-2020: Rotate ChangeLog.  New file.
3466
3467 \f
3468 Copyright (C) 2021 Free Software Foundation, Inc.
3469
3470 Copying and distribution of this file, with or without modification,
3471 are permitted in any medium without royalty provided the copyright
3472 notice and this notice are preserved.