aboutsummaryrefslogtreecommitdiff
path: root/ChangeLog.coroutines
blob: b12be7d699a13c3b9fb86726ae04307f2c80829f (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
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2019-12-04  Iain Sandoe  <iain@sandoe.co.uk>

	libiberty/
	* cp-demangle.c (cplus_demangle_operators): Add the co_await
	operator.

2019-12-03  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.cc (gate): Check for coroutine components in
	addition to the coroutine enable flag before executing the IFN
	lowering pass.
	* function.h (struct function): Allocate a bit to indicate that
	the function is a coroutine component.

	gcc/cp/
	* decl.c (emit_coro_helper): Set coroutine component bit when
	needed.
	(finish_function): Likewise.

2019-12-02  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r278894.

2019-12-01  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.cc (lower_coro_builtin): Amend comments.
	(execute_early_expand_coro_ifns): Expand CO_FRAME.
	(execute_finalize_frame): Remove.
	(class pass_coroutine_finalize_frame): Remove.
	(make_pass_coroutine_finalize_frame): Remove.
	* passes.def: Remove finalize frame pass.
	* tree-pass.h (make_pass_coroutine_finalize_frame): Remove.

2019-11-30  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (lookup_promise_member): Remove.
	(coro_init_identifiers): New.
	(coro_promise_type_found_p): Initialize the coroutines state
	and identifiers lazily.
	(lookup_promise_method): New.
	(build_co_await): Use pre-built identifiers for coroutine,
	promise and awaiter names.
	(finish_co_await_expr): Likewise.
	(finish_co_yield_expr): Likewise.
	(finish_co_return_stmt): Likewise.
	(co_await_expander): Likewise.
	(build_actor_fn): Likewise.
	(build_init_or_final_await): Likewise.
	(morph_fn_to_coro): Likewise.
	* cp-tree.h (enum cp_tree_index): Remove coroutine identifiers.
	* decl.c (initialize_predefined_identifiers): Likewise.

2019-11-29  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.cc (lower_coro_builtin): Use nodes and APIs
	consistent with other places in the middle end.

2019-11-29  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.cc (lower_coro_builtin): Use ptr_type_node
	throughout instead of building nodes each time.

2019-11-27  Iain Sandoe  <iain@sandoe.co.uk>

	libstdc++-v3/
	* include/experimental/coroutine: Update document group
	information.

2019-11-27  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/co-yield-syntax-3.C: Move common code to
	coro.h.
	* g++.dg/coroutines/coro-bad-return.C: Likewise.
	* g++.dg/coroutines/coro-context-vararg.C: Likewise.
	* g++.dg/coroutines/coro-missing-gro.C: Likewise.
	* g++.dg/coroutines/coro-missing-promise-yield.C: Likewise.
	* g++.dg/coroutines/coro-missing-ret-value.C: Likewise.
	* g++.dg/coroutines/coro-missing-ret-void.C: Likewise.
	* g++.dg/coroutines/coro-missing-ueh-1.C: Likewise.
	* g++.dg/coroutines/coro-missing-ueh-2.C: Likewise.
	* g++.dg/coroutines/coro-missing-ueh-3.C: Likewise.
	* g++.dg/coroutines/coro-missing-ueh.h: Likewise.
	* g++.dg/coroutines/torture/co-await-0-triv.C: Likewise.
	* g++.dg/coroutines/torture/co-await-1-value.C: Likewise.
	* g++.dg/coroutines/torture/co-await-2-xform.C: Likewise.
	* g++.dg/coroutines/torture/co-await-3-rhs-op.C: Likewise.
	* g++.dg/coroutines/torture/co-await-4-control-flow.C: Likewise.
	* g++.dg/coroutines/torture/co-await-5-loop.C: Likewise.
	* g++.dg/coroutines/torture/co-await-6-ovl.C: Likewise.
	* g++.dg/coroutines/torture/co-await-7-tmpl.C: Likewise.
	* g++.dg/coroutines/torture/co-await-8-cascade.C: Likewise.
	* g++.dg/coroutines/torture/co-await-9-pair.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-10.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-3.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-4.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-5.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-6.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-7.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-8.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-9.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-void-is-ready.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-void-is-suspend.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-0-triv.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-1-multi.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-2-loop.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-3-tmpl.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-strings.C: Likewise.
	* g++.dg/coroutines/torture/exceptions-test-0.C: Likewise.
	* g++.dg/coroutines/torture/func-params-0.C: Likewise.
	* g++.dg/coroutines/torture/func-params-1.C: Likewise.
	* g++.dg/coroutines/torture/func-params-2.C: Likewise.
	* g++.dg/coroutines/torture/func-params-3.C: Likewise.
	* g++.dg/coroutines/torture/func-params-4.C: Likewise.
	* g++.dg/coroutines/torture/func-params-5.C: Likewise.
	* g++.dg/coroutines/torture/gro_on_alloc_fail_0.C: Likewise.
	* g++.dg/coroutines/torture/local-var-0.C: Likewise.
	* g++.dg/coroutines/torture/local-var-1.C: Likewise.
	* g++.dg/coroutines/torture/local-var-2.C: Likewise.
	* g++.dg/coroutines/torture/local-var-3.C: Likewise.
	* g++.dg/coroutines/torture/local-var-4.C: Likewise.
	* g++.dg/coroutines/torture/mid-suspend-destruction-0.C: Likewise.
	* g++.dg/coroutines/coro.h: Collect common code here.

2019-11-26  Iain Sandoe  <iain@sandoe.co.uk>

	libstdc++-v3/
	* include/experimental/coroutine: Use GNU convention for
	naming.  Use implementation-reserved identifiers.

2019-11-25  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r278677.

2019-11-24  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (find_coro_traits_template_decl): Use global
	identifier.
	(find_coro_handle_type): Likewise.
	(find_promise_type): Likewise.
	* cp-tree.h (enum cp_tree_index): Add indices for the coroutine
	global identifiers.
	(coro_traits_identifier): New.
	(coro_handle_identifier): New.
	(coro_promise_type_identifier): New.
	* decl.c (initialize_predefined_identifiers): Initialize global
	identifiers for coroutines.

2019-11-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc: Updated to en_US spellings.  Corrected more
	punctuation in error messages.

2019-11-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* config-lang.in (gtfiles): Add coroutines.cc.
	* coroutines.cc (struct coroutine_info_hasher): New.
	(coroutine_info_hasher::hash): New.
	(coroutine_info_hasher::equal): New.
	(get_or_insert_coroutine_info): New.
	(get_coroutine_info): New.
	(struct coroutine_info): Revise to use in a hash_table.
	(coro_promise_type_found_p): Amend to use GTY coroutine_info.
	(get_coroutine_promise_type): Likewise.
	(get_coroutine_handle_type): Likewise.
	(get_coroutine_self_handle_proxy): Likewise.
	(get_coroutine_promise_proxy): Likewise.

2019-11-20  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc(struct coroutine_info): Make C++ style, comment
	fields.
	(coro_promise_type_found_p): Adjust info type name.
	(get_coroutine_promise_type): Likewise.
	(get_coroutine_handle_type): Likewise.
	(get_coroutine_self_handle_proxy): Likewise.
	(get_coroutine_promise_proxy): Likewise.
	(coro_common_keyword_context_valid_p): Adjust error message line
	wrapping.
	(coro_function_valid_p): Fix comment line wrap.
	(enum suspend_point_kind): New.
	(build_co_await): Use suspend_point_kind enum. Amend comments,
	remove TYPE_CANONICAL() lookup.
	(finish_co_await_expr): Remove extra checks on expression, use
	Use suspend_point_kind enum.
	(finish_co_yield_expr): Likewise.
	(co_await_expander): Likewise.
	(build_init_or_final_await): Likewise.

	gcc/testsuite/
	* g++.dg/coroutines/co-await-syntax-0.C: New test.
	* g++.dg/coroutines/co-yield-syntax-0.C: New test.

2019-11-19  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/ChangeLog:
	* cp-tree.def (CO_RETRN_EXPR): Rename this to ...
	(CO_RETURN_EXPR): ... this.
	* coroutines.cc (finish_co_return_stmt): Rename CO_RETRN_EXPR.
	(coro_maybe_expand_co_return): Likewise.
	* cp-objcp-common.c (cp_common_init_ts): Likewise.
	* pt.c (tsubst_expr): Likewise.
	* tree.c (cp_walk_subtrees): Likewise.

2019-11-19  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc: Revise includes.
	(debug_tree): Remove debug code.
	(lookup_promise_member): Fix whitespace.
	(find_coro_traits_template_decl): Adjust comments, fix error
	message punctuation.
	(get_coroutine_promise_type): Adjust style.
	(get_coroutine_handle_type): Likewise.
	(get_coroutine_self_handle_proxy): Likewise.
	(get_coroutine_promise_proxy): Likewise.
	(coro_common_keyword_context_valid_p): Add references to the
	standards sections.
	to the comments.
	(coro_function_valid_p): Fix error message punctuation.
	(build_co_await): Fix comments, fix case of a variable name.
	(finish_co_await_expr): Fix comments.
	(finish_co_yield_expr): Assert correct parser output.
	(check_co_return_expr): Delete.
	(finish_co_return_stmt): Remove unused code, correct some comments.
	(register_await_info): Remove debug code.
	(get_await_suspend_return_type): Likewise.
	(captures_temporary):  Likewise.
	(register_local_var_uses): Likewise.

	gcc/testsuite/
	* g++.dg/coroutines/coro-bad-return.C: Update the error message.

2019-11-19  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (coro_maybe_expand_co_return): Ensure that an
	expression is void type before inserting it.  Update comments
	to include the standard section refs.

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-ret-10.C: New test.
	* g++.dg/coroutines/torture/co-ret-7.C: Check that the void
	expression is called exactly once.

2019-11-19  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/coro.h: Remove references to
	__builtin_coro_is_suspended.

2019-11-18  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (captures_temporary): Correct condition on the
	early return from this callback.

2019-11-18  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r278390.

2019-11-17  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-builtins.def: Update comments.
	* coroutine-passes.cc: Likewise.
	* internal-fn.c: Likewise.

	gcc/c-family/
	* c-common.h: Likewise.

	gcc/cp/
	* coroutines.cc: Likewise.
	* tree.c: Likewise.

	libstdc++-v3/
	* include/experimental/coroutine: Likewise.

2019-11-17  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.cc: Delete unused code.

2019-11-16  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* constexpr.c (potential_constant_expression_1): Amend comments.
	* parser.c (cp_parser_unary_expression): Likewise.
	(cp_parser_jump_statement): Likewise.

2019-11-16  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-builtins.def: Tidy whitespace.
	(BUILT_IN_CORO_IS_SUSPENDED): Delete.
	(BUILT_IN_CORO_NOOP): Delete.
	* coroutine-passes.cc (lower_coro_builtin): Remove lowering for
	__builtin_coro_suspended.

	gcc/testsuite/
	* g++.dg/coroutines/coro-builtins.C: Remove checks for
	__builtin_coro_suspended, __builtin_coro_noop.
	* g++.dg/coroutines/torture/check-suspended.C: Remove.
	* g++.dg/coroutines/torture/mid-suspend-destruction-0.C: Only
	test suspended state if __builtin_coro_suspended is available.

	libstdc++-v3/
	* include/experimental/coroutine: Remove references to
	__builtin_coro_suspended.

2019-11-16  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/c-family/
	* c.opt: Remove coroutines-ts alias for the command line
	flag.  Do not enable coroutines for Objective-C++.

2019-11-16  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc: Lots of whitespace fixes.
	
	gcc/
	* coroutine-passes.cc: Likewise.

2019-11-15  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c: Rename to...
	* coroutine-passes.cc: ... this.

2019-11-15  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (coro_promise_type_found_p): New.
	(get_coroutine_promise_type): New.
	(get_coroutine_handle_type): New.
	(get_coroutine_self_handle_proxy): New.
	(get_coroutine_promise_proxy): New.
	(lookup_promise_member): Use local hash map state instead of the
	function decl.
	(coro_function_valid_p): Likewise.
	(build_co_await): Likewise.
	(finish_co_await_expr): Likewise.
	(finish_co_yield_expr): Likewise.
	(finish_co_return_stmt): Likewise.
	(build_actor_fn): Likewise.
	(build_init_or_final_await): Likewise.
	(morph_fn_to_coro): Likewise.
	* cp-tree.h (struct GTY): Remove coroutine state fields.
	(DECL_COROUTINE_HANDLE_TYPE): Remove.
	(DECL_COROUTINE_SELF_H_PROXY): Remove.
	(DECL_COROUTINE_PROMISE_TYPE): Remove.
	(DECL_COROUTINE_PROMISE_PROXY): Remove.
	(DECL_COROUTINE_FIRST_KEYWD_LOC): Remove.

2019-11-14  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Mark as coroutine.
	(build_destroy_fn): Likewise.

2019-11-13  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/coro.h: Update to n4835.

	libstdc++-v3/
	* include/experimental/coroutine: Fill in section names, update
	section numbers to C++20 CD (n4835).

2019-11-13  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/co-yield-syntax-3.C: Adjust namespace.
	* g++.dg/coroutines/coro-bad-return.C: Likewise.
	* g++.dg/coroutines/coro-missing-gro.C: Likewise.
	* g++.dg/coroutines/coro-missing-promise-yield.C: Likewise.
	* g++.dg/coroutines/coro-missing-ret-value.C: Likewise.
	* g++.dg/coroutines/coro-missing-ret-void.C: Likewise.
	* g++.dg/coroutines/coro-missing-ueh.h: Likewise.
	* g++.dg/coroutines/torture/check-suspended.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-3.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-4.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-5.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-6.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-7.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-8.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-9.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-void-is-ready.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-void-is-suspend.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-3-tmpl.C: Likewise.
	* g++.dg/coroutines/torture/exceptions-test-0.C: Likewise.
	* g++.dg/coroutines/torture/local-var-0.C: Likewise.
	* g++.dg/coroutines/torture/local-var-1.C: Likewise.
	* g++.dg/coroutines/torture/local-var-2.C: Likewise.
	* g++.dg/coroutines/torture/mid-suspend-destruction-0.C: Likewise.
	* g++.dg/coroutines/torture/co-await-0-triv.C: Adjust namespace, add
	dg-run.
	* g++.dg/coroutines/torture/co-await-1-value.C: Likewise.
	* g++.dg/coroutines/torture/co-await-2-xform.C: Likewise.
	* g++.dg/coroutines/torture/co-await-4-control-flow.C: Likewise.
	* g++.dg/coroutines/torture/co-await-5-loop.C: Likewise.
	* g++.dg/coroutines/torture/co-await-6-ovl.C: Likewise.
	* g++.dg/coroutines/torture/co-await-7-tmpl.C: Likewise.
	* g++.dg/coroutines/torture/co-await-8-cascade.C: Likewise.
	* g++.dg/coroutines/torture/co-await-9-pair.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-0-triv.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-1-multi.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-2-loop.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-strings.C: Likewise.
	* g++.dg/coroutines/torture/func-params-0.C: Likewise.
	* g++.dg/coroutines/torture/func-params-1.C: Likewise.
	* g++.dg/coroutines/torture/func-params-2.C: Likewise.
	* g++.dg/coroutines/torture/func-params-3.C: Likewise.
	* g++.dg/coroutines/torture/func-params-4.C: Likewise.
	* g++.dg/coroutines/torture/func-params-5.C: Likewise.
	* g++.dg/coroutines/torture/gro_on_alloc_fail_0.C: Likewise.
	* g++.dg/coroutines/torture/local-var-3.C: Likewise.
	* g++.dg/coroutines/torture/local-var-4.C: Likewise.
	* g++.dg/coroutines/torture/co-await-3-rhs-op.C: Adjust namespace, add
	dg-run, correct check values.

2019-11-12  Iain Sandoe  <iain@sandoe.co.uk>

	libstdc++-v3/
	* include/experimental/coroutine: Adjust to use spaceship operator
	when it's available.

2019-11-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/c-family/
	* c-cppbuiltin.c (c_cpp_builtins): Adjust value for
	__cpp_coroutines.

	gcc/testsuite/
	* g++.dg/coroutines/coro-pre-proc.C: Adjust test value.

2019-11-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (execute_early_expand_coro_ifns):
	Fix whitespace.

	gcc/cp/
	* coroutines.cc (find_coro_traits_template_decl): Fix whitespace.
	(build_co_await): Likewise.
	(finish_co_await_expr): Likewise.
	(co_return_expander): Likewise.
	(co_await_expander): Likewise.
	(struct __await_xform_data): Likewise.
	(transform_await_expr): Likewise.
	(transform_local_var_uses): Likewise.
	(build_destroy_fn): Likewise.
	(captures_temporary): Likewise.
	(morph_fn_to_coro): Likewise.
	* cp-tree.def: Likewise.
	* decl.c (finish_function): Likewise.
	* parser.c (cp_parser_yield_expression): Likewise.

2019-11-11  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r278049.
	* gcc/configure: Regenerate.

2019-11-04  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r277764.
	* gcc/configure: Regenerate.

2019-10-28  Iain Sandoe  <iain@sandoe.co.uk>

	libstdc++-v3/
	* include/experimental/coroutine: Include <bits/stl_function.h>
	instead of <functional>.

2019-10-28  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (first_vuser): Delete.
	(move_edge_and_update_vdef): Delete.
	(execute_expand_coro_ifns): Delete.
	(class pass_coroutine_expand_ifns): Delete.
	(make_pass_coroutine_expand_ifns): Delete.
	* passes.def: Delete coroutine_expand_ifns pass.
	* tree-pass.h (make_pass_coroutine_expand_ifns): Delete.

2019-10-28  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r277499.

2019-10-21  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r277221.

2019-10-14  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r276952.

2019-10-11  Iain Sandoe  <iain@sandoe.co.uk>

	libstdc++-v3/
	* include/experimental/coroutine (noop_coroutine_handle): New.

2019-10-11  Iain Sandoe  <iain@sandoe.co.uk>

	libstdc++-v3/
	* include/experimental/coroutine: Fix long lines.

2019-10-08  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/exceptions-test-0.C: New test.

2019-10-07  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r276647.

2019-10-07  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/gro_on_alloc_fail_0.C: Include
	<new> when available.

2019-10-07  Iain Sandoe  <iain@sandoe.co.uk>

	libstdc++-v3/
	* include/experimental/coroutine: Include <functional>.

2019-10-04  Iain Sandoe  <iain@sandoe.co.uk>

	libstdc++-v3/
	* include/experimental/coroutine (operator!=): New.
	(operator<): New.
	(operator>): New.
	(operator<=): New.
	(operator>=): New.

2019-10-02  Iain Sandoe  <iain@sandoe.co.uk>

	libstdc++-v3/
	* include/experimental/coroutine (operator==): New.
	
2019-10-01  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-yield-strings.C: Update the test
	to show that a DTOR for coro state is run on scope exit.  Make
	the test run.

2019-09-30  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r276292.
	
2019-09-25  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/coro.h: Include experimental/coroutine when
	it is available.

2019-09-25  Iain Sandoe  <iain@sandoe.co.uk>

	libstdc++-v3/
	* include/Makefile.am (experimental_headers): Add
	experimental/coroutine.
	* include/Makefile.in: Regenerated.
	* include/experimental/coroutine: New file.

2019-09-23  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r276035.

2019-09-18  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (execute_early_expand_coro_ifns):
	Remove redundant yield logic labels.

2019-09-14  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-yield-strings.C: New test.

2019-09-11  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r275623.

2019-09-07  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/coro-missing-ueh-1.C: New test.
	* g++.dg/coroutines/coro-missing-ueh-2.C: New test.
	* g++.dg/coroutines/coro-missing-ueh-3.C: New test.
	* g++.dg/coroutines/coro-missing-ueh.h: New.

2019-09-06  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (captures_temporary): Where the 'this' pointer
	addresses a temporary object, promote that to a frame variable.

2019-09-06  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (maybe_promote_captured_temps): Check that there
	are any blocks in the stack before using.

2019-09-06  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r275450.

2019-09-05  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Move the block link handling to
	the morph function.
	(morph_fn_to_coro): Reorganise block re-writing to handle the case
	for exception wrapper.  Implement exception wrapper onto the users
	function statements.

2019-09-04  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Ensure that we stitch in subblocks
	of the original function top block.
	(morph_fn_to_coro):  Create a new top block for the ramp, rather than
	reusing the one from the original function.

2019-09-03  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (move_edge_and_update): New.
	(execute_early_expand_coro_ifns): New.
	(class pass_coroutine_early_expand_ifns): New.
	(make_pass_coroutine_early_expand_ifns): New.
	(pass_coroutine_expand_ifns::gate): Disable.
	* passes.def: Add coroutine_early_expand_ifns pass.
	* tree-pass.h (make_pass_coroutine_early_expand_ifns): New declaration.

2019-09-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutines.cc (struct __susp_frame_data): Arrange to record
	temporary vars caputered by reference.
	(captures_temporary): New callback.
	(register_awaits): Walk the initialier for captured temporaries.
	(maybe_promote_captured_temps): New, if we see one or more temps
	captured by reference promote them to regular vars.
	(await_statement_walker): Walk bind expressions so that we can
	record the scope into which new insertions would be made.
	(morph_fn_to_coro): Initialise additional suspend point vars.  
	Update comments.

2019-08-27  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/coro.h (__CORO_H_N4775): Change to...
	... this __CORO_H_N4830.  Revise hidden namespace.
	* g++.dg/coroutines/co-yield-syntax-3.C: Use revised namespace.
	* g++.dg/coroutines/coro-bad-return.C: Likewise.
	* g++.dg/coroutines/coro-missing-gro.C: Likewise.
	* g++.dg/coroutines/coro-missing-promise-yield.C: Likewise.
	* g++.dg/coroutines/coro-missing-ret-value.C: Likewise.
	* g++.dg/coroutines/coro-missing-ret-void.C: Likewise.
	* g++.dg/coroutines/torture/check-suspended.C: Likewise.
	* g++.dg/coroutines/torture/co-await-0-triv.C: Likewise.
	* g++.dg/coroutines/torture/co-await-1-value.C: Likewise.
	* g++.dg/coroutines/torture/co-await-2-xform.C: Likewise.
	* g++.dg/coroutines/torture/co-await-3-rhs-op.C: Likewise.
	* g++.dg/coroutines/torture/co-await-4-control-flow.C: Likewise.
	* g++.dg/coroutines/torture/co-await-5-loop.C: Likewise.
	* g++.dg/coroutines/torture/co-await-6-ovl.C: Likewise.
	* g++.dg/coroutines/torture/co-await-7-tmpl.C: Likewise.
	* g++.dg/coroutines/torture/co-await-8-cascade.C: Likewise.
	* g++.dg/coroutines/torture/co-await-9-pair.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-3.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-4.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-5.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-6.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-7.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-8.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-9.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-void-is-ready.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-void-is-suspend.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-0-triv.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-1-multi.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-2-loop.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-3-tmpl.C: Likewise.
	* g++.dg/coroutines/torture/func-params-0.C: Likewise.
	* g++.dg/coroutines/torture/func-params-1.C: Likewise.
	* g++.dg/coroutines/torture/func-params-2.C: Likewise.
	* g++.dg/coroutines/torture/func-params-3.C: Likewise.
	* g++.dg/coroutines/torture/func-params-4.C: Likewise.
	* g++.dg/coroutines/torture/func-params-5.C: Likewise.
	* g++.dg/coroutines/torture/gro_on_alloc_fail_0.C: Likewise.
	* g++.dg/coroutines/torture/local-var-0.C: Likewise.
	* g++.dg/coroutines/torture/local-var-1.C: Likewise.
	* g++.dg/coroutines/torture/local-var-2.C: Likewise.
	* g++.dg/coroutines/torture/local-var-3.C: Likewise.
	* g++.dg/coroutines/torture/local-var-4.C: Likewise.
	* g++.dg/coroutines/torture/mid-suspend-destruction-0.C: Likewise.
	* g++.dg/coroutines/coro-pre-proc.C: Likewise. Check revised pre-
	proc value.

2019-08-27  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/c-family/
	* c-cppbuiltin.c (c_cpp_builtins): Update builtin define to date
	of post-Cologne c++20 working draft.

2019-08-26  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r274922.

2019-08-20  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r274689.

2019-08-19  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander): Wrap the internal fn
	call for IFN_CO_SUSPN into a full expression.

