aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog
blob: 370e725605e67b1a4a9ba91cab372b34b4df2b1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
2021-03-12  Nathan Sidwell  <nathan@acm.org>

	PR c++/99238
	* module.cc (depset::hash::add_binding_entity): Assert not
	visited.
	(depset::add::add_specializations): Likewise.
	* name-lookup.c (name_lookup::dedup): New.
	(name_lookup::~name_lookup): Assert not deduping.
	(name_lookup::restore_state): Likewise.
	(name_lookup::add_overload): Replace outlined code with dedup
	call.
	(name_lookup::add_value): Likewise.
	(name_lookup::search_namespace_only): Likewise.
	(name_lookup::adl_namespace_fns): Likewise.
	(name_lookup::adl_class_fns): Likewise.
	(name_lookup::search_adl): Likewise.  Add clearing dedup call.
	(name_lookup::search_qualified): Likewise.
	(name_lookup::search_unqualified): Likewise.

2021-03-12  Jakub Jelinek  <jakub@redhat.com>

	PR c++/99507
	* call.c (build_over_call): For immediate evaluation of functions
	that return references, undo convert_from_reference effects before
	calling cxx_constant_value and call convert_from_reference
	afterwards.

2021-03-11  Nathan Sidwell  <nathan@acm.org>

	PR c++/99248
	* name-lookup.c (lookup_elaborated_type_1): Access slot not bind
	when there's a binding vector.
	* ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.

2021-03-11  Nathan Sidwell  <nathan@acm.org>

	PR c++/99528
	* module.cc (enum merge_kind): Delete MK_type_tmpl_spec,
	MK_decl_tmpl_spec.
	(trees_in::decl_value): Adjust add_mergeable_specialization call.
	(trees_out::get_merge_kind): Adjust detecting a partial template
	instantiation.
	(trees_out::key_mergeable): Adjust handling same.
	(trees_in::key_mergeabvle): Likewise.

2021-03-10  Nathan Sidwell  <nathan@acm.org>

	PR c++/99423
	* module.cc (post_load_processing): Assert not gcable.
	(laxy_load_pendings): Extend no-gc region around
	post_load_processing.

2021-03-10  Nathan Sidwell  <nathan@acm.org>

	PR c++/99508
	* decl.c (make_rtl_for_nonlocal_decl): Propagate local-extern's
	assembler name to the ns alias.

2021-03-09  Jakub Jelinek  <jakub@redhat.com>

	PR c++/99459
	* coroutines.cc (build_co_await): Look through NOP_EXPRs in
	build_special_member_call return value to find the CALL_EXPR.
	Simplify.

2021-03-09  Nathan Sidwell  <nathan@acm.org>

	PR c++/99472
	* parser.c (cp_parser_diagnose_invalid_type_name): Clarify
	that C++20 does not yet imply modules.

2021-03-08  Nathan Sidwell  <nathan@acm.org>

	PR c++/99436
	* name-lookup.c (get_cxx_dialect_name): Add cxx23.

2021-03-08  Nathan Sidwell  <nathan@acm.org>

	* lex.c (module_token_filter::resume): Ignore module-decls inside
	header-unit.
	* parser.c (cp_parser_module_declaration): Reject in header-unit.

2021-03-08  Nathan Sidwell  <nathan@acm.org>

	PR c++/99285
	* cp-tree.h (match_mergeable_specialization)
	(add_mergeable_specialization): Adjust parms.
	* module.cc (trees_in::decl_value): Adjust
	add_mergeable_specialization calls.
	(trees_out::key_mergeable): Adjust match_mergeable_specialization
	calls.
	(specialization_add): Likewise.
	* pt.c (match_mergeable_specialization): Do not insert.
	(add_mergeable_specialization): Add to hash table here.

2021-03-06  Patrick Palka  <ppalka@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	PR c++/99287
	* constexpr.c (cxx_eval_increment_expression): Pass lval when
	evaluating the MODIFY_EXPR, and update 'mod' with the result of
	this evaluation.  Check *non_constant_p afterwards.  For prefix
	ops, just return 'mod'.

2021-03-06  Patrick Palka  <ppalka@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	PR c++/96330
	* pt.c (tsubst_copy) <case TEMPLATE_ID_EXPR>: Rename local
	variable 'fn' to 'tmpl'.  Handle a variable template-id by
	calling lookup_template_variable.

2021-03-06  Patrick Palka  <ppalka@redhat.com>

	PR c++/99365
	* pt.c (unify) <case TEMPLATE_TYPE_PARM>: Pass targs as
	outer_targs to do_auto_deduction.
	(placeholder_type_constraint_dependent_p): Define.
	(do_auto_deduction): When processing_template_decl != 0
	and context is adc_unify and we have constraints, pretend the
	constraints are satisfied instead of punting.  Otherwise don't
	punt unless placeholder_type_constraint_dependent_p holds.
	Add some clarifying sanity checks.  Add a hack to add missing
	outermost template levels to outer_args before checking
	satisfaction.  Don't substitute outer_targs into type if it's
	already been done.

2021-03-05  Marek Polacek  <polacek@redhat.com>

	PR c++/99374
	* call.c (standard_conversion): When converting pointers to
	member, don't return NULL when the bases are equivalent but
	incomplete.

2021-03-05  Marek Polacek  <polacek@redhat.com>

	PR c++/99120
	* name-lookup.c (check_local_shadow): Check if the type of decl
	is non-null before checking TYPE_PTR*.

2021-03-05  Nathan Sidwell  <nathan@acm.org>

	PR c++/99245
	* module.cc (module_state::write_cluster): Relax binding assert.

2021-03-05  Nathan Sidwell  <nathan@acm.org>

	PR c++/99377
	* pt.c (instantiate_decl): Call set_instantiating_module.

2021-03-05  Iain Sandoe  <iain@sandoe.co.uk>

	PR c++/98118
	* coroutines.cc (build_co_await): Use type_build_ctor_call()
	to determine cases when a CTOR needs to be built.
	(flatten_await_stmt): Likewise.
	(morph_fn_to_coro): Likewise.

2021-03-05  Iain Sandoe  <iain@sandoe.co.uk>

	PR c++/95616
	* coroutines.cc (coro_diagnose_throwing_fn): New helper.
	(coro_diagnose_throwing_final_aw_expr): New helper.
	(build_co_await): Diagnose throwing final await expression
	components.
	(build_init_or_final_await): Diagnose a throwing promise
	final_suspend() call.

2021-03-05  Iain Sandoe  <iain@sandoe.co.uk>

	PR c++/95615
	* coroutines.cc (struct param_info): Track parameter copies that need
	a DTOR.
	(coro_get_frame_dtor): New helper function factored from build_actor().
	(build_actor_fn): Use coro_get_frame_dtor().
	(morph_fn_to_coro): Track parameters that need DTORs on exception,
	likewise the frame promise and the return object.  On exception, run the
	DTORs for these, destroy the frame and then rethrow the exception.

2021-03-05  Nathan Sidwell  <nathan@acm.org>

	PR c++/99389
	* pt.c (instantiate_class_template_1): Set instantiating module
	here.