2019-08-18  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (struct __susp_frame_data): Add a counter for awaits.
	(register_awaits): Account the handled await.
	(await_statement_walker): New, walk statements checking each for
	awaits.
	(morph_fn_to_coro): Use await_statement_walker instead of calling
	register_awaits directly.

2019-08-17  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander): Remove unused lowering.

2019-08-17  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander): Delete dead code.

2019-08-12  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r274275.

2019-08-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (execute_expand_coro_ifns): Update call
	argument description.

2019-08-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (lower_coro_builtin): Lower IFN_CO_SUSPN.
	* internal-fn.c (expand_CO_SUSPN): New.
	* internal-fn.def (CO_SUSPN): New.

	gcc/cp/ChangeLog:
	* coroutines.cc (co_await_expander): Encode the scope exiting
	return as an internal function.

2019-08-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* passes.def: Lower coroutine builtins after the EH/cleanup
	expansions.

2019-08-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* internal-fn.def (CO_YIELD): Remove argument signature.

2019-08-10  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (struct __coro_aw_data): Reorder await state
	vars struct and update comments.
	(expand_co_awaits): Likewise.

2019-08-10  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (transform_local_var_uses): Remove dead instances
	of local variables copied to the frame.

2019-08-10  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/ChangeLog:
	* coroutines.cc (transform_local_var_uses): Initialise frame
	copies of local vars directly.

2019-08-09  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Initialise the coro frame
	pointer before passing to IFN_CO_FRAME.

2019-08-08  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Discard unused code for
	explicit GRO destruction.

2019-08-07  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Create the return object
	in place when possible.

2019-08-07  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Lookup and use delete operator
	instead of builtin_free().

2019-08-06  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (transform_local_var_uses): If a local var needs
	constructing, then do so.

2019-08-06  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (register_awaits): Set the handle for the
	await_suspend() return to the correct type.

2019-08-05  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r274111.

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Check for the availability of
	a move CTOR and use it if present.

2019-08-01  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_co_await): Expect a record type for a
	await_suspend() returning a handle.
	(co_await_expander): Deal with the three cases of return type
	that are allowed for await_suspend().

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-ret-9.C: New test.

2019-08-01  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (get_await_suspend_return_type): Handle TARGET_EXPR
	as well as CALL_EXPR.

2019-08-01  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (transform_await_expr): Rearrange and cater for the
	await_suspend() return type.

2019-08-01  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander): Simplify argument computation
	for await_suspend().

2019-08-01  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (struct suspend_point_info): Add space for the
	await_suspend method type.  Rename the handle field.
	(transform_await_expr): Rename the handle field.
	(register_await_info): Cache the suspend method return type.
	(get_await_suspend_return_type): New.
	(register_awaits): Handle caching the await_suspend return type.
	(morph_fn_to_coro): Ensure that we have the right suspend types
	for initial and final suspends.