2021-03-05  Tobias Burnus  <tobias@codesourcery.com>

	PR c/99137
	* parser.c (cp_parser_oacc_clause_async): Reject comma expressions.

2021-03-04  Jakub Jelinek  <jakub@redhat.com>

	PR c++/88146
	PR c++/99362
	* cvt.c (convert_to_void): Revert 2019-10-17 changes.  Clarify
	comment.

2021-03-04  Nathan Sidwell  <nathan@acm.org>

	PR c++/99170
	* module.cc (class uintset): Delete.
	(typedef attached_map_t): A hash map.
	(attached_table): Use attached_map_t.  Adjust uses ...
	(trees_out::decl_value, trees_in::decl_value): ... here ...
	(trees_out::key_mergeable): ... here ...
	(trees_in::key_mergeable): ... here ...
	(maybe_attach_decl): ... here ...
	(direct_import): ... and here.

2021-03-04  Nathan Sidwell  <nathan@acm.org>

	PR c++/99170
	* cp-tree.h
	* lex.c (cxx_dup_lang_specific_decl): Adjust for module_attached_p
	rename.
	* module.cc (class pending_key): New.
	(default_hash_traits<pending_key>): New specialization.
	(pending_map_t): New typedef.
	(pending_table): Replace old table.
	(trees_out::lang_decl_bools): Adjust.
	(trees_in::lang_decl_bools): Adjust.
	(trees_in::install_entity): Drop pending member and specialization
	handling.
	(find_pending_key): New.
	(depset::hash::fiund_dependencies): Use it.
	(pendset_lazy_load): Delete.
	(module_state::write_cluster): Don't count pendings here.  Bye
	Duff's device-like thing.
	(module_state::write_pendings): Reimplement.
	(module_state::read_pendings): Reimplement.
	(lazy_specializations_p): Delete.
	(module_state::write): Adjust write_pendings call.
	(lazy_load_pendings): New.
	(lazy_load_specializations): Delete.
	(lazy_load_members): Delete.
	(init_modules):	Adjust.
	* name-lookup.c (maybe_lazily_declare):	Call lazy_load_pendings
	not lazy_load_members.
	(note_pending_specializations): Delete.
	(load_pending_specializations): Delete.
	* name-lookup.h	(BINDING_VECTR_PENDING_SPECIALIZATIONS_P): Delete.
	(BINDING_VECTOR_PENDING_MEMBERS_P): Delete.
	(BINDING_VECTR_PENDING_MEMBERS_P): Delete.
	(note_pending_specializations): Delete.
	(load_pending_specializations): Delete.
	* pt.c (lookup_template_class_1): Call lazy_load_pendings not
	lazy_load_specializations.
	(instantiate_template_class_1): Likewise.
	(instantiate_decl): Call lazy_load_pendings.
	* typeck.c (complete_type): Likewise.

2021-03-03  Nathan Sidwell  <nathan@acm.org>

	PR c++/99170
	* module.cc (post_load_decls): New.
	(lazy_snum, recursive_lazy): Move earlier.
	(module_state::read_cluster): Push cloning onto post_load_decls.
	(post_load_processing): New.  Do the cloning here.
	(module_state::read_inits): Call post_load_processing.
	(module_state::read_language): Likewise.
	(lazy_load_binding, lazy_load_specializations): Likewise
	(lazy_load_members): Likewise

2021-03-03  Nathan Sidwell  <nathan@acm.org>

	PR c++/99170
	* module.cc (trees_out::decl_value): Stream specialization keys
	after decl.
	(trees_in::decl_value): Stream them back and insert after
	completing the decl.
	(trees_out::key_mergeable): Drop some streaming here ...
	(trees_in::key_mergeable): ... and here.  Don't insert into
	specialization tables.

2021-03-03  Patrick Palka  <ppalka@redhat.com>

	* constraint.cc (struct sat_info): Document the different
	meanings of noisy() and diagnose_unsatisfaction_p() during
	satisfaction and requires-expression evaluation.
	(tsubst_valid_expression_requirement): Take a sat_info instead
	of a subst_info.  Perform the substitution quietly first.  Fold
	in error-replaying code from diagnose_valid_expression.
	(tsubst_simple_requirement): Take a sat_info instead of a
	subst_info.
	(tsubst_type_requirement_1): New.  Fold in error-replaying code
	from diagnose_valid_type.
	(tsubst_type_requirement): Use the above.  Take a sat_info
	instead of a subst_info.
	(tsubst_compound_requirement): Likewise.  Fold in
	error-replaying code from diagnose_compound_requirement.
	(tsubst_nested_requirement): Take a sat_info instead of a
	subst_info.  Fold in error-replaying code from
	diagnose_nested_requirement.
	(tsubst_requirement): Take a sat_info instead of a subst_info.
	(tsubst_requires_expr): Split into two versions, one that takes
	a sat_info argument and another that takes a complain and
	in_decl argument.  Remove outdated documentation.  Document the
	effects of the sat_info argument.  Don't short-circuit
	processing of requirements when diagnosing unsatisfaction,
	mirroring diagnose_requires_expr.
	(satisfy_nondeclaration_constraint) <case REQUIRES_EXPR>: Remove
	assert, and se the three-parameter version of tsubst_requires_expr.
	(diagnose_trait_expr): Make static.  Take a template argument
	vector instead of a parameter mapping.
	(diagnose_valid_expression): Remove.
	(diagnose_valid_type): Remove.
	(diagnose_simple_requirement): Remove.
	(diagnose_compound_requirement): Remove.
	(diagnose_type_requirement): Remove.
	(diagnose_nested_requirement): Remove.
	(diagnose_requirement): Remove.
	(diagnose_requires_expr): Remove.
	(diagnose_atomic_constraint): Take a sat_info instead of a
	subst_info.  Adjust call to diagnose_trait_expr.  Call
	tsubst_requires_expr instead of diagnose_requires_expr.
	(diagnose_constraints): Remove special casing of REQUIRES_EXPR
	and just always call constraint_satisfaction_value.

2021-03-03  Patrick Palka  <ppalka@redhat.com>

	* constexpr.c (cxx_eval_call_expression): Adjust call to
	evaluate_concept_check.
	(cxx_eval_constant_expression) <case REQUIRES_EXPR>: Use
	evaluate_requires_expression instead of
	satisfy_constraint_expression.
	<case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
	* constraint.cc (struct sat_info): Adjust comment about which
	satisfaction entrypoints use noisy-unsat.
	(normalize_template_requirements): Remove (and adjust callers
	appropriately).
	(normalize_nontemplate_requirements): Likewise.
	(tsubst_nested_requirement): Use constraint_satisfaction_value
	instead of satisfy_constraint_expression, which'll do the
	noisy replaying of ill-formed quiet satisfaction for us.
	(decl_satisfied_cache): Adjust comment.
	(satisfy_constraint): Rename to ...
	(satisfy_normalized_constraints): ... this.
	(satisfy_associated_constraints): Remove (and make its
	callers check for dependent arguments).
	(satisfy_constraint_expression): Rename to ...
	(satisfy_nondeclaration_constraints): ... this.  Assert that
	'args' is empty when 't' is a concept-id.  Removing handling
	bare constraint-expressions, and handle REQUIRES_EXPRs
	specially.  Adjust comment accordingly.
	(satisfy_declaration_constraints): Assert in the two-parameter
	version that 't' is not a TEMPLATE_DECL.  Adjust following
	removal of normalize_(non)?template_requirements and
	satisfy_asociated_constraints.
	(constraint_satisfaction_value): Combine the two- and
	three-parameter versions in the natural way.
	(constraints_satisfied_p): Combine the one- and two-parameter
	versions in the natural way.  Improve documentation.
	(evaluate_requires_expr): Define.
	(evaluate_concept_check): Remove 'complain' parameter.  Use
	constraint_satisfaction_value instead of
	satisfy_constraint_expression.
	(diagnose_nested_requirement): Adjust following renaming of
	satisfy_constraint_expression.
	(diagnose_constraints): Handle REQUIRES_EXPR by going through
	diagnose_requires_expr directly instead of treating it as a
	constraint-expression.  Improve documentation.
	* cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Adjust call
	to evaluate_concept_check.
	<case REQUIRES_EXPR>: Use evaluate_requires_expr instead of
	constraints_satisfied_p.
	<case TEMPLATE_ID_EXPR>: Adjust call to evaluate_concept_check.
	* cp-tree.h (evaluate_requires_expr): Declare.
	(evaluate_concept_check): Remove tsubst_flag_t parameter.
	(satisfy_constraint_expression): Remove declaration.
	(constraints_satisfied_p): Remove one-parameter declaration.
	Add a default argument to the two-parameter declaration.
	* cvt.c (convert_to_void): Adjust call to
	evaluate_concept_check.

2021-03-03  Jakub Jelinek  <jakub@redhat.com>

	PR c++/82959
	* call.c (op_is_ordered): Handle TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR
	and COMPOUND_EXPR.

2021-03-03  Marek Polacek  <polacek@redhat.com>

	PR c++/97034
	PR c++/99009
	* pt.c (build_deduction_guide): Use INNERMOST_TEMPLATE_ARGS.
	(maybe_aggr_guide): Use the original template type where needed.  In
	a class member template, partially instantiate the result of
	collect_ctor_idx_types.
	(do_class_deduction): Defer the deduction until the enclosing
	scope is non-dependent.

2021-03-03  Jason Merrill  <jason@redhat.com>

	PR c++/95675
	* call.c (build_temp): Wrap a CALL_EXPR in a TARGET_EXPR
	if it didn't get one before.

2021-03-03  Nathan Sidwell  <nathan@acm.org>

	PR c++/99344
	* module.cc (trees_out::decl_node): Small refactor.
	(depset::hash::add_binding_entity): Return true on meeting an
	import.  Set namespace's import here.
	(module_state:write_namespaces): Inform of purview too.
	(module_state:read_namespaces): Adjust.
	* name-lookup.c (implicitly_export_namespace): Delete.
	(do_pushdecl): Don't call it.
	(push_namespace): Likewise, set purview.
	(add_imported_namespace): Reorder parms.
	* name-lookup.h (add_imported_namespace): Alter param ordering.

2021-03-02  Martin Sebor  <msebor@redhat.com>

	PR c++/99251
	* class.c (build_base_path): Call build_if_nonnull.
	* cp-tree.h (build_if_nonnull): Declare.
	* rtti.c (ifnonnull): Rename...
	(build_if_nonnull): ...to this.  Set no-warning bit on COND_EXPR.
	(build_dynamic_cast_1): Adjust to name change.

2021-03-02  Patrick Palka  <ppalka@redhat.com>

	PR c++/96443
	PR c++/96960
	* constraint.cc (type_deducible_p): Don't substitute into the
	constraints, and instead just pass 'args' to do_auto_deduction
	as the outer template arguments.
	(tsubst_parameter_mapping): Remove confused code for handling
	placeholder type arguments.
	(normalize_placeholder_type_constraint): Define.
	(satisfy_constraint_expression): Use it to handle placeholder
	'auto' types.
	* cp-tree.h (PLACEHOLDER_TYPE_CONSTRAINTS_INFO): Define.
	(PLACEHOLDER_TYPE_CONSTRAINTS): Redefine in terms of the above.
	* pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: Use
	PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
	(make_constrained_placeholder_type): Set
	PLACEHOLDER_TYPE_CONSTRAINTS_INFO instead.
	(do_auto_deduction): Clarify comments about the outer_targs
	parameter.  Rework satisfaction of a placeholder type constraint
	to pass in the complete set of template arguments directly to
	constraints_satisfied_p.
	(splice_late_return_type): Use PLACEHOLDER_TYPE_CONSTRAINTS_INFO
	instead.  Also rebuild the the constraint info on the new auto.

2021-03-02  Patrick Palka  <ppalka@redhat.com>

	* constraint.cc (build_parameter_mapping): Rely on the caller to
	determine the in-scope template parameters.
	(norm_info::norm_info): Delegate the tsubst_flags_t constructor
	to the two-parameter constructor.  In the two-parameter
	constructor, fold in the definition of make_context, set
	initial_parms appropriately, and don't set the now-removed
	orig_decl member.
	(norm_info::make_context): Remove, now that its only use is
	inlined into the caller.
	(norm_info::update_context): Adjust call to
	build_parameter_mapping to pass in the relevant set of in-scope
	template parameters.
	(norm_info::ctx_parms): Define this member function.
	(norm_info::context): Initialize to NULL_TREE.
	(norm_info::orig_decl): Remove this data member.
	(norm_info::initial_parms): Define this data member.
	(normalize_atom): Adjust call to build_parameter_mapping to pass
	in the relevant set of in-scope template parameters.  Use
	info.initial_parms instead of info.orig_decl.
	(normalize_constraint_expression): Take a norm_info object
	instead of a bool.  Cache the result of normalization.
	(tsubst_nested_requirement): Call satisfy_constraint_expression
	instead of satisfy_constraint, so that we normalize on demand.
	(satisfy_constraint_expression): Handle a NESTED_REQ argument.
	Adjust call to normalize_constraint_expression.
	(finish_nested_requirement): Set the TREE_TYPE of the NESTED_REQ
	to current_template_parms.
	(diagnose_nested_requirements): Go through
	satisfy_constraint_expression, as with tsubst_nested_requirement.

2021-03-02  Patrick Palka  <ppalka@redhat.com>

	* constraint.cc (tsubst_parameter_mapping): Canonicalize the
	arguments of a substituted TYPE_ARGUMENT_PACK even if we've
	started with a TYPE_ARGUMENT_PACK.
	(finish_requires_expr): Don't set DECL_CONTEXT and
	CONSTRAINT_VAR_P on each of the introduced parameters here.
	* parser.c (cp_parser_requirement_parameter_list): Instead set
	these fields earlier, here.
	* pt.c (do_auto_deduction): Canonicalize the result of
	do_auto_deduction.  Pass 'complain' to finish_decltype_type.