2019-07-31  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (finish_co_await_expr): Use the expression type as
	the tree type when processing template decls.
	(finish_co_yield_expr): Likewise.

2019-07-30  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Check that the promise needs
	constructing before building one.

2019-07-29  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander): Comment unused param.

2019-07-29  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r273864.

2019-07-28  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): If we use the allocation failure
	method, mark it as used.

2019-07-28  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (execute_finalize_frame): Copy the first argument
	for now.
	* internal-fn.def (CO_FRAME): Mark as pure.

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): If the user has declared a method
	to handle allocation failure, use a no-throw new and check its return
	using the provided method if the return is NULL.

	gcc/testsuite/
	* g++.dg/coroutines/torture/gro_on_alloc_fail_0.C: New test.

2019-07-28  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/coro-torture.exp: Default to c++17.

2019-07-22  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r273656.

2019-07-21  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Remove unused var.

2019-07-21  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (lower_coro_builtin): Revert changes to handle
	three callback pointers.  Reimplement the is_suspended check to be a
	test for non-null on the destroy() function pointer field.

	gcc/cp/
	* coroutines.cc (build_actor_fn): Remove support for the "is_suspended"
	test.
	(build_suspended_fn): Likewise.
	(register_local_var_uses): Likewise.
	(morph_fn_to_coro): Likewise.
	* cp-tree.h (morph_fn_to_coro): Likewise.
	* decl.c (finish_function): Likewise.

2019-07-20  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* internal-fn.def (CO_YIELD): Add function signature.
	(CO_FRAME): Make leaf.

	gcc/cp/=
	* coroutines.cc (co_await_expander): Add coro frame as a call arg to
	IFN_CO_YIELD calls.

2019-07-18  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (execute_finalize_frame): New.
	(class pass_coroutine_finalize_frame): New.
	(make_pass_coroutine_finalize_frame): New.
	* passes.def (pass_coroutine_finalize_frame): New.
	* tree-pass.h (make_pass_coroutine_finalize_frame): New.

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Remove the generation of the call
	to builtin malloc and replace with IFN_CO_FRAME.

2019-07-17  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (get_fn_local_identifier): Use the mangled function
	name as the base of function-local identifiers, if it's available.

2019-07-16  Iain Sandoe  <iain@sandoe.co.uk>

	* coroutines.cc (get_fn_local_identifier): Use the instantiated type
	names to unique the function-local identifiers in instantiations.
	(morph_fn_to_coro): Use get_fn_local_identifier to make the frame
	identifier.

2019-07-16  Iain Sandoe  <iain@sandoe.co.uk>

	* coroutines.cc (register_param_uses):  Back out forced type completion
	for referenced parameter types.

2019-07-15  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (register_param_uses): Convert reference types to
	pointers.
	(morph_fn_to_coro): Add an explicit type conversion in the case that
	the passed-by type differs from the actual.

	gcc/testsuite/
	* g++.dg/coroutines/torture/func-params-5.C: New test.

2019-07-14  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (register_param_uses): Ensure complete types for
	params.  Save actual frame type.  Tidy up a useless statement.
	(morph_fn_to_coro):  Used the actual saved frame type to figure
	determine if construction is needed. 

2019-07-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp
	* coroutines.cc (co_await_expander): Exit early for statement class.

2019-07-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp
	* coroutines.cc (co_await_expander): Recurse into co_await sub-trees.

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-await-8-cascade.C: New test.
	* g++.dg/coroutines/torture/co-await-9-pair.C: New test.

2019-07-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander):Use reordered expression vars.
	(transform_await_expr): Re-order expression vars.

2019-07-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* tree.c (cp_walk_subtrees): Handle CO_YIELD_EXPR, CO_AWAIT_EXPR and
	CO_RETRN_EXPR.

2019-07-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc: Fix line wrapping, leading and trailing whitespace.

2019-07-09  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (finish_co_await_expr): Return early with the original
	expression when we have incomplete promise type.
	Amend comments related to co_await.
	* pt.c (tsubst_copy): Handle CO_AWAIT_EXPR.
	(tsubst_expr): Likewise.

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-await-7-tmpl.C: New test.

2019-07-09  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (finish_co_yield_expr): Return early with the original
	expression when we have incomplete promise type.
	* pt.c (tsubst_expr): Handle CO_YIELD_EXPR.

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-yield-3-tmpl.C: New test.

2019-07-09  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (finish_co_return_stmt): Return early with the original
	expression when we have incomplete promise type.
	* pt.c (tsubst_expr): Handle CO_RETRN_EXPR.

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-ret-8.C: New test.

2019-07-09  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* cp-tree.def (CO_AWAIT_EXPR): Amend operand descriptions.

2019-07-08  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r272193.
	gcc/
	* configure: Regenerated.

	gcc/c-family/
	* c.opt: Remerge modules flags.

2019-07-06  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/coro.h: Connect up the suspension checking built-
	in.
	* g++.dg/coroutines/torture/check-suspended.C: New test.