2021-03-02  Patrick Palka  <ppalka@redhat.com>

	* constraint.cc (tsubst_simple_requirement): Just return
	boolean_true_node on success.
	(tsubst_type_requirement): Likewise.
	(tsubst_compound_requirement): Likewise.
	(tsubst_nested_requirement): Likewise.
	(tsubst_requirement_body): Remove.
	(check_constaint_variables): Rename to ...
	(check_constraint_variables): ... this.
	(tsubst_constraint_variables): Adjust.
	(tsubst_requires_expr): Fold tsubst_requirement_body into here.

2021-03-01  Nathan Sidwell  <nathan@acm.org>

	PR c++/99294
	* class.c (fixup_type_variants): Propagate mode, precision,
	alignment & emptiness.
	* module.cc (trees_out::type_node): Use TYPE_ALIGN_RAW.
	(trees_in::tree_node): Rematerialize alignment here.

2021-02-27  Jason Merrill  <jason@redhat.com>

	PR c++/90333
	* parser.c (cp_parser_lambda_declarator_opt): Accept GNU attributes
	between () and ->.

2021-02-26  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_lambda_declarator_opt): Implement
	P1102R2 - Down with ()! Make ()s optional before lambda specifiers
	for -std={c,gnu}++2b or with pedwarn in earlier versions.

2021-02-26  Jakub Jelinek  <jakub@redhat.com>

	PR c++/95451
	* lambda.c (is_lambda_ignored_entity): Before checking for
	LAMBDA_FUNCTION_P, use OVL_FIRST.  Drop FUNCTION_DECL check.

2021-02-26  Jason Merrill  <jason@redhat.com>

	PR c++/98810
	* pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const
	to a class non-type template argument that needs it.

2021-02-26  Patrick Palka  <ppalka@redhat.com>

	PR c++/98990
	* pt.c (splice_late_return_type): Rebuild the entire return type
	if we have to adjust the level of an auto within.
	(type_uses_auto): Adjust call to find_type_usage.
	* type-utils.h (find_type_usage): Revert r10-6571 change that
	made this function return a pointer to the auto node.

2021-02-25  Patrick Palka  <ppalka@redhat.com>

	PR c++/99213
	PR c++/94521
	* error.c (dump_scope): Pass TFF_NO_TEMPLATE_BINDINGS instead of
	TFF_NO_FUNCTION_ARGUMENTS when dumping a function scope.

2021-02-25  Patrick Palka  <ppalka@redhat.com>

	PR c++/99103
	* pt.c (is_spec_or_derived): Drop cv-qualifiers from 'etype'.
	(maybe_aggr_guide): Fix order of arguments to is_spec_or_derived.

2021-02-25  Marek Polacek  <polacek@redhat.com>

	DR 1312
	PR c++/99176
	* constexpr.c (is_std_construct_at): New overload.
	(is_std_allocator_allocate): New overload.
	(cxx_eval_call_expression): Use the new overloads.
	(cxx_eval_constant_expression): Reject casting
	from void * as per DR 1312.  Don't check can_convert.

2021-02-25  Iain Sandoe  <iain@sandoe.co.uk>

	PR c++/97587
	* coroutines.cc (struct param_info): Track rvalue refs.
	(morph_fn_to_coro): Track rvalue refs, and call the promise
	CTOR with the frame copy of passed parms.

2021-02-25  Iain Sandoe  <iain@sandoe.co.uk>

	PR c++/95822
	* coroutines.cc (morph_fn_to_coro): Unconditionally remove any
	set throwing_cleanup marker.

2021-02-25  Nathan Sidwell  <nathan@acm.org>

	PR c++/99166
	* module.cc (module_state::inform_cmi_p): Renamed field.
	(module_state::do_import): Adjust.
	(init_modules, finish_module_processing): Likewise.
	(handle_module_option): Likewise.

2021-02-25  Nathan Sidwell  <nathan@acm.org>

	PR c++/98318
	* mapper-client.cc (module_client::open_module_client): Fix typo
	of fd init.

2021-02-24  Nathan Sidwell  <nathan@acm.org>

	PR c++/98718
	* module.cc (ool): New indirection vector.
	(loc_spans::maybe_propagate): Location is not optional.
	(loc_spans::open): Likewise.  Assert monotonically advancing.
	(module_for_ordinary_loc): Use ool indirection vector.
	(module_state::write_prepare_maps): Do not count empty macro
	expansions.  Elide empty spans.
	(module_state::write_macro_maps): Skip empty expansions.
	(ool_cmp): New qsort comparator.
	(module_state::write): Create and destroy ool vector.
	(name_pending_imports): Fix dump push/pop.
	(preprocess_module): Likewise.  Add more dumping.
	(preprocessed_module): Likewise.

2021-02-24  Iain Sandoe  <iain@sandoe.co.uk>

	PR c++/96251
	* coroutines.cc (coro_common_keyword_context_valid_p): Suppress
	error reporting when instantiating for a constexpr.

2021-02-23  Nathan Sidwell  <nathan@acm.org>

	PR c++/99208
	* decl.c (name_unnamed_type): Check DECL identity, not IDENTIFIER
	identity.

2021-02-23  Patrick Palka  <ppalka@redhat.com>

	PR c++/95468
	* pt.c (tsubst_copy_and_build) <case BASELINK>: New case, copied
	over from tsubst_copy.

2021-02-23  Patrick Palka  <ppalka@redhat.com>

	* pt.c (instantiation_dependent_expression_p): Check
	processing_template_decl before calling
	potential_constant_expression.

2021-02-22  Nathan Sidwell  <nathan@acm.org>

	PR c++/99174
	* module.cc (struct module_state): Add visited_p flag.
	(name_pending_imports): Use it to avoid duplicate requests.
	(preprocess_module): Don't read preprocessor state if we failed to
	load a module's config.

2021-02-22  Nathan Sidwell  <nathan@acm.org>

	PR c++/99153
	* decl.c (duplicate_decls): Move DECL_MODULE_IMPORT_P propagation
	to common-path.
	* module.cc (set_defining_module): Add assert.

2021-02-19  Nathan Sidwell  <nathan@acm.org>

	PR c++/98741
	* module.cc (pending_imports): New.
	(declare_module): Adjust test condition.
	(name_pending_imports): New.
	(preprocess_module): Reimplement using pending_imports.
	(preprocessed_module): Move name-getting to name_pending_imports.
	* name-lookup.c (append_imported_binding_slot): Assert module
	ordering is increasing.

2021-02-19  Nathan Sidwell  <nathan@acm.org>

	* module.cc (note_cmis): New.
	(struct module_state): Add inform_read_p bit.
	(module_state::do_import): Inform of CMI location, if enabled.
	(init_modules): Canonicalize note_cmis entries.
	(handle_module_option): Handle -flang-info-module-read=FOO.

2021-02-19  Jason Merrill  <jason@redhat.com>

	PR c++/96926
	* call.c (perfect_conversion_p): Limit rvalueness
	test to reference bindings.

2021-02-19  Jason Merrill  <jason@redhat.com>

	PR c++/96926
	* call.c (perfect_conversion_p): New.
	(perfect_candidate_p): New.
	(add_candidates): Ignore templates after a perfect non-template.

2021-02-18  Nathan Sidwell  <nathan@acm.org>

	PR c++/99023
	* module.cc (canonicalize_header_name): Use
	cpp_probe_header_unit.
	(maybe_translate_include): Fix note_includes comparison.
	(init_modules): Fix note_includes string termination.

2021-02-18  Jakub Jelinek  <jakub@redhat.com>

	PR c++/99132
	* cp-gimplify.c (cp_genericize_r) <case CALL_EXPR>: Use
	cp_get_callee_fndecl_nofold instead of cp_get_callee_fndecl to check
	for immediate function calls.

2021-02-17  Nathan Sidwell  <nathan@acm.org>

	PR c++/99023
	* module.cc (struct macro_export): Add GTY markers.
	(macro_exports): Likewise, us a va_gc Vector.

2021-02-17  Jakub Jelinek  <jakub@redhat.com>

	PR sanitizer/99106
	* init.c (build_zero_init_1): For flexible array members just return
	NULL_TREE instead of returning empty CONSTRUCTOR with non-complete
	ARRAY_TYPE.

2021-02-17  Nathan Sidwell  <nathan@acm.org>

	PR c++/99116
	* name-lookup.c (do_pushdecl): Don't peek under template_parm
	bindings here ...
	(set_identifier_type_value_with_scope): ... or here.
	(do_pushtag): Only set_identifier_type_value_with_scope at
	non-class template parm scope, and use parent scope.

2021-02-17  Nathan Sidwell  <nathan@acm.org>

	PR c++/99071
	* name-lookup.c (maybe_record_mergeable_decl): Deref the correct
	pointer.

2021-02-17  Patrick Palka  <ppalka@redhat.com>

	PR debug/96997
	PR c++/94034
	* tree.c (build_aggr_init_expr): Revert r10-7718 change.

2021-02-12  Nathan Sidwell  <nathan@acm.org>

	* module.cc (module_state::write_cluster): Check bindings for
	imported using-decls.

2021-02-12  Nathan Sidwell  <nathan@acm.org>

	PR c++/99040
	* module.cc (trees_in::decl_value): Call add_module_namespace_decl
	for new namespace-scope entities.
	(module_state::read_cluster): Don't call add_module_decl here.
	* name-lookup.h (add_module_decl): Rename to ...
	(add_module_namespace_decl): ... this.
	* name-lookup.c (newbinding_bookkeeping): Move into ...
	(do_pushdecl): ... here.  Its only remaining caller.
	(add_module_decl): Rename to ...
	(add_module_namespace_decl): ... here.  Add checking-assert for
	circularity. Don't call newbinding_bookkeeping, just extern_c
	checking and incomplete var checking.

2021-02-12  Nathan Sidwell  <nathan@acm.org>

	PR c++/99039
	PR c++/99040
	* cp-tree.h (CPTI_GLOBAL_TYPE): Delete.
	(global_type_node): Delete.
	(IDENTIFIER_TYPE_VALUE): Delete.
	(IDENTIFIER_HAS_TYPE_VALUE): Delete.
	(get_type_value): Delete.
	* name-lookup.h (identifier_type_value): Delete.
	* name-lookup.c (check_module_override): Don't
	SET_IDENTIFIER_TYPE_VALUE here.
	(do_pushdecl): Nor here.
	(identifier_type_value_1, identifier_type_value): Delete.
	(set_identifier_type_value_with_scope): Only
	SET_IDENTIFIER_TYPE_VALUE for local and class scopes.
	(pushdecl_nanmespace_level): Remove shadow stack nadgering.
	(do_pushtag): Use REAL_IDENTIFIER_TYPE_VALUE.
	* call.c (check_dtor_name): Use lookup_name.
	* decl.c (cxx_init_decl_processing): Drop global_type_node.
	* decl2.c (cplus_decl_attributes): Don't SET_IDENTIFIER_TYPE_VALUE
	here.
	* init.c (get_type_value): Delete.
	* pt.c (instantiate_class_template_1): Don't call pushtag or
	SET_IDENTIFIER_TYPE_VALUE here.
	(tsubst): Assert never an identifier.
	(dependent_type_p): Drop global_type_node assert.
	* typeck.c (error_args_num): Don't use IDENTIFIER_HAS_TYPE_VALUE
	to determine ctorness.

2021-02-12  Jakub Jelinek  <jakub@redhat.com>

	PR c++/97742
	* parser.c (cp_parser_requirement_seq): Stop iterating after reaching
	CPP_EOF.

2021-02-12  Jason Merrill  <jason@redhat.com>

	PR c++/97246
	PR c++/94546
	* pt.c (extract_fnparm_pack): Check DECL_PACK_P here.
	(register_parameter_specializations): Not here.

2021-02-11  Marek Polacek  <polacek@redhat.com>

	PR c++/95888
	* pt.c (lookup_template_class_1): Pass tf_none to tsubst when looking
	for the partial instantiation.

2021-02-11  Jakub Jelinek  <jakub@redhat.com>

	PR c++/99033
	* init.c (build_zero_init_1): Handle zero initialiation of
	flexible array members like initialization of [0] arrays.
	Use integer_minus_onep instead of comparison to integer_minus_one_node
	and integer_zerop instead of comparison against size_zero_node.
	Formatting fixes.

2021-02-11  Marek Polacek  <polacek@redhat.com>

	PR c++/99063
	* semantics.c (finish_do_stmt): Check for unexpanded parameter packs.

2021-02-11  Patrick Palka  <ppalka@redhat.com>

	PR c++/97582
	* name-lookup.c (op_unqualified_lookup): Handle an ambiguous
	lookup result by discarding it if the first element is a
	class-scope declaration, otherwise return it.
	(push_operator_bindings): Handle an ambiguous lookup result by
	doing push_local_binding on each element in the list.

2021-02-11  Marek Polacek  <polacek@redhat.com>

	* parser.c (cp_parser_selection_statement): Use vec_free.

2021-02-10  Jakub Jelinek  <jakub@redhat.com>

	PR c++/98988
	PR c++/99031
	* constexpr.c: Include cgraph.h.
	(cxx_eval_call_expression): Call varpool_node::finalize_decl on
	heap artificial vars.
	(cxx_eval_outermost_constant_expr): Remove varpool nodes for
	heap artificial vars.

2021-02-10  Nathan Sidwell  <nathan@acm.org>

	PR c++/99030
	* pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
	answer if there's no local specialization.

2021-02-09  Nathan Sidwell  <nathan@acm.org>

	PR c++/98944
	* module.cc (module_state::is_rooted): Rename to ...
	(module_state::has_location): ... here.  Adjust callers.
	(module_state::read_partitions): Adjust validity check.
	Don't overwrite a known location.

2021-02-09  Jason Merrill  <jason@redhat.com>

	PR c++/96905
	* pt.c (mark_decl_instantiated): Exit early if consteval.

2021-02-09  Jason Merrill  <jason@redhat.com>

	PR c++/98326
	PR c++/20408
	* cp-gimplify.c (simple_empty_class_p): Don't touch an invisiref
	parm.

2021-02-09  Jason Merrill  <jason@redhat.com>

	PR c++/98994
	PR c++/97566
	* constexpr.c (cxx_eval_store_expression): Only skip empty fields in
	RECORD_TYPE.