2019-07-06  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-builtins.def (BUILT_IN_CORO_IS_SUSPENDED): New.
	* coroutine-passes.c (lower_coro_builtin): Lower suspension check
	builtin.

	gcc/cp/
	* coroutines.cc (build_suspended_fn): New helper function.
	(morph_fn_to_coro): Add and populate a function pointer field for the
	suspension-checking routine.
	* cp-tree.h (morph_fn_to_coro): Alter prototype.
	* decl.c (finish_function): Generate output for the suspension check
	helper.

	gcc/testsuite/
	* g++.dg/coroutines/coro-builtins.C (main): Test that we handle the
	new __builtin_coro_is_suspended builtin.

2019-07-06  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Clear suspended status on entry
	set it on suspended returns.
	(build_destroy_fn): Comment change only.
	(register_local_var_uses): Rename suspension status field.
	(morph_fn_to_coro):  Likewise.  Reorder code that initialises the
	field.

2019-07-01  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r272840.

2019-06-30  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (coro_maybe_expand_co_return): New.
	(co_return_expander): Handle statement lists and insert the expanded
	co_return statements instead of nesting them.
	(build_actor_fn): Update comment.

2019-06-29  Iain Sandoe  <iain@sandoe.co.uk>
 
	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): If the body is empty or an error
	mark, then we can't determine any more so punt.  If the body is marked
	noexcept, remember this and pass on to the ramp.  Some small comment
	changes are included.
	* decl.c (finish_function): Handle exception blocks from the ramp.

	gcc/testsuite/
	* g++.dg/coroutines/coroutines.exp:
	* g++.dg/coroutines/torture/coro-torture.exp:

2019-06-29  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-ret-3.C: Remove explicit "inline" from
	the test declaration.
	* g++.dg/coroutines/torture/co-ret-5.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-7.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-void-is-ready.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-void-is-suspend.C: Likewise.
	* g++.dg/coroutines/torture/func-params-0.C: Likewise.

2019-06-29  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/co-yield-syntax-3.C: GNU-ify test function
	declaration.
	* g++.dg/coroutines/coro-bad-return.C: Likewise.
	* g++.dg/coroutines/coro-context-vararg.C: Likewise.
	* g++.dg/coroutines/coro-missing-gro.C: Likewise.
	* g++.dg/coroutines/coro-missing-promise-yield.C: Likewise.
	* g++.dg/coroutines/coro-missing-ret-value.C: Likewise.
	* g++.dg/coroutines/coro-missing-ret-void.C: Likewise.
	* g++.dg/coroutines/torture/co-await-0-triv.C: Likewise.
	* g++.dg/coroutines/torture/co-await-1-value.C: Likewise.
	* g++.dg/coroutines/torture/co-await-2-xform.C: Likewise.
	* g++.dg/coroutines/torture/co-await-3-rhs-op.C: Likewise.
	* g++.dg/coroutines/torture/co-await-4-control-flow.C: Likewise.
	* g++.dg/coroutines/torture/co-await-5-loop.C: Likewise.
	* g++.dg/coroutines/torture/co-await-6-ovl.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-3.C: Likewise.:
	* g++.dg/coroutines/torture/co-ret-4.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-5.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-6.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-7.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-void-is-ready.C: Likewise.
	* g++.dg/coroutines/torture/co-ret-void-is-suspend.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-0-triv.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-1-multi.C: Likewise.
	* g++.dg/coroutines/torture/co-yield-2-loop.C: Likewise.
	* g++.dg/coroutines/torture/func-params-0.C: Likewise.
	* g++.dg/coroutines/torture/func-params-1.C: Likewise.
	* g++.dg/coroutines/torture/func-params-2.C: Likewise.
	* g++.dg/coroutines/torture/func-params-3.C: Likewise.
	* g++.dg/coroutines/torture/func-params-4.C: Likewise.
	* g++.dg/coroutines/torture/local-var-0.C: Likewise.
	* g++.dg/coroutines/torture/local-var-1.C: Likewise.
	* g++.dg/coroutines/torture/local-var-2.C: Likewise.
	* g++.dg/coroutines/torture/local-var-3.C: Likewise.
	* g++.dg/coroutines/torture/local-var-4.C: Likewise.

2019-06-24  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r272613.

2019-06-22  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Run DTORs for params that had
	corresponding CTORs.
	(register_param_uses): Strip references.
	(morph_fn_to_coro): Where the type of a param requires constucting
	build a placement new for the frame entry constructed from the
	param.  Pass the list of constructed entries to the actor build fn.

	gcc/testsuite/
	* g++.dg/coroutines/torture/func-params-4.C: New test.

2019-06-17  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (register_local_var_uses): Make frame local var ids
	unique for each bind scope.
	
	gcc/testsuite/
	* g++.dg/coroutines/torture/local-var-4.C: New test.

2019-06-17  Iain Sandoe  <iain@sandoe.co.uk>

	* g++.dg/coroutines/torture/local-var-0.C: New test.
	* g++.dg/coroutines/torture/local-var-1.C: New test.
	* g++.dg/coroutines/torture/local-var-2.C: New test.
	* g++.dg/coroutines/torture/local-var-3.C: New test.

2019-06-17  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r272370.

2019-06-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (struct __local_vars_transform): New.
	(transform_local_var_uses): Initialise local variable frame
	copies and then rewrite uses to them.
	(build_actor_fn): Use transform_local_var_uses to rewrite local
	variables.
	(struct __local_vars_frame_data): New.
	(register_local_var_uses): Make space for local vars in the frame.
	(register_param_uses): Update comment about the frame.
	(morph_fn_to_coro): Use register_local_var_uses to record the
	local var space.

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-ret-4.C: Remove 'inline'.
	* g++.dg/coroutines/torture/local-var-0.C: New test.
	* g++.dg/coroutines/torture/local-var-1.C: New test.
	* g++.dg/coroutines/torture/local-var-2.C: New test.
	* g++.dg/coroutines/torture/local-var-3.C: New test.

2019-06-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Chain the new funtions
	directly after the ramp.

2019-06-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Adjust scopes in the re-
	mapped function.
	(morph_fn_to_coro): Build new scope for the ramp.

2019-06-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_destroy_fn): Don't generate a BIND_EXPR.

2019-06-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/func-params-3.C: New test.

2019-06-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro):  Return a default-constructed
	object on morph error.

	gcc/testsuite/
	* g++.dg/coroutines/co-yield-syntax-3.C (struct DummyYield):
	* g++.dg/coroutines/coro-missing-gro.C (struct MissingGRO):
	* g++.dg/coroutines/coro-missing-promise-yield.C (struct MissingPromiseYield):
	* g++.dg/coroutines/coro-missing-ret-value.C (struct MissingRetValue):
	* g++.dg/coroutines/coro-missing-ret-void.C (struct MissingRetVoid):

2019-06-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Add location information to
	generated trees.
	(morph_fn_to_coro): Likewise.

2019-06-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/coroutines.exp: Append '-fno-exceptions' to
	the test flags.

2019-06-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (create_anon_label_with_ctx): Moved.
	(create_named_label_with_ctx): New Helper.
	(co_await_expander): Use label creation helper.
	(build_actor_fn): Likewise.
	(morph_fn_to_coro): Likewise.

2019-06-09  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r272095.
	
2019-06-09  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Record every use of each function
	param, not just the first one.

	gcc/testsuite/
	* g++.dg/coroutines/torture/func-params-2.C: New test.

2019-06-08  Iain Sandoe  <iain@sandoe.co.uk>

	* coroutines.cc (build_actor_fn): Simplify the conditional call to
	free the coroutine frame.

2019-06-08  Iain Sandoe  <iain@sandoe.co.uk>

	* coroutines.cc (co_return_expander): Look inside cleanup point
	expressions, and expand co_returns inside, adding cleanup points
	to the new sub-expressions where needed.

2019-06-08  Iain Sandoe  <iain@sandoe.co.uk>

	* coroutines.cc (coro_build_expr_stmt): New helper.
	(coro_build_cvt_void_expr_stmt): New helper.
	(co_await_expander): Use EXPR_STMT build helpers.
	(build_actor_fn): Likewise.
	(build_destroy_fn): Likewise.
	(morph_fn_to_coro): Likewise.

2019-06-08  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander): Avoid a maybe used uninitialised
	warning.

2019-06-08  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (coro_make_frame_entry): New helper.
	(register_awaits): Use coro_make_frame_entry() to build new frame
	field entries.
	(register_param_uses): Likewise.
	(morph_fn_to_coro): Likewise.

2019-06-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Rewrite uses of params in the
	original function body with references to the saved frame version.
	(struct __param_frame_data): New struct.
	(register_param_uses): New function.
	(morph_fn_to_coro): Record any params used within the original
	function body.  Make and initialise space for them in the frame.

	gcc/testsuite/
	* g++.dg/coroutines/torture/func-params-1.C: New test.

2019-06-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Manage the visited sets so
	that they don't hang around for the entire duration of the func.

2019-06-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Verify trees before and after.

2019-06-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* decl.c (emit_coro_helper): Ensure that the folder cache is
	clear before we fold each routine.

2019-05-29  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r271729.

2019-05-28  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Wrap call expressions in
	expression statements where needed.
	(morph_fn_to_coro): Likewise.

2019-05-28  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* tree.c (build_call_expr_internal_loc_array): Make the argument
	list match the declaration.

2019-05-20  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Check if the promise has a CTOR
	that takes the same param list as the function. use that if so else
	use CTOR with empty param list.

	gcc/testsuite/
	* g++.dg/coroutines/torture/func-params-0.C: New.

2019-05-12  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r271107.

	gcc/
	* configure: Regenerated.

	gcc/cp/
	* cp-objcp-common.c (cp_common_init_ts): Make coroutine
	keywords MARK_TS_EXP.
	* parser.c (cp_parser_jump_statement): Update to use
	FNDECL_USED_AUTO.
	* coroutines.cc: Likewise.

2019-04-20  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r270468.

2019-04-01  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r270053.

2019-03-11  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r269569.

2019-03-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander): Use a temporary expression for
	the coroutine handle passed to await_suspend(), rather than a frame
	entry.

2019-03-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander): Use TARGET_EXPR in INIT_EXPR.
	(build_actor_fn): Likewise.
	(morph_fn_to_coro): Likewise.

2019-03-11  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (struct __coro_ret_data): Remove blank line.

2019-02-22  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* typeck.c: Move check_co_return_expr from here to ...
	* coroutines.cc: ... Here and make it static.
	* cp-tree.h (check_co_return_expr): Remove.

2019-02-22  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (expand_co_returns): Remove dead code.
	(build_actor_fn): Likewise.

2019-02-22  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* cp-tree.h (COROUTINE_RETURN_P): Remove.

2019-02-22  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_return_context_valid_p): Rename to
	finish_co_return_stmt. (finish_co_return_stmt): Amend to return
	CO_RETRN_EXPR, use promise proxy.
	(struct __proxy_replace, replace_proxy): Move earlier in the source.
	(struct __coro_ret_data): Add promise proxy member.
	(co_return_expander): Revise to handle CO_RETRN_EXPR.
	(expand_co_returns): Revise to handle replacement of promise proxy.
	* cp-tree.h (co_return_context_valid_p): Remove.
	* parser.c (cp_parser_jump_statement): Revise to use
	finish_co_return_stmt only.
	* semantics.c (finish_co_return_stmt): Remove.

2019-02-14  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_co_await): Free args vec after use.
	(build_actor_fn): Likewise.
	(morph_fn_to_coro): Likewise.

2019-02-14  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_co_await): We build the awaiter calls to
	verify, so save them for expansion time.
	(co_await_expander): Use saved awaiter calls instead of rebuilding
	them.
	(transform_await_expr): Substitute the proxy for self handle into
	any of the calls that use it.

2019-02-14  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (__coro_aw_data): Add "self" handle field.
	(co_await_expander): Collect the calls build at parse time instead
	of building them again.  Use the saved handle for "self".
	(__await_xform_data): Add fields for the self handle.
	(build_actor_fn): Transform the proxy for the "self" handle.

2019-02-14  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): initialize the "self" handle
	slot.

2019-02-14  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Allocate a slot for "self"
	handle in the coro frame.

2019-02-14  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (coro_promise_type_found_p): Ensure that the
	coro handle type is complete.

2019-02-14  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (coro_promise_type_found_p): Build a proxy for
	the handle to coroutine 'self'.
	* cp-tree.h (lang_decl_fn): Add self_h_proxy, amend comments.
	(DECL_COROUTINE_SELF_H_PROXY): New.

2019-02-13  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r268852.
	gcc/
	* configure: Regenerated.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-await-0-triv.C: New.
	* g++.dg/coroutines/torture/co-await-1-value.C: New.
	* g++.dg/coroutines/torture/co-await-2-xform.C: New.
	* g++.dg/coroutines/torture/co-await-3-rhs-op.C: New.
	* g++.dg/coroutines/torture/co-await-4-control-flow.C: New.
	* g++.dg/coroutines/torture/co-await-5-loop.C: New.
	* g++.dg/coroutines/torture/co-await-6-ovl.C: New.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-yield-0-triv.C: New.
	* g++.dg/coroutines/torture/co-yield-1-multi.C: New.
	* g++.dg/coroutines/torture/co-yield-2-loop.C: New.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (execute_expand_coro_ifns): Rewrite the tail of
	.CO_YIELD IFN blocks.  This is needed to avoid confusing the loop
	verifier at O0 when we suddenly disconnect stuff inside loops.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (execute_expand_coro_ifns): Just update comments
	and diagnostic strings. NFC.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (move_edge_and_update_vdef): Don't recompute
	dominators immediately, defer until the common code at the end.  Note
	this wasn't "wrong" it was just a waste of resources.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_co_await): implement co_await() operator
	overload resolution.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_find_in_subtree): Fix unused parm.
	(register_awaits): Likewise.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander): Adjust the expander to look
	inside cleanup point exprs.  The rewritten control flow needs to be
	introduced at this level.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander): Use the rewritten co_resume()
	call as a proof of principle.  Eventually, we will use the three
	calls built at parser time.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_co_await): Check the awaitable method
	signatures more rigorously.  Build the method calls for ready and
	suspend - but don't record them (yet).

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_find_in_subtree): New.
	(co_await_expander): Initial implementation of co_await, limited to
	expressions without temporaries.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (replace_proxy, transform_await_expr,
	transform_await_wrapper): New.
	(build_actor_fn): Rewrite the proxy vars used at parse time to the
	actual frame vars now we know them.  Drop the synthesis of the initial
	and final suspend points and use the ones generated at morph time.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_actor_fn): Use the new measured suspend point
	count to build the resume and destroy dispatchers.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (register_await_info, register_awaits): New.
	(morph_fn_to_coro): Record suspend points from the function body.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_init_or_final_await): New.
	(morph_fn_to_coro): Use the co_await builder for initial and final
	suspend.  Rename the tree list variable used to build the known
	coroutine frame entries.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc: Collect parse-related functions together, adjust
	comments.  NFC.
	* cp-tree.def: Adjust comments. NFC.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* constexpr.c (potential_constant_expression_1): Declare that co_await
	and co_yield expressions are not candidates for constexpr.
	* coroutines.cc: Reorganise text to put the parser-related functions
	together.  Rename co_await_context_valid_p to finish_co_await_expr.
	(finish_co_await_expr): Perform the check for p.await_transform().
	Use the common build_co_await() to complete the build.
	* cp-tree.h: Rename co_await_context_valid_p to finish_co_await_expr.
	* parser.c (cp_parser_unary_expression): Use finish_co_await_expr in
	place of the temporary parse.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc: Rename co_yield_context_valid_p to
	finish_co_yield_expr. (finish_co_yield_expr): Validate and build
	yield_value() call, use build_co_await() to construct the co_await.
	* cp-tree.h: Rename co_yield_context_valid_p to finish_co_yield_expr.
	* parser.c (cp_parser_yield_expression): Revise to use
	finish_co_yield_expr.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_co_await): New.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* call.c (add_builtin_candidates): Rename COAWAIT_EXPR to
	CO_AWAIT_EXPR. (op_error, build_new_op_1): Likewise.
	* coroutines.cc (co_await_expander, build_actor_fn) Likewise.
	* cp-objcp-common.c (cp_common_init_ts): Rename COAWAIT_EXPR and
	COYIELD_EXPR, add CO_RETRN_EXPR.
	* cp-tree.def: Likewise.
	* operators.def: Rename COAWAIT_EXPR.
	* parser.c (cp_parser_unary_expression): Likewise.
	(cp_parser_operator): Ensure CO_AWAIT_EXPR is recognised as a built-
	in operator.
	(cp_parser_yield_expression): Rename COYIELD_EXPR to CO_YIELD_EXPR.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (coro_promise_type_found_p): Stash the location
	of the first coroutine keyword seen.
	* cp-tree.h (lang_decl_fn): Add first_coro_kw.
	(DECL_COROUTINE_FIRST_KEYWD_LOC): New.
	