2021-02-08  Nathan Sidwell  <nathan@acm.org>

	* decl.c (start_cleanup_fn): Push function into
	namespace.

2021-02-08  Nathan Sidwell  <nathan@acm.org>

	PR c++/98531
	* cp-tree.h (push_abi_namespace, pop_abi_namespace): Declare.
	* decl.c (push_abi_namespace, pop_abi_namespace): Moved
	from rtti.c, add default namespace arg.
	(check_redeclaration_exception_specification): Allow a lazy
	builtin's eh spec to differ from an lready-declared user
	declaration.
	(declare_global_var): Use push/pop_abi_namespace.
	(get_atexit_node): Push the fndecl into a namespace.
	* rtti.c (push_abi_namespace, pop_abi_namespace): Moved to
	decl.c.

2021-02-08  Marek Polacek  <polacek@redhat.com>

	* cp-tree.h (CLASSTYPE_TI_TEMPLATE): Fix typo.

2021-02-05  Marek Polacek  <polacek@redhat.com>

	PR c++/98947
	* call.c (build_conditional_expr_1): Don't call mark_lvalue_use
	on arg2/arg3.
	* expr.c (mark_use) <case MODIFY_EXPR>: Don't check read_p when
	issuing the -Wvolatile warning.  Only set TREE_THIS_VOLATILE if
	a warning was emitted.

2021-02-05  Marek Polacek  <polacek@redhat.com>

	PR c++/96462
	* name-lookup.c (lookup_using_decl): Hoist the destructor check.

2021-02-05  Jakub Jelinek  <jakub@redhat.com>

	PR c++/97878
	* decl.c (check_array_initializer): For structured bindings, require
	the array type to be complete.

2021-02-04  Jason Merrill  <jason@redhat.com>

	PR c++/98717
	* constraint.cc (build_concept_check_arguments): Remove assert.
	(build_concept_check): Allow empty args.

2021-02-04  Tom Greenslade (thomgree)  <thomgree@cisco.com>

	PR c++/90926
	* call.c (can_convert_array): Extend to handle all valid aggregate
	initializers of an array; including by string literals, not just by
	brace-init-list.
	(build_aggr_conv): Call can_convert_array more often, not just in
	brace-init-list case.
	* typeck2.c (array_string_literal_compatible_p): New function.
	(digest_init_r): call array_string_literal_compatible_p
	* cp-tree.h: (array_string_literal_compatible_p): Declare.

2021-02-04  Jason Merrill  <jason@redhat.com>

	PR c++/98802
	* pt.c (do_class_deduction): No aggregate guide if any_dguides_p.

2021-02-04  Jason Merrill  <jason@redhat.com>

	PR c++/95192
	* pt.c (tsubst_attribute): Handle error.
	(apply_late_template_attributes): Return false on error.
	(tsubst_function_decl): Check its return value.
	(tsubst_decl): Likewise.
	(push_template_decl): Assert current_template_parms.
	(tsubst_template_decl): Set current_template_parms.

2021-02-03  Marek Polacek  <polacek@redhat.com>

	PR c++/98951
	* call.c (struct z_candidate): Mark rewritten and reversed as const.
	(struct NonPublicField): Mark operator() as const.
	(struct NonTrivialField): Likewise.

2021-02-03  Jason Merrill  <jason@redhat.com>

	PR c++/98926
	PR c++/98570
	* pt.c (spec_hasher::equal): Set processing_template_decl.
	* Make-lang.in (check-g++-strict-gc): Add --param
	hash-table-verification-limit=10000.

2021-02-03  Marek Polacek  <polacek@redhat.com>

	PR c++/98899
	* parser.c (cp_parser_class_specifier_1): Use any possible
	DEFPARSE_INSTANTIATIONS to update DEFERRED_NOEXCEPT_PATTERN.
	(cp_parser_save_noexcept): Initialize DEFPARSE_INSTANTIATIONS.
	* pt.c (tsubst_exception_specification): Stash new_specs into
	DEFPARSE_INSTANTIATIONS.
	* tree.c (fixup_deferred_exception_variants): Use
	UNPARSED_NOEXCEPT_SPEC_P.

2021-02-02  Jason Merrill  <jason@redhat.com>

	PR c++/98929
	PR c++/96199
	* error.c (dump_expr): Ignore dummy object.
	* pt.c (tsubst_baselink): Handle dependent scope.

2021-02-01  Patrick Palka  <ppalka@redhat.com>

	PR c++/98295
	* constexpr.c (cxx_eval_array_reference): Also set
	new_ctx.object when setting new_ctx.ctor.

2021-02-01  Marek Polacek  <polacek@redhat.com>

	PR c++/98355
	* parser.c (cp_parser_has_attribute_expression): Use
	uses_template_parms instead of type_dependent_expression_p.

2021-02-01  Jason Merrill  <jason@redhat.com>

	PR c++/98570
	* cp-tree.h: Declare it.
	* pt.c (comparing_dependent_aliases): New flag.
	(template_args_equal, spec_hasher::equal): Set it.
	(dependent_alias_template_spec_p): Assert that we don't
	get non-types other than error_mark_node.
	(instantiate_alias_template): SET_TYPE_STRUCTURAL_EQUALITY
	on complex alias specializations.  Set TYPE_DEPENDENT_P here.
	(tsubst_decl): Not here.
	* module.cc (module_state::read_cluster): Set
	comparing_dependent_aliases instead of
	comparing_specializations.
	* tree.c (cp_tree_equal): Remove comparing_specializations
	module handling.
	* typeck.c (structural_comptypes): Adjust.
	(comptypes): Remove comparing_specializations handling.

2021-01-29  Nathan Sidwell  <nathan@acm.org>

	PR c++/98843
	* module.cc (module_state_config): Add num_entities field.
	(module_state::read_entities): The entity_ary span is
	already allocated.
	(module_state::write_config): Write num_entities.
	(module_state::read_config): Read num_entities.
	(module_state::write): Set config's num_entities.
	(module_state::read_initial): Allocate the entity ary
	span here.
	(module_state::read_language): Do not set entity_lwm
	here.

2021-01-29  Marek Polacek  <polacek@redhat.com>

	PR c++/96137
	* parser.c (cp_parser_class_name): If parser->scope is
	error_mark_node, return it, otherwise continue.

2021-01-28  Jakub Jelinek  <jakub@redhat.com>

	PR c++/98841
	* typeck.c (build_x_indirect_ref): For *this, return current_class_ref.

2021-01-28  Jakub Jelinek  <jakub@redhat.com>

	PR c++/33661
	PR c++/98847
	* decl.c (cp_finish_decl): For register vars with asmspec in templates
	call set_user_assembler_name and set DECL_HARD_REGISTER.
	* pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars,
	pass asmspec_tree to cp_finish_decl.

2021-01-28  Nathan Sidwell  <nathan@acm.org>

	PR c++/98770
	* module.cc (trees_out::decl_value): Swap is_typedef & TYPE_NAME
	check order.
	(trees_in::decl_value): Do typedef frobbing only when installing
	a new typedef, adjust is_matching_decl call.  Swap is_typedef
	& TYPE_NAME check.
	(trees_in::is_matching_decl): Add is_typedef parm. Adjust variable
	names and deal with typedef checking.

2021-01-27  Jason Merrill  <jason@redhat.com>

	PR c++/97874
	* name-lookup.c (lookup_using_decl): Clean up handling
	of dependency and inherited constructors.
	(finish_nonmember_using_decl): Handle DECL_DEPENDENT_P.
	* pt.c (tsubst_expr): Handle DECL_DEPENDENT_P.

2021-01-26  Jason Merrill  <jason@redhat.com>

	PR c++/97474
	* call.c (type_passed_as): Don't mark invisiref restrict.

2021-01-26  Jason Merrill  <jason@redhat.com>

	PR c++/97566
	PR c++/98463
	* class.c (layout_class_type): An empty field gets size 0.
	(is_empty_field): New.
	(check_bases): Check it.
	* cp-tree.h (is_empty_field): Declare it.
	* constexpr.c (cxx_eval_store_expression): Check it.
	(cx_check_missing_mem_inits): Likewise.
	* init.c (perform_member_init): Likewise.
	* typeck2.c (process_init_constructor_record): Likewise.

2021-01-25  Martin Sebor  <msebor@redhat.com>

	PR c++/98646
	* cvt.c (cp_fold_convert): Propagate TREE_NO_WARNING.

2021-01-25  Jason Merrill  <jason@redhat.com>

	PR c++/98463
	* constexpr.c (get_or_insert_ctor_field): Add check.
	(cxx_eval_store_expression): Handle discontinuity of refs.

2021-01-23  Anthony Sharp  <anthonysharp15@gmail.com>

	* call.c (complain_about_access): Altered function.
	* cp-tree.h (complain_about_access): Changed parameters of function.
	(get_parent_with_private_access): Declared new function.
	* search.c (get_parent_with_private_access): Defined new function.
	* semantics.c (enforce_access): Modified function.
	* typeck.c (complain_about_unrecognized_member): Updated function
	arguments in complain_about_access.

2021-01-23  Patrick Palka  <ppalka@redhat.com>

	PR c++/97399
	* cp-tree.h (shared_member_p): Adjust declaration.
	* parser.c (cp_parser_init_declarator): If the storage class
	specifier is sc_static, pass true for static_p to
	cp_parser_declarator.
	(cp_parser_direct_declarator): Don't do inject_this_parm when
	the declarator is a friend.
	* search.c (shared_member_p): Change return type to bool and
	adjust function body accordingly.  Return false for a dependent
	USING_DECL instead of aborting.
	* semantics.c (finish_qualified_id_expr): Rely on shared_member_p
	even when type-dependent.

2021-01-22  Marek Polacek  <polacek@redhat.com>

	PR c++/96623
	* parser.c (inject_parm_decls): Remove a redundant assignment.
	(cp_parser_class_specifier_1): Clear current_class_{ptr,ref}
	before calling inject_parm_decls.

2021-01-22  Jason Merrill  <jason@redhat.com>

	PR c++/98744
	* call.c (make_base_init_ok): Use DECL_HAS_VTT_PARM_P.

2021-01-22  Jakub Jelinek  <jakub@redhat.com>

	PR sanitizer/95693
	* init.c (build_zero_init_1): Revert the 2018-03-06 change to
	return build_zero_cst for reference types.
	* typeck2.c (process_init_constructor_record): Instead call
	build_zero_cst here during error recovery instead of build_zero_init.

2021-01-22  Marek Polacek  <polacek@redhat.com>

	PR c++/98545
	* mangle.c (write_member_name): Emit abi_warn_or_compat_version_crosses
	warnings regardless of abi_version_at_least.
	(write_expression): When the expression is a dependent name
	and an operator name, write "on" before writing its name.

2021-01-22  Marek Polacek  <polacek@redhat.com>

	PR c++/97966
	* pt.c (instantiate_class_template_1): Instantiate members
	marked with attribute used only after we're done instantiating
	the class.

2021-01-21  Patrick Palka  <ppalka@redhat.com>

	PR c++/71879
	* semantics.c (finish_decltype_type): Set up a cp_unevaluated
	sentinel at the start of the function.  Remove a now-redundant
	manual adjustment of cp_unevaluated_operand.

2021-01-21  Nathan Sidwell  <nathan@acm.org>

	PR c++/98624
	* module.cc (depset::hash::find_dependencies): Add
	module arg.
	(trees_out::core_vals): Check state before calling
	write_location.
	(sort_cluster, module_state::write): Adjust
	find_dependencies call.

2021-01-21  Jakub Jelinek  <jakub@redhat.com>

	PR c++/98672
	* constexpr.c (check_for_return_continue_data): Add break_stmt member.
	(check_for_return_continue): Also look for BREAK_STMT.  Handle
	SWITCH_STMT by ignoring break_stmt from its body.
	(potential_constant_expression_1) <case FOR_STMT>,
	<case WHILE_STMT>: If the condition isn't constant true, check if
	the loop body can contain a return stmt.
	<case SWITCH_STMT>: Adjust check_for_return_continue_data initializer.
	<case IF_STMT>: If recursion with tf_none is successful,
	merge *jump_target from the branches - returns with highest priority,
	breaks or continues lower.  If then branch is potentially constant and
	doesn't return, check the else branch if it could return, break or
	continue.

2021-01-21  Nathan Sidwell  <nathan@acm.org>

	PR c++/98530
	* name-lookup.c (lookup_class_binding): Rearrange a stat-hack.

2021-01-20  Nathan Sidwell  <nathan@acm.org>

	* module.cc (bytes_in::i, bytes_in::wi): Avoid left shift of
	signed type.

2021-01-20  Patrick Palka  <ppalka@redhat.com>

	PR c++/95434
	* pt.c (tsubst) <case TEMPLATE_TYPE_PARM>: If tsubsting
	CLASS_PLACEHOLDER_TEMPLATE yields a TEMPLATE_TEMPLATE_PARM,
	adjust to its TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.

2021-01-20  Patrick Palka  <ppalka@redhat.com>

	PR c++/82613
	* parser.c (cp_parser_class_head): Defer access checking when
	parsing the base-clause until all bases are seen and attached
	to the class type.
	* pt.c (instantiate_class_template): Likewise when substituting
	into dependent bases.

2021-01-20  Jakub Jelinek  <jakub@redhat.com>

	PR c++/98742
	* semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
	error_operand_p, remove clause without further checking.  Check
	for non-NULL TYPE_NAME.

2021-01-19  Marek Polacek  <polacek@redhat.com>

	PR c++/98659
	* pt.c (maybe_instantiate_noexcept): Return false if FN is
	error_mark_node.

2021-01-19  Marek Polacek  <polacek@redhat.com>

	PR c++/98687
	* name-lookup.c (push_using_decl_bindings): New, broken out of...
	(finish_nonmember_using_decl): ...here.
	* name-lookup.h (push_using_decl_bindings): Update declaration.
	* pt.c (tsubst_expr): Update the call to push_using_decl_bindings.

2021-01-19  Patrick Palka  <ppalka@redhat.com>

	PR c++/41437
	PR c++/58993
	* search.c (friend_accessible_p): If scope is a hidden friend
	defined inside a dependent class, consider access from the
	class.
	* parser.c (cp_parser_late_parsing_for_member): Don't push a
	dk_no_check access state.