2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (coro_promise_type_found_p): Build a promise var
	to be used as a proxy for the eventual frame var.
	* cp-tree.h (lang_decl_fn): Add promise_proxy.
	(DECL_COROUTINE_PROMISE_PROXY): New.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (find_promise_type): Ensure that the promise
	type is complete.

2019-02-12  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (find_std_experimental): New.
	(find_handle_type): Rename to find_coro_traits_template_decl.
	(find_coro_handle_type): Rename vars, use factored function.

2019-02-03  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* parser.c (required_token): Add RT_CO_YIELD.
	(cp_parser_yield_expression): New.
	(cp_parser_assignment_expression): Handle co_yield.
	(cp_parser_required_error): Handle RT_CO_YIELD.

	gcc/testsuite/
	* g++.dg/coroutines/co-yield-syntax-1.C: New.
	* g++.dg/coroutines/co-yield-syntax-2.C: New.
	* g++.dg/coroutines/co-yield-syntax-3.C: New.
	* g++.dg/coroutines/coro-missing-promise-yield.C: New.	
	
2019-02-03  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* cp-objcp-common.c (cp_common_init_ts): Repurpose unused
	CORO_ALLOCATOR to COYIELD_EXPR.
	* cp-tree.def: Likewise.

2019-02-03  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_yield_context_valid_p): New.
	* cp-tree.h (co_yield_context_valid_p): Declare.

2019-02-03  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): make sure that we can
	really get a method that produces the return object.
	* decl.c (finish_function): Update error exit for the case
	where we fail to morph the coroutine.

	gcc/testsuite/
	* g++.dg/coroutines/coro-missing-gro.C: New.

2019-02-03  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc: Whitespace and comment and punctuation
	changes. NFC.

2019-02-03  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Adjust the lookup for the
	initial and final suspend point functions to force instantiation
	of the promise.

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-ret-6.C: Update test now that the
	templatized version handles 'auto' return values for promise
	members.

2019-02-03  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (get_fn_local_identifier): New helper.
	(morph_fn_to_coro): User helper to find names for outlined
	functions.

2019-01-25  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/coro-bad-return.C: New.
	* g++.dg/coroutines/torture/coro-missing-ret-value.C: New.

2019-01-25  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-ret-6.C: New.
	* g++.dg/coroutines/torture/co-ret-7.C: New.

2019-01-25  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/co-ret-5.C: New.

2019-01-25  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/coro.h (promise): Use the __fr_ptr member.
	
2019-01-25  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Handle GRO with a
	signature different from the function return.  Handle GRO with
	non-trivial dtor.
	gcc/testsuite/
	* g++.dg/coroutines/torture/co-ret-3.C: New.
	* g++.dg/coroutines/torture/co-ret-4.C: New.

2019-01-25  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Correct a couple of statement
	void casts.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/torture/coro-torture.exp: New.
	* g++.dg/coroutines/torture/co-ret-void-is-suspend.C: New.
	* g++.dg/coroutines/torture/co-ret-void-is-ready.C: New.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/coro.h: Update this to move closer to the
	actual experimental/coroutines header we will need.
	At present, enough support for initial co_return cases.  Rename
	the __handle field to __fr_ptr, since that's more specific.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/c-family/
	* c.opt (flag_coroutines): Have this recognised by LTO too.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* passes.def: Move coroutine IFN expansion to post LTO.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c: Update header use.
	(first_vuser, move_edge_and_update_vdef): New helper functions.
	(execute_expand_coro_ifns): Try to minimise early scan for CO_XXX
	functions, since this has to be executed for all fns.
	Move dummy edges for the dispatcher to their real targets for any
	YIELD points that remain.  Elide others. Arrange to update DOM and
	VSSA.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	*internal-fn.def (CO_ACTOR, CO_YIELD): Make LEAF.
	Reorder defs to keep NOP at the end.
	* internal-fn.c (expand_CO_FRAME, expand_CO_YIELD,
	expand_CO_ACTOR): Don't ICE if they are not expanded, but print an
	error for now.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* decl.c (emit_coro_helper): New.
	(finish_function): Emit the actor (resume) and destroy functions.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (build_destroy_fn): New.
	(morph_fn_to_coro): Use destroy function builder.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (USE_SWITCH_CO_YIELD_GUARD): New.
	(create_anon_label_with_ctx): New.
	(co_await_expander): Add alternate codepath generation selected
	with the USE_SWITCH_CO_YIELD_GUARD.  Push the code labels into the
	context of the generated actor function.
	(expand_co_awaits): Provide the actor function decl to the expand
	callback.  (build_actor_fn): New.
	(morph_fn_to_coro): Move the expansion of await trees from here
	to the new actor function and build that in a deferred access
	check state so that it doesn't show as nested to the gimpifier.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Move the Get Return Object
	to its own bind level.  Note a code path that is generated by
	clang but appears dead.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Adjust the ramp function
	bind to remove the GRO and to rename.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Add a "suspended" field
	to the coro frame and initialise it.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Add a "frame needs free"
	field to the coro frame and set it true once malloc has set it. In
	this case of course, it's always true - but at some later time the
	elision of the frame allocation will make it meaningful.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Use malloc in the ramp
	to generate the coro frame for now.  Make the ramp function check
	for NULL return and bail early if so.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander): Make the resume index
	unsigned short.  (expand_co_awaits, morph_fn_to_coro): Likewise.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Adjust function interface
	to allow return of generated function bodies.  Declare resumer and
	destroyer functions.
	* cp-tree.h (morph_fn_to_coro): Adjust interface.
	* decl.c (finish_function): Allow for the morph routine to return
	function decls for the resume and destroy functions.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* decl.c (finish_function): Break out condition for doing
	coroutine expansion.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/c-family/
	* c-common.h (D_CXX_CHAR8_T_FLAGS): Clean up stray character
	committed in error.

2019-01-23  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r268188.
	gcc/
	* configure: Regenerated.
	gcc/c-family/
	* c-common.h (D_CXX_COROUTINES): Adjust for new entry.

2019-01-07  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (lower_coro_builtin,
	execute_lower_coro_builtins, pass_data_coroutine_lower_builtins,
	gate, execute): New.
	* passes.def: Add pass_coroutine_lower_builtins.
	* tree-pass.h (make_pass_coroutine_lower_builtins): New.

2019-01-07  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-passes.c (execute_expand_coro_ifns): New.
	(pass_coroutine_expand_ifns): Update comments. (execute): Call the
	dummy implementation.

2019-01-07  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-builtins.def (BUILT_IN_CORO_PROMISE,
	BUILT_IN_CORO_DONE, BUILT_IN_CORO_NOOP): Mark nothrow.
	* gcc/internal-fn.c (CO_FRAME, CO_YIELD, CO_ACTOR): Likewise.

2019-01-07  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Adjust wrapping of the
	GRO initialiser. 

2019-01-07  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* decl.c (finish_function): Don't try to process exceptions
	yet.

2019-01-07  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* coroutine-builtins.def: Update copyright years.
	* coroutine-passes.c: Likewise.
	gcc/cp/
	* coroutines.cc: Update copyright years.
	gcc/testsuite/
	* g++.dg/coroutines/coroutines.exp: Update copyright years.

2019-01-07  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r267619.

2018-12-24  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r267412.

2018-12-10  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r266943.
	gcc/
	* configure: Regenerated.

2018-12-03  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r266733.

2018-11-26  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Call the internal
	CO_FRAME function directly, rather than deferring to
	gimplification.