2021-01-19  Marek Polacek  <polacek@redhat.com>

	PR c++/98333
	* parser.c (cp_parser_class_specifier_1): Perform late-parsing
	of NSDMIs before late-parsing of noexcept-specifiers.

2021-01-19  Nathan Sidwell  <nathan@acm.org>

	* module.cc (identifier): Merge overloads.

2021-01-19  Nathan Sidwell  <nathan@acm.org>

	PR c++/98624
	* module.cc (trees_out::write_location): Make static.

2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>

	* parser.c (cp_parser_omp_clause_detach): New.
	(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH.
	(OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
	* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
	* semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DETACH clause.
	Prevent use of detach with mergeable and overriding the	data sharing
	mode of the event handle.

2021-01-15  Nathan Sidwell  <nathan@acm.org>

	PR c++/98538
	* tree.c (cp_build_qualified_type_real): Propagate an array's
	dependentness to the copy, if known.

2021-01-15  Jason Merrill  <jason@redhat.com>

	PR c++/98642
	* call.c (unsafe_return_slot_p): Return int.
	(init_by_return_slot_p): Split out from...
	(unsafe_copy_elision_p): ...here.
	(unsafe_copy_elision_p_opt): New name for old meaning.
	(build_over_call): Adjust.
	(make_safe_copy_elision): New.
	* typeck2.c (split_nonconstant_init_1): Elide copy from safe
	list-initialization.
	* cp-tree.h: Adjust.

2021-01-15  Jason Merrill  <jason@redhat.com>

	* call.c (base_ctor_for, make_base_init_ok): New.
	(build_over_call): Use make_base_init_ok.

2021-01-15  Jason Merrill  <jason@redhat.com>

	PR c++/63707
	* tree.c (build_vec_init_expr): Don't call build_vec_init_elt
	if we got a CONSTRUCTOR.

2021-01-15  Nathan Sidwell  <nathan@acm.org>

	PR c++/98591
	* lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.

2021-01-14  Jason Merrill  <jason@redhat.com>

	* typeck2.c (process_init_constructor_record): Use fldtype
	variable consistently.

2021-01-14  Nathan Sidwell  <nathan@acm.org>

	PR c++/98372
	* tree.c (cp_tree_equal): Correct map_context logic.

2021-01-13  Marek Polacek  <polacek@redhat.com>

	PR c++/98231
	* name-lookup.c (push_using_decl_bindings): New.
	* name-lookup.h (push_using_decl_bindings): Declare.
	* pt.c (tsubst_expr): Call push_using_decl_bindings.

2021-01-13  Nathan Sidwell  <nathan@acm.org>

	PR c++/98626
	* module.cc (module_add_import_initializers):  Pass a
	zero-element argument vector.

2021-01-12  Patrick Palka  <ppalka@redhat.com>

	PR c++/98611
	* tree.c (cp_walk_subtrees) <case TEMPLATE_TYPE_PARM>: Visit
	the template of a CTAD placeholder.

2021-01-12  Marek Polacek  <polacek@redhat.com>

	PR c++/98620
	* typeck2.c (process_init_constructor_record): Don't emit
	-Wmissing-field-initializers warnings in unevaluated contexts.

2021-01-11  Jakub Jelinek  <jakub@redhat.com>

	PR c++/98481
	* class.c (find_abi_tags_r): Set *walk_subtrees to 2 instead of 1
	for types.
	(mark_abi_tags_r): Likewise.
	* decl2.c (min_vis_r): Likewise.
	* tree.c (cp_walk_subtrees): If *walk_subtrees_p is 2, look through
	typedefs.

2021-01-08  Patrick Palka  <ppalka@redhat.com>

	PR c++/98551
	* constexpr.c (cxx_eval_call_expression): Check CLASS_TYPE_P
	instead of AGGREGATE_TYPE_P before calling replace_result_decl.

2021-01-08  Patrick Palka  <ppalka@redhat.com>

	PR c++/98515
	* semantics.c (check_accessibility_of_qualified_id): Punt if
	we're checking access of a scoped non-static member inside a
	class template.

2021-01-07  Jakub Jelinek  <jakub@redhat.com>

	PR c++/98329
	* pt.c (tsubst_copy) <case BIT_CAST_EXPR>: Don't call
	cp_build_bit_cast here, instead just build_min a BIT_CAST_EXPR and set
	its location.
	(tsubst_copy_and_build): Handle BIT_CAST_EXPR.

2021-01-07  Marek Polacek  <polacek@redhat.com>

	PR c++/98441
	* decl.c (grokdeclarator): Move the !funcdecl_p check inside the
	!late_return_type block.

2021-01-07  Jason Merrill  <jason@redhat.com>

	* constexpr.c (cxx_bind_parameters_in_call): Add comment.
	(cxx_eval_store_expression): Add comment.

2021-01-07  Jason Merrill  <jason@redhat.com>

	* call.c (has_next): Factor out from...
	(next_conversion): ...here.
	(strip_standard_conversion): And here.
	(is_subseq): And here.
	(build_conv): Check it.
	(standard_conversion): Don't call build_conv
	for ck_identity.

2021-01-06  Martin Sebor  <msebor@redhat.com>

	PR c++/95768
	* error.c (dump_expr): Call c_pretty_printer::unary_expression.

2021-01-05  Patrick Palka  <ppalka@redhat.com>

	* pt.c (unify) <case TEMPLATE_PARM_INDEX>: After walking into
	the type of the NTTP, substitute into the type again.  If the
	type is still dependent, don't unify the NTTP.

2021-01-05  Jakub Jelinek  <jakub@redhat.com>

	* Make-lang.in (cc1plus-checksum, cc1plus$(exeext): Add
	$(CODYLIB) after $(BACKEND).

2021-01-05  Jakub Jelinek  <jakub@redhat.com>

	PR c++/98469
	* constexpr.c (cxx_eval_constant_expression) <case BIT_CAST_EXPR>:
	Punt if lval is true.
	* semantics.c (cp_build_bit_cast): Call get_target_expr_sfinae on
	the result if it has a class type.

2021-01-05  Marek Polacek  <polacek@redhat.com>

	PR c++/82099
	* pt.c (resolve_overloaded_unification): Call
	maybe_instantiate_noexcept after instantiating the function
	decl.

2021-01-05  Nathan Sidwell  <nathan@acm.org>

	* parser.c (cp_parser_module_declaration): Alter diagnostic
	text to say where is permissable.

2021-01-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR c++/98316
	* Make-lang.in (cc1plus$(exeext)): Add $(CODYLIB), $(NETLIBS).

2021-01-02  Jan Hubicka  <jh@suse.cz>

	* cp-tree.h (cp_tree_c_finish_parsing): Declare.
	* decl2.c (c_parse_final_cleanups): Call cp_tree_c_finish_parsing.
	* tree.c (cp_tree_c_finish_parsing): New function.

2021-01-01  Jakub Jelinek  <jakub@redhat.com>

	* ChangeLog-2020: Rotate ChangeLog.  New file.


Copyright (C) 2021 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.