2018-11-26  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_await_expander): New callback.
	(expand_co_awaits): New.  (morph_fn_to_coro): Rename phase_name
	to resume_idx_name, and likewise phase to resume_idx. Add
	initial suspend and final suspend handles to the coroutine
	frame.  Remove the inline building of initial and final susp
	point vars.  Add a reference to the relevant awaiter to each
	co_await tree.  Remove unused init and final awaiter destructors.
	Expand co_await trees.

2018-11-26  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_return_context_valid_p): It is a valid void
	co_return if the expression is either absent or void type.

2018-11-26  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_return_expander): New callback.
	(expand_co_returns): New. (morph_fn_to_coro): Lookup the
	promise return_void() method.  Expand co_returns. Implement
	rule for flowing off the end of a coroutine.

2018-11-26  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (find_coro_handle_type): new.
	(find_handle_type): Remove unused vars.
	(coro_promise_type_found_p): Save the coro handle rather than
	the traits one.  (find_promise_type): Remove unused arg.

2018-11-26  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Update initial validity checks
	and diagnostics.  Amend comments.

2018-11-26  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r266446.

2018-11-20  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Implement initial function
	rewriting.

2018-11-20  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (find_handle_type): New.
	(find_promise_type): Refactor. (lookup_promise_member): New.
	* cp-tree.h (lang_decl_fn): Save handle type.

2018-11-20  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* parser.c (cp_parser_jump_statement): Check for co_return
	before auto return pattern to get diagnostics for invalid use of
	'auto'.

2018-11-20  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* cp-tree.def (CORO_ALLOCATOR): New tree.
	* cp-objcp-common.c (cp_common_init_ts): Mark CORO_ALLOCATOR
	as typed.

2018-11-19  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/coro.h: Migrate to use the builtin functions
	declared to implement the core library functions.

2018-11-19  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/c-family/
	* c-cppbuiltin.c (c_cpp_builtins): Update coroutines
	version to 201806.

	gcc/testsuite/
	* g++.dg/coroutines/coro-missing-ret-void.C: Update to cater for
	n4775 changes to coro.h.  Move bad promise example to this file
	from coro.h.
	* g++.dg/coroutines/coro-pre-proc.C: Amend to version
	to 201806.
	* g++.dg/coroutines/coro.h: Update to n4775. Remove examples of
	coroutine and promise classes.

2018-11-19  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r266264.

2018-11-03  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r265766.

2018-11-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (morph_fn_to_coro): Remove unused variable.
	(co_await_context_valid_p): Check that the co_await expression is
	non-NULL.

2018-11-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (coro_function_valid_p): New.
	(morph_fn_to_coro): New.
	* cp-tree.h (morph_fn_to_coro): New.
	* decl.c (finish_function): When we have a coroutine, call out to
	morph the user's original function to add the ramp function base.

2018-11-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* call.c (op_error): Handle COAWAIT_EXPR. (build_new_op_1): Likewise.
	* coroutines.cc (co_await_context_valid_p): New.
	* cp-tree.h (co_await_context_valid_p): New.
	* parser.c (cp_parser_unary_expression): Handle RID_CO_AWAIT.
	gcc/testsuite/
	* g++.dg/coroutines/coro-await-context-auto-fn.C: New.

2018-11-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (co_return_context_valid_p): Factor code to provide
	common functionality.  (coro_promise_type_found_p): New.
	(coro_common_keyword_context_valid_p): New.

2018-11-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* cp-objcp-common.c (cp_common_init_ts): Add COAWAIT_EXPR to typed
	trees.
	* cp-tree.def (COAWAIT_EXPR): New tree code.
	* operators.def (co_await): New unary operator.

2018-11-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* g++.dg/coroutines/coro.h (coroutine_traits): Move typename into the
	implementation space.

2018-11-02  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* cp-tree.h (DECL_COROUTINE_FUNCTION_P): Rename to DECL_COROUTINE_P.
	(co_return_context_valid_p): Move declaration to new section for
	coroutines.cc.
	* semantics.c (finish_co_return_stmt): Rename DECL_COROUTINE_FUNCTION_P.

2018-10-29  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r265582.

2018-10-15  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r265156.

2018-10-10  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* coroutines.cc (find_promise_type): New.
	(co_return_context_valid_p): Diagnose missing promise members.
	* cp-tree.h (lang_decl_fn): Add promise_type.
	(DECL_COROUTINE_PROMISE_TYPE): New.

	gcc/testsuite/
	* g++.dg/coroutines/coro.h (MissingRetVoid): New class.
	* g++.dg/coroutines/coro-missing-ret-void.C: New.

2018-10-10  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/coroutines.o.
	* semantics.c: Move co_return_context_valid_p to new file.
	* coroutines.cc: New.

2018-10-10  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* cp-tree.h: Use a bit in lang_decl_fn instead of DECL_LANG_FLAG_3
	to signal that a function is a coroutine.
 
2018-10-10  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* Makefile.in (OBJS): Add coroutine-passes.o.
	* tree-pass.h (make_pass_coroutine_expand_ifns): New.
	* passes.def: Add pass_coroutine_expand_ifns to lowering passes.
	* coroutine-passes.c: New.

2018-10-10  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* internal-fn.def (CO_FRAME, CO_YIELD, CO_ACTOR): New.
	* internal-fn.c (expand_CO_FRAME, expand_CO_YIELD,
	expand_CO_ACTOR): New.

2018-10-10  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* builtin-types.def (BT_FN_BOOL_PTR, BT_FN_PTR_PTR_SIZE_BOOL): New.
	* builtins.def (DEF_COROUTINE_BUILTIN): New.
	Include coroutine-builtins.def.
	* coroutine-builtins.def: New.
	gcc/testsuite/
	* coro-builtins.C: New.

2018-10-10  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* coroutines/coroutines.exp: Update to add attribution.

2018-10-09  Nathan Sidwell  <nathan@acm.org>

	gcc/c-family/
	* c.opt: Add some modules options.
	gcc/cp/
	* lang-specs.h: Provide diagnostic when modules options are used.

2018-10-09  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r264949.

2018-10-01  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/cp/
	* cp-tree.h (COROUTINE_RETURN_P, DECL_COROUTINE_FUNCTION_P): New.
	* typecheck.c (check_co_return_expr): New.
	* semantics.c (co_return_context_valid_p, finish_co_return_stmt) New.
	* parser.c (cp_parser_statement): handle RID_CO_RETURN.
	(cp_parser_jump_statement): handle RID_CO_RETURN.
	gcc/testsuite/
	* g++.dg/coroutines/coro.h: New.
	* g++.dg/coroutines/coro-auto-fn.C: New.
	* g++.dg/coroutines/coro-constexpr-fn.C: New.
	* g++.dg/coroutines/coro-context-ctor-dtor.C: New.
	* g++.dg/coroutines/coro-context-main.C: New.
	* g++.dg/coroutines/coro-context-vararg.C: New.

2018-10-01  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/c-family/
	* c-common.h (RID_CO_AWAIT, RID_CO_YIELD, RID_CO_RETURN,
	D_CXX_COROUTINES, D_CXX_COROUTINES_FLAGS): New.
	* c-common.c (c_common_reswords): co_await, co_yield,
	co_return New keywords.
	gcc/cp/
	* lex.c (init_reswords): Handle flag_coroutines.

2018-10-01  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/testsuite/
	* coroutines/coroutines.exp: New.
	* coroutines/coro-pre-proc.C: New.

2018-10-01  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/c-family/
	* c.opt (fcoroutines, fcoroutines-ts): New.
	* c-cppbuiltin.c (c_cpp_builtins): Add __cpp_coroutines.
	gcc/
	* doc/invoke.texi (fcoroutines): New description.

2018-10-01  Iain Sandoe  <iain@sandoe.co.uk>

	Merge trunk r264732.

2018-09-22  Iain Sandoe  <iain@sandoe.co.uk>

	gcc/
	* configure.ac (ACX_BUGURL): Point to the project wiki page.
	* configure: Regenerated.

2018-09-21  Iain Sandoe  <iain@sandoe.co.uk>

	Branch creation from trunk:264468
	Use this Changelog for all branch changes, including merges.

	gcc/REVISION: New (branch identifier).

Local Variables:
mode: change-log
change-log-default-name: "ChangeLog.coroutines"
End: