aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/ChangeLog
blob: a89911a9b42cbe1a1bc7f8e82232451e2ce4bb87 (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
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
2018-08-21  Bob Duff  <duff@adacore.com>

	* einfo.ads, einfo.adb (Private_View, Shadow_Entities): Remove
	obsolete code.

2018-08-21  Maroua Maalej  <maalej@adacore.com>

	* sem_spark.adb (Check_Call_Statement): Check global and formal
	parameter permissions at call sites.
	(Check_Callable_Body): Assume permissions on globals and
	parameters depending on their modes then analyse the body
	operations.
	(Check_Declaration): Consider both deep (including elementary
	access) object declarations and normal variables. First check
	whether the deep object is of Ownership Aspec True or not, then,
	depending on its initialization, assign the appropriate state.
	Check related to non access type variables deal with
	initialization value permissions.
	(Check_Expression): Check nodes used in the expression being
	analyzed.
	(Check_Globals): Call by Check_Call_Statement to perform the
	check on globals.
	(Check_List): Call Check_Node on each element of the list.
	(Check_Loop_Statement): Check the Iteration_Scheme and loop
	statements.
	(Check_Node): Main traversal procedure to check safe pointer usage.
	(Check_Package_Body): Check subprogram's body.
	(Check_Param_In): Take a formal and an actual parameter and
	Check the permission of every in-mode parameter.
	(Check_Param_Out): Take a formal and an actual parameter and
	check the state of out-mode and in out-mode parameters.
	(Check_Statement): Check statements other than procedure call.
	(Get_Perm, Get_Perm_Or_Tree, Get_Perm_Tree): Find out the state
	related to the given name.
	(Is_Deep): Return True if an object is of access type or has
	subfields of access type.
	(Perm_Error, Perm_Error_Subprogram_End): Add an error message
	whenever the found state on the given name is different from the
	one expected (in the statement being analyzed).
	(Process_Path): Given an operation and a current state, call
	Perm_Error if there is any mismatch.
	(Return_Declarations, Return_Globals, Return_The_Global): Check
	the state of a given name at the end of the subprogram. These
	procedures may change depending on how we shall finally deal
	with globals and the rhs state in a move operation.
	(Set_Perm_Extensions, Set_Perm_Prefixes_Borrow,
	Set_Perm_Prefixes, Setup_Globals, Setup_Parameter_Or_Global,
	Setup_Parameters): Set up the new states to the given node and
	up and down the tree after an operation.
	(Has_Ownership_Aspect_True): This function may disappear later
	when the Ownership Aspect will be implemented in the FE.

2018-08-21  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Resolve_Call): Resolve correctly a parameterless
	call that returns an access type whose designated type is the
	component type of an array, when the function has no defaulted
	parameters.

2018-08-21  Yannick Moy  <moy@adacore.com>

	* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
	Document entries of the target parametrization file.
	* gnat_ugn.texi: Regenerate.

2018-08-21  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb: Set scope of elaboration flag for 'Access.

2018-08-21  Ed Schonberg  <schonberg@adacore.com>

	* sprint.adb: Add guard on printing aspects.

2018-08-21  Javier Miranda  <miranda@adacore.com>

	* exp_cg.adb (Generate_CG_Output): Handle calls removed by the
	expander.

2018-08-21  Ed Schonberg  <schonberg@adacore.com>

	* layout.adb: Do not set size of access subprogram if unnesting.

2018-08-21  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb: Remove warnings for access to subprograms when
	unnesting is active.

2018-08-21  Ed Schonberg  <schonberg@adacore.com>

	* exp_aggr.adb (Expand_Array_Aggregate): If the component type
	is limited, the array must be constructed in place, so set flag
	In_Place_Assign_OK_For_Declaration accordingly. This prevents
	improper copying of an array of tasks during initialization.

2018-08-21  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Call_to_gnu): Always suppress an
	unchecked conversion around the actual for an In parameter
	passed by copy.

2018-08-21  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_util.adb (Is_Possibly_Unaligned_Object): For the case of a
	selected component inherited in a record extension and subject
	to a representation clause, retrieve the position and size from
	the original record component.

2018-08-21  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.ads, sem_util.adb (New_External_Entity): Type of
	Suffix_Index must be Int, not Nat, so that a negative value can
	be used to generate a unique name for an external object, as
	specified in Tbuild.New_External_Name.
	(Scope_Within): Handle private type whose completion is a
	synchronized type (For unnesting).
	* itypes.ads, itypes.adb (Create_Itype): Ditto
	* sem_ch3.adb (Constrain_Corresponding_Record): Generate a
	unique name for the created subtype, because there may be
	several discriminated tasks present in the same scope, and each
	needs its distinct corresponding record subtype.

2018-08-21  Yannick Moy  <moy@adacore.com>

	* doc/gnat_ugn/gnat_and_program_execution.rst: Update
	documentation of dimensionality analysis.
	* gnat_ugn.texi: Regenerate.
	* Makefile.rtl, impunit.adb: Consider the new units.
	* libgnat/s-dfmkio.ads, libgnat/s-dfmopr.ads,
	libgnat/s-diflmk.ads: New units based on Float.
	* libgnat/s-dilomk.ads, libgnat/s-dlmkio.ads,
	libgnat/s-dlmopr.ads: New units based on Long_Float.
	* libgnat/s-dmotpr.ads: Rename to libgnat/s-dgmgop.ads and turn
	into an instance of
	System.Dim.Generic_Mks.Generic_Other_Prefixes.
	* libgnat/s-dimmks.ads: Rename to libgnat/s-digemk.ads and turn
	into an instance of System.Dim.Generic_Mks.

2018-08-21  Hristian Kirtchev  <kirtchev@adacore.com>

	* impunit.adb: Add g-lists to the set of non-implementation
	units.
	* libgnat/g-lists.adb, libgnat/g-lists.ads: New unit.
	* Makefile.rtl: Add g-lists to the set of non-tasking units.
	* gcc-interface/Make-lang.in: Add g-lists to the set of files
	used by gnat1.

2018-08-21  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch9.adb (Reset_Scopes): Do not recurse into type
	declarations when resetting the scope of entities declared the
	procedures generated for entry bodies and accept alternatives.
	Use the entity of the procedure declaration, not its body, as
	the new scope.

2018-08-21  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb (Elaboration_Entity): Include entries and entry
	families in the set of legal entities.
	(Elaboration_Entity_Required): Include entries and entry
	families in the set of legal entities.
	(Set_Elaboration_Entity): Include entries and entry families in
	the set of legal entities.
	(Set_Elaboration_Entity_Required): Include entries and entry
	families in the set of legal entities.
	(Write_Field13_Name): Update the output of attribute
	Elaboration_Entity.
	* einfo.ads: Attributes Elaboration_Entity and
	Elaboration_Entity_Required now apply to entries and entry
	families.

2018-08-21  Arnaud Charlet  <charlet@adacore.com>

	* set_targ.adb: Mark some CodePeer message as Intentional.

2018-08-21  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Resolve_Call): Force the freezing of an
	expression function that is called to provide a default value
	for a defaulted discriminant in an object initialization.

2018-08-21  Hristian Kirtchev  <kirtchev@adacore.com>

	* libgnat/g-dynhta.adb, libgnat/g-dynhta.ads: New package
	Dynamic_HTable.

2018-08-21  Javier Miranda  <miranda@adacore.com>

	* checks.ads (Determine_Range): Adding documentation.
	* checks.adb (Determine_Range): Don't deal with enumerated types
	with non-standard representation.
	(Convert_And_Check_Range): For conversion of enumeration types
	with non standard representation to an integer type perform a
	direct conversion to the target integer type.

2018-08-21  Piotr Trojanek  <trojanek@adacore.com>

	* lib-xref.ads, lib-xref-spark_specific.adb
	(Enclosing_Subprogram_Or_Library_Package): Now roughtly works
	for pragmas that come from aspect specifications.

2018-08-21  Pierre-Marie de Rodat  <derodat@adacore.com>

	* sa_messages.ads, sa_messages.adb: New source files.

2018-08-03  Pierre-Marie de Rodat  <derodat@adacore.com>

	Reverts
	2018-07-06  Jim Wilson  <jimw@sifive.com>

	* Make-generated.in (treeprs.ads): Use $(GNATMAKE) instead of gnatmake.
	(einfo.h, sinfo.h, stamp-snames, stamp-nmake): Likewise.
	* gcc-interface/Makefile.in (xoscons): Likewise.

2018-07-31  Alexandre Oliva  <oliva@adacore.com>
            Olivier Hainque  <hainque@adacore.com>

	* gcc-interface/trans.c: Include debug.h.
	(file_map): New static variable.
	(gigi): Set it.  Create decl_to_instance_map when needed.
	(Subprogram_Body_to_gnu): Pass gnu_subprog_decl to...
	(Sloc_to_locus): ... this.  Add decl parm, map it to instance.
	* gcc-interface/gigi.h (Sloc_to_locus): Adjust declaration.

2018-07-31  Arnaud Charlet  <charlet@adacore.com>

	* clean.adb, gnatchop.adb, gnatfind.adb, gnatls.adb,
	gnatmake.ads, gnatxref.adb, make.adb, make.ads, make_util.ads,
	sfn_scan.adb, vxaddr2line.adb, xeinfo.adb, xoscons.adb,
	xr_tabls.adb, xref_lib.adb: Address CodePeer messages.

2018-07-31  Arnaud Charlet  <charlet@adacore.com>

	* gnatlink.adb: Fix potential Constraint_Error if
	Library_Version is too long.

2018-07-31  Arnaud Charlet  <charlet@adacore.com>

	* sem_elab.adb: Remove duplicate condition detected by CodePeer.

2018-07-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Subp_Index): In the case of a protected
	operation, the relevant entry is the generated
	protected_subprogram_body into which the original body is
	rewritten. Assorted cleanup and optimizations.

2018-07-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_attr.adb (Expand_Attribute, case Fixed_Value): Set the
	base type of the result to ensure that proper overflow and range
	checks are generated.  If the target is a fixed-point tyoe,
	generate the required overflow and range checks explicitly,
	rather than relying on Apply_Type_Conversion_Checks, which might
	simply set the Do_Range_Check flag and rely on the backend to
	add the check.

2018-07-31  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_res.adb (Resolve_Call): Establish a transient scope to
	manage the secondary stack when the designated type of an
	access-to-subprogram requires it.

2018-07-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch7.adb (Check_Unnesting_Elaboration_Code): To find local
	subprograms in the elaboration code for a package body, recurse
	through nested statement sequences because a compiler-generated
	procedure may appear within a condition statement.

2018-07-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb (Expand_Protected_Subprogram_Call): Handle
	properly a protected call that includes a default parameter that
	is a call to a protected function of the same type.

2018-07-31  Justin Squirek  <squirek@adacore.com>

	* lib-writ.adb (Write_With_Lines): Modfiy the generation of
	dependencies within ali files so that source unit bodies are
	properly listed even if said bodies are missing.  Perform legacy
	behavior in GNATprove mode.
	* lib-writ.ads: Modify documentation to reflect current behavior.

2018-07-31  Eric Botcazou  <ebotcazou@adacore.com>

	*  libgnarl/s-osinte__solaris.ads (upad64_t): New private type.
	(mutex_t): Use it for 'lock' and 'data' components.
	(cond_t): Likewise for 'data' and use single 'flags' component.

2018-07-31  Justin Squirek  <squirek@adacore.com>

	* exp_ch5.adb (Make_Field_Assign): Force temporarily generated
	objects for assignment of overlaid user objects to be renamings
	instead of constant declarations.

2018-07-31  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch9.adb (Analyze_Pragmas): New routine.
	(Build_Private_Protected_Declaration): Code clean up. Relocate
	relevant aspects and pragmas from the stand-alone body to the
	newly created spec.  Explicitly analyze any pragmas that have
	been either relocated or produced by the analysis of the
	aspects.
	(Move_Pragmas): New routine.
	* sem_prag.adb (Find_Related_Declaration_Or_Body): Recognize the
	case where a pragma applies to the internally created spec for a
	stand-along subprogram body declared in a protected body.

2018-07-31  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace
	calls to Current_Scope in three assertions with calls to
	Current_Subprogram.

2018-07-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_eval.adb (Check_Non_Static_Context): Do not warn on an
	integer literal greater than the upper bound of
	Universal_Integer'Last when expansion is disabled, to avoid a
	spurious warning over ranges involving 64-bit modular types.

2018-07-31  Arnaud Charlet  <charlet@adacore.com>

	* einfo.adb (Write_Entity_Flags): Also print
	Is_Activation_Record flag.

2018-07-31  Piotr Trojanek  <trojanek@adacore.com>

	* exp_aggr.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb,
	repinfo.adb, sem_ch9.adb: Minor replace Ekind membership tests
	with a wrapper routine.

2018-07-31  Piotr Trojanek  <trojanek@adacore.com>

	* ali.adb (Known_ALI_Lines): Remove 'F' as a prefix for lines
	related to the FORMAL analysis done by GNATprove.

2018-07-31  Javier Miranda  <miranda@adacore.com>

	* sem.ads (Inside_Preanalysis_Without_Freezing): New global
	counter.
	* sem.adb (Semantics): This subprogram has now the
	responsibility of resetting the counter before analyzing a unit,
	and restoring its previous value before returning.
	* freeze.adb (Freeze_Entity): Do not freeze if we are
	preanalyzing without freezing.
	* sem_res.adb (Preanalyze_And_Resolve): Set & restore
	In_Preanalysis_Without_Freezing.

2018-07-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Traverse_Homonyms): Consider generic actuals that
	may rename a matching class-wide operation only if the renaming
	declaration for that actual is in an enclosing scope (i.e.
	within the corrresponding instance).

2018-07-31  Hristian Kirtchev  <kirtchev@adacore.com>

	* checks.adb, contracts.adb, exp_aggr.adb, exp_ch5.adb,
	exp_disp.adb, make.adb, sem_ch4.adb, sem_eval.adb, sem_res.adb,
	usage.adb: Minor reformatting.

2018-07-31  Bob Duff  <duff@adacore.com>

	* sem_res.adb (Resolve_Allocator): Do not complain about the
	implicit allocator that occurs in the expansion of a return
	statement for a build-in-place function.

2018-07-20  Martin Sebor  <msebor@redhat.com>

	PR middle-end/82063
	* gcc-interface/misc.c (gnat_handle_option): Change function argument
	to HOST_WIDE_INT.

2018-07-17  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (choices_to_gnu): Rename parameters.  Deal with
	an operand of Character type.  Factor out range generation to the end.
	Check that the bounds are literals and convert them to the type of the
	operand before building the ranges.
	* gcc-interface/utils.c (make_dummy_type): Minor tweak.
	(make_packable_type): Propagate TYPE_DEBUG_TYPE.
	(maybe_pad_type): Likewise.

2018-07-17  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Try_Object_Operation): Handle properly a prefixed call
	in an instance, when the generic parameters include an interface type
	and a abstract operation of that type, and the actuals in the instance
	include an interface type and a corresponding abstract operation of it,
	with a different name than the corresponding generic subprogram
	parameter.

2018-07-17  Arnaud Charlet  <charlet@adacore.com>

	* sem_eval.adb (Rewrite_In_Raise_CE): Keep the original reason in more
	cases.

2018-07-17  Arnaud Charlet  <charlet@adacore.com>

	* checks.adb (Apply_Division_Check): Add provision for floating-point
	checks.

2018-07-17  Ed Schonberg  <schonberg@adacore.com>

	* exp_aggr.adb (Component_OK_For_Backend): If an array component of the
	enclosing record has a bound that is out of range (and that has been
	rewritten as a raise statement) the aggregate is not OK for any back
	end, and should be expanded into individual assignments.

2018-07-17  Piotr Trojanek  <trojanek@adacore.com>

	* atree.adb (Relocate_Node): Simplify with Is_Rewrite_Substitution.

2018-07-17  Piotr Trojanek  <trojanek@adacore.com>

	* sem_util.ads (Denotes_Same_Object): Likewise.
	* sem_warn.adb (Warn_On_Overlapping_Actuals): Fix RM rule references.

2018-07-17  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_disp.adb (Make_Tags): When the type has user-defined primitives,
	build the access type that is later used by Build_Get_Prim_Op_Address
	as pointing to a subtype of Ada.Tags.Address_Array.

2018-07-17  Patrick Bernardi  <bernardi@adacore.com>

	* libgnat/s-memory__mingw.adb: Remove.
	* Makefile.rtl: Remove s-memory.adb target pair from the Cygwin/Mingw32
	section.

2018-07-17  Hristian Kirtchev  <kirtchev@adacore.com>

	* frontend.adb (Frontend): The removal of ignored Ghost code must be
	the last semantic operation performed on the tree.

2018-07-17  Hristian Kirtchev  <kirtchev@adacore.com>

	* frontend.adb (Frontend): Update the call to Register_Config_Switches.
	* inline.ads: Add new component Config_Switches to record
	Pending_Body_Info which captures the configuration state of the pending
	body.  Remove components Version, Version_Pragma, SPARK_Mode, and
	SPARK_Mode_Pragma from record Pending_Body_Info because they are
	already captured in component Config_Switches.
	* opt.adb (Register_Opt_Config_Switches): Rename to
	Register_Config_Switches.
	(Restore_Opt_Config_Switches): Rename to Restore_Config_Switches.
	(Save_Opt_Config_Switches): Rename to Save_Config_Switches. This
	routine is now a function, and returns the saved configuration state as
	an aggregate to avoid missing an attribute.
	(Set_Opt_Config_Switches): Rename to Set_Config_Switches.
	* opt.ads (Register_Opt_Config_Switches): Rename to
	Register_Config_Switches.
	(Restore_Opt_Config_Switches): Rename to Restore_Config_Switches.
	(Save_Opt_Config_Switches): Rename to Save_Config_Switches. This
	routine is now a function.
	(Set_Opt_Config_Switches): Rename to Set_Config_Switches.
	* par.adb (Par): Update the calls to configuration switch-related
	subprograms.
	* sem.adb (Semantics): Update the calls to configuration switch-related
	subprograms.
	* sem_ch10.adb (Analyze_Package_Body_Stub): Update the calls to
	configuration switch-related subprograms.
	(Analyze_Protected_Body_Stub): Update the calls to configuration
	switch-related subprograms.
	(Analyze_Subprogram_Body_Stub): Update calls to configuration
	switch-related subprograms.
	* sem_ch12.adb (Add_Pending_Instantiation): Update the capture of
	pending instantiation attributes.
	(Inline_Instance_Body): Update the capture of pending instantiation
	attributes.  It is no longer needed to explicitly manipulate the SPARK
	mode.
	(Instantiate_Package_Body): Update the restoration of the context
	attributes.
	(Instantiate_Subprogram_Body): Update the restoration of context
	attributes.
	(Load_Parent_Of_Generic): Update the capture of pending instantiation
	attributes.
	(Set_Instance_Env): Update the way relevant configuration attributes
	are saved and restored.

2018-07-17  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
	more rvalues in the expression of a renaming.

2018-07-17  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Define for
	METHOD_TYPE too.
	(TYPE_RETURN_UNCONSTRAINED_P): Likewise.
	(TYPE_CI_CO_LIST): Likewise.
	* gcc-interface/gigi.h (is_cplusplus_method): Delete.
	(fntype_same_flags_p): Adjust comment.
	* gcc-interface/decl.c (Has_Thiscall_Convention): Delete.
	(gnat_to_gnu_entity) <E_Subprogram_Type>: Do not set the "thiscall"
	attribute directly.
	(is_cplusplus_method): Make static and adjust head comment.
	(gnat_to_gnu_param): Return a pointer for the "this" parameter of
	C++ constructors.
	(gnat_to_gnu_subprog_type): Turn imported C++ constructors into their
	callable form.  Generate a METHOD_TYPE node for imported C++ methods.
	Set param_list at the very end of the processing.
	(substitute_in_type) <METHOD_TYPE>: New case.
	* gcc-interface/misc.c (gnat_print_type) <METHOD_TYPE>: Likewise.
	(gnat_type_hash_eq): Accept METHOD_TYPE.
	* gcc-interface/trans.c (Identifier_to_gnu): Deal with METHOD_TYPE.
	(Attribute_to_gnu): Likewise.
	(Call_to_gnu): Likewise.
	(process_freeze_entity): Likewise.
	* gcc-interface/utils.c (create_subprog_decl): Adjust head comment.
	(fntype_same_flags_p): Likewise.

2018-07-17  Piotr Trojanek  <trojanek@adacore.com>

	* inline.adb (Expand_Inlined_Call): Remove extra parentheses.

2018-07-17  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_disp.adb (Gen_Parameters_Profile): Make the _Init parameter an
	In/Out parameter.
	(Set_CPP_Constructors): Adjust comment accordingly.

2018-07-17  Bob Duff  <duff@adacore.com>

	* exp_disp.adb (Build_Class_Wide_Check): Return early if the
	precondition is supposed to be ignored.

2018-07-17  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Check_Untagged_Equality): Extend check to operations
	declared in the same scope as the operand type, when that scope is a
	procedure.

2018-07-17  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Unnest_Subprograms): Do nothing if the expander is not
	active.  Don't use Get_Actual_Subtype for record subtypes.  Ignore
	rewritten identifiers and uplevel references to bounds of types that
	come from the original type reference.

2018-07-17  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch13.adb, exp_ch7.adb, exp_unst.adb, freeze.adb,
	libgnat/s-os_lib.adb, sem_ch3.adb, sem_ch3.ads, sem_ch5.adb,
	sem_eval.adb, sem_res.adb, sem_util.adb: Minor reformatting.

2018-07-17  Javier Miranda  <miranda@adacore.com>

	* exp_ch13.adb (Expand_N_Freeze_Entity): Handle subtype declared for an
	iterator.
	* freeze.adb (Freeze_Expression): Handle freeze of an entity defined
	outside of a subprogram body. This case was previously handled during
	preanalysis; the frozen entities were remembered and left pending until
	we continued freezeing entities outside of the subprogram. Now, when
	climbing the parents chain to locate the correct placement for the
	freezeing node, we check if the entity can be frozen and only when no
	enclosing node is marked as Must_Not_Freeze the entity is frozen.
	* sem_ch3.ads (Preanalyze_Default_Expression): Declaration moved to the
	package body.
	* sem_ch3.adb (Preanalyze_Default_Expression): Code adjusted to invoke
	the new subprogram Preanalyze_With_Freezing_And_Resolve.
	* sem_ch6.adb (Preanalyze_Formal_Expression): New subprogram.
	(Analyze_Expression_Function, Process_Formals): Invoke
	Preanalyze_Formal_Expression instead of Preanalyze_Spec_Expression
	since the analysis of the formals may freeze entities.
	(Analyze_Subprogram_Body_Helper): Skip building the body of the
	class-wide clone for eliminated subprograms.
	* sem_res.ads, sem_res.adb (Preanalyze_And_Resolve): New subprogram.
	Its code is basically the previous version of this routine but extended
	with an additional parameter which is used to specify if during
	preanalysis we are allowed to freeze entities.  If the new parameter is
	True then the subtree root node is marked as Must_Not_Freeze and no
	entities are frozen during preanalysis.
	(Preanalyze_And_Resolve): Invokes the internal version of
	Preanalyze_And_Resolve without entity freezing.
	(Preanalyze_With_Freezing_And_Resolve): Invokes the internal version of
	Prenalyze_And_Resolve with freezing enabled.

2018-07-17  Piotr Trojanek  <trojanek@adacore.com>

	* einfo.ads, libgnat/g-comlin.ads: Minor change "ie" to "i.e." in docs
	and comments.

2018-07-17  Justin Squirek  <squirek@adacore.com>

	* libgnat/s-os_lib.adb (Argument_String_To_List): Fix trimming of
	whitespace.

2018-07-17  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Has_Visible_State): Do not consider constants as
	visible state because it is not possible to determine whether a
	constant depends on variable input.
	(Propagate_Part_Of): Add comment clarifying the behavior with respect
	to constant.

2018-07-17  Yannick Moy  <moy@adacore.com>

	* gnat1drv.adb (Gnat1drv): Do not issue warning about exception not
	being propagated in GNATprove mode.

2018-07-17  Dmitriy Anisimkov  <anisimko@adacore.com>

	* libgnat/g-socket.adb, libgnat/g-socket.ads: Reorganize and make
	public components of Inet_Addr_Type. Introduce public binary
	operations.

2018-07-17  Javier Miranda  <miranda@adacore.com>

	* exp_ch7.adb (Make_Transient_Block): When determining whether an
	enclosing scope already handles the secondary stack, take into account
	transient blocks nested in a block that do not manage the secondary
	stack and are located within a loop.

2018-07-17  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Enclosing_Subprogram): Protected entries and task
	entries must be treated separately: task entries are within the
	enclosing subprogram of the task type, while protected entries are
	transformed into the corresponding Protected_Body_Subprogram, which is
	the enclosing_subprogram of any subprogram declared within the entry
	body.

2018-07-17  Hristian Kirtchev  <kirtchev@adacore.com>

	* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Add missing
	sections on -gnatH and -gnatJ compiler switches.
	* gnat_ugn.texi: Regenerate.

2018-07-17  Hristian Kirtchev  <kirtchev@adacore.com>

	* alloc.ads: Update the allocation metrics of the ignored Ghost nodes
	table.
	* atree.adb: Add a soft link for a procedure which is invoked whenever
	an ignored Ghost node or entity is created.
	(Change_Node): Preserve relevant attributes which come from the Flags
	table.
	(Mark_New_Ghost_Node): Record a newly created ignored Ghost node or
	entity.
	(Rewrite): Preserve relevant attributes which come from the Flags
	table.
	(Set_Ignored_Ghost_Recording_Proc): New routine.
	* atree.ads: Define an access-to-suprogram type for a soft link which
	records a newly created ignored Ghost node or entity.
	(Set_Ignored_Ghost_Recording_Proc): New routine.
	* ghost.adb: Remove with and use clause for Lib.  Remove table
	Ignored_Ghost_Units.  Add new table Ignored_Ghost_Nodes.
	(Add_Ignored_Ghost_Unit): Removed.
	(Initialize): Initialize the table which stores ignored Ghost nodes.
	Set the soft link which allows Atree.Mark_New_Ghost_Node to record an
	ignored Ghost node.
	(Is_Ignored_Ghost_Unit): Use the ultimate original node when checking
	an eliminated ignored Ghost unit.
	(Lock): Release and lock the table which stores ignored Ghost nodes.
	(Mark_And_Set_Ghost_Assignment): Record rather than propagate ignored
	Ghost nodes.
	(Mark_And_Set_Ghost_Procedure_Call): Record rather than propagate
	ignored Ghost nodes.
	(Mark_Ghost_Clause): Record rather than propagate ignored Ghost nodes.
	(Mark_Ghost_Declaration_Or_Body): Record rather than propagate ignored
	Ghost nodes.
	(Mark_Ghost_Pragma): Record rather than propagate ignored Ghost nodes.
	(Propagate_Ignored_Ghost_Code): Removed.
	(Record_Ignored_Ghost_Node): New routine.
	(Remove_Ignored_Ghost_Code): Reimplemented.
	(Remove_Ignored_Ghost_Node): New routine.
	(Ultimate_Original_Node): New routine.
	* ghost.ads (Check_Ghost_Completion): Removed.
	* sem_ch8.adb (Analyze_Use_Package): Remove obsolete code. Mark a use
	package clause as ignored Ghost if applicable.
	* sem_util.adb (Is_Body_Or_Package_Declaration): Reimplemented.

2018-07-17  Javier Miranda  <miranda@adacore.com>

	* sem_ch5.adb (Has_Call_Using_Secondary_Stack): Moved to library level
	to reuse it.
	(Analyze_Loop_Statement): Wrap the loop in a block when the evaluation
	of the loop iterator relies on the secondary stack.

2018-07-17  Piotr Trojanek  <trojanek@adacore.com>

	* sem_util.adb (Next_Actual): If the parent is a N_Null_Statement,
	which happens for inlined calls, then fetch the next actual from the
	original AST.

2018-07-17  Ed Schonberg  <schonberg@adacore.com>

	* einfo.ads: Update documentation for Scalar_Range.

2018-07-17  Piotr Trojanek  <trojanek@adacore.com>

	* lib-xref-spark_specific.adb (Create_Heap): Attach the HEAP entity to
	the Standard package.

2018-07-17  Piotr Trojanek  <trojanek@adacore.com>

	* einfo.adb (Is_Wrapper_Package): Remove extra parentheses.

2018-07-17  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Enclosing_Subprogram): Handle properly entries, and
	synchronized types that are completions of limited types or private
	extensions.
	(Scope_Within): Handle properly accept statements in task bodies.

2018-07-17  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Has_Visible_State): Do not consider generic formals
	because they are not part of the visible state space. Add constants to
	the list of acceptable visible states.
	(Propagate_Part_Of): Do not consider generic formals when propagating
	the Part_Of indicator.
	* sem_util.adb (Entity_Of): Do not follow renaming chains which go
	through a generic formal because they are not visible for SPARK
	purposes.
	* sem_util.ads (Entity_Of): Update the comment on usage.

2018-07-17  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Gather_Components): A discriminant of an ancestor may
	have been constrained by a later ancestor, so when looking for the
	value of that hidden discriminant we must examine the stored constraint
	of other ancestors than the immediate parent type.

2018-07-17  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch6.adb (Build_Heap_Or_Pool_Allocator): Ensure that scoping
	constructs and entities within receive new entities when replicating a
	tree.
	(Expand_N_Extended_Return_Statement): Ensure that scoping constructs
	and entities within receive new entities when replicating a tree.
	* sem_util.adb (New_Copy_Tree): Add new formal Scopes_In_EWA_OK.
	(Visit_Entity): Visit entities within scoping constructs inside
	expression with actions nodes when requested by the caller. Add blocks,
	labels, and procedures to the list of entities which need replication.
	* sem_util.ads (New_Copy_Tree): Add new formal Scopes_In_EWA_OK. Update
	the comment on usage.

2018-07-17  Arnaud Charlet  <charlet@adacore.com>

	* doc/gnat_ugn/about_this_guide.rst,
	doc/gnat_ugn/gnat_and_program_execution.rst: Remove references to gcov.
	* gnat_ugn.texi: Regenerate.

2018-07-16  Hristian Kirtchev  <kirtchev@adacore.com>

	* contracts.adb (Analyze_Contracts): Add specialized processing for
	package instantiation contracts.
	(Analyze_Package_Contract): Remove the verification of a missing
	Part_Of indicator.
	(Analyze_Package_Instantiation_Contract): New routine.
	* contracts.ads (Analyze_Package_Contract): Update the comment on
	usage.
	* sem_prag.adb (Check_Missing_Part_Of): Ensure that the entity of the
	instance is being examined when trying to determine whether a package
	instantiation needs a Part_Of indicator.

2018-07-16  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb, exp_ch7.adb, exp_ch9.adb, exp_unst.adb, inline.adb,
	sem.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_eval.adb,
	sem_util.adb: Minor reformatting.

2018-07-16  Arnaud Charlet  <charlet@adacore.com>

	* frontend.adb: Only unnest subprograms if no previous errors were
	 detected.

2018-07-16  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch7.adb (Check_Unnesting_Elaboration_Code): Handle loops that
	contain blocks in the elaboration code for a package body. Create the
	elaboration subprogram wrapper only if there is a subprogram
	declaration in a block or loop.

2018-07-16  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch4.adb (Expand_Set_Membership): Use New_Copy_Tree to perform a
	deep copy of the left operand when building each conjuct of the
	expanded membership operation, to avoid sharing nodes between them.
	This sharing interferes with the unnesting machinery and is generally
	undesirable.

2018-07-16  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Visit_Node): Handle 'Address references that are
	calls.

2018-07-16  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Visit_Node): Handle the semantic of Storage_Pool field
	in relevant nodes: Allocate, Free, and return statements.

2018-07-16  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Analyze_Package_Instantiation): Handle properly an
	instance that carries an aspect Default_Storage_Pool that overrides a
	default storage pool that applies to the generic unit. The aspect in
	the generic unit was removed before copying it in the instance, rather
	than removing it from the copy of the aspects that are appended to the
	aspects in the instance.

2018-07-16  Ed Schonberg  <schonberg@adacore.com>

	* einfo.adb (Set_Is_Uplevel_Referenced_Entity): Flag can appear on
	loop parameters.
	* exp_ch7.adb (Check_Unnesting_Elaboration_Code): Handle subprogram
	bodies.
	* exp_ch9.adb (Reset_Scopes_To): Set the scopes of entities local to an
	entry body to be the corresponding generated subprogram, for correct
	analysis of uplevel references.
	* exp_unst.adb (Visit_Node): Handle properly binary and unary operators
	Ignore pragmas, fix component associations.
	(Register_Subprograms): Subprograms in synchronized types must be
	treated as reachable.

2018-07-16  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_util.adb (Check_No_Hidden_State): Ignore internally-generated
	states and variables.

2018-07-16  Piotr Trojanek  <trojanek@adacore.com>

	* sinfo.ads, sinfo.adb (Withed_Body): Remove.
	(Set_Withed_Body): Remove.

2018-07-16  Piotr Trojanek  <trojanek@adacore.com>

	* sem.adb (Walk_Library_Items): Skip units with configuration pragmas
	when printing debug info.

2018-07-16  Piotr Trojanek  <trojanek@adacore.com>

	* sem.adb (Walk_Library_Items): Reuse local constant.
	(Is_Subunit_Of_Main): Turn condition to positive and flip the
	IF-THEN-ELSE branches; avoid potentially ineffective assignment to the
	Lib variable.

2018-07-16  Piotr Trojanek  <trojanek@adacore.com>

	* sem.adb (Walk_Library_Items): Deconstruct dead code.

2018-07-16  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch4.adb (Expand_N_Op_Xor): Use common routine
	Expand_Nonbinary_Modular_Op.  Needed for unnesting.

2018-07-16  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Inherit_Predicate_Flags): A non-discrete type may have a
	static predicate (for example True) but has no
	static_discrete_predicate.

2018-07-16  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_attr.adb (Build_Record_VS_Func): Handle corner cases dealing with
	class-wide types and record extensions.

2018-07-16  Justin Squirek  <squirek@adacore.com>

	* sem_eval.adb (Eval_Integer_Literal): Add exception for avoiding
	checks on expanded literals within if and case expressions.

2018-07-16  Hristian Kirtchev  <kirtchev@adacore.com>

	* libgnat/s-wchwts.adb (Wide_String_To_String): Use the appropriate
	longest sequence factor. Code clean up.
	(Wide_Wide_String_To_String): Use the appropriate longest sequence
	factor.  Code clean up.

2018-07-16  Javier Miranda  <miranda@adacore.com>

	* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Report an error
	on Bit_Order when defined for a record extension.

2018-07-16  Arnaud Charlet  <charlet@adacore.com>

	* libgnat/s-objrea.ads: Minor code clean up.

2018-07-16  Piotr Trojanek  <trojanek@adacore.com>

	* sem_ch3.adb (Process_Discriminants): Adjust reference to the SPARM RM
	rule.

2018-07-16  Arnaud Charlet  <charlet@adacore.com>

	* adaint.c (__gnat_set_file_time_name): Code clean up.

2018-07-16  Javier Miranda  <miranda@adacore.com>

	* inline.adb (Build_Body_To_Inline): Minor code reorganization that
	ensures that calls to function Has_Single_Return() pass a decorated
	tree.
	(Has_Single_Return.Check_Return): Peform checks on entities (instead on
	relying on their characters).

2018-07-16  Javier Miranda  <miranda@adacore.com>

	* exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Code cleanup. Required
	to avoid generating an ill-formed tree that confuses gnatprove causing
	it to blowup.

2018-07-16  Yannick Moy  <moy@adacore.com>

	* inline.adb (Has_Single_Return): Rewrap comment.

2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>

	* einfo.ads: Minor tweak in comment.

2018-07-16  Javier Miranda  <miranda@adacore.com>

	* sem_ch4.adb (Analyze_Membership_Op): Code cleanup.

2018-07-16  Javier Miranda  <miranda@adacore.com>

	* exp_attr.adb (Expand_N_Attribute_Reference ['Count]): Do not
	transform 'Count into a function call if the current scope has been
	eliminated.

2018-07-16  Javier Miranda  <miranda@adacore.com>

	* sem_util.ads, sem_util.adb (Has_Prefix): Move this function to the
	public part of this package.

2018-07-16  Yannick Moy  <moy@adacore.com>

	* sem_res.adb (Resolve_Call): Do not inline calls inside
	compiler-generated functions translated as predicates in GNATprove.

2018-07-16  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch4.adb (Expand_N_Allocator): Test for Storage_Pool being RTE in
	addition to the existing test for no Storage_Pool as a condition
	enabling generation of the call to Check_Standard_Allocator when the
	restriction No_Standard_Allocators_After_Elaboration is active.
	* libgnat/s-elaall.ads (Check_Standard_Allocator): Correct comment to
	say that Storage_Error will be raised (rather than Program_Error).
	* libgnat/s-elaall.adb (Check_Standard_Allocator): Raise Storage_Error
	rather than Program_Error when Elaboration_In_Progress is False.

2018-07-16  Gary Dismukes  <dismukes@adacore.com>

	* sem_eval.adb: Fix spelling for compile-time-known.

2018-07-16  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_eval.adb (Compile_Time_Known_Value): Add a guard which prevents
	the compiler from entering infinite recursion when trying to determine
	whether a deferred constant has a compile time known value, and the
	initialization expression of the constant is a reference to the
	constant itself.

2018-07-16  Nicolas Roche  <roche@adacore.com>

	* libgnat/a-strunb.adb, libgnat/a-strunb__shared.adb: Adjust growth
	factor from 1/32 to 1/2 for Unbounded_String.

2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/lang.opt (funsigned-char): New option.
	* gcc-interface/misc.c (gnat_handle_option): Accept it.
	* gcc-interface/utils.c (finish_character_type): Tweak comment.

2018-07-07  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity): Add GNAT_DECL local
	variable and use it throughout.
	<E_Variable>: If the nominal subtype of the object is unconstrained,
	compute the Ada size separately and put in on the padding type if the
	size is not fixed.
	<E_Record_Type>: Minor tweak.
	* gcc-interface/misc.c (gnat_type_max_size): Rename max_size_unit
	into max_size_unit throughout.

2018-07-07  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/gigi.h (add_decl_expr): Adjust prototype.
	* gcc-interface/decl.c (gnat_to_gnu_entity): Remove useless test.
	* gcc-interface/trans.c (add_stmt_with_node): Remove exceptions.
	(add_decl_expr): Change type of second parameter and rename it.
	(renaming_from_instantiation_p): New function moved from...
	(set_expr_location_from_node): Test for exceptions here and add one
	for actual subtypes built for unconstrained composite actuals.
	* gcc-interface/utils.c (renaming_from_instantiation_p): ...here.

2018-07-07  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (lvalue_required_p): Remove ALIASED parameter
	and adjust recursive calls.
	(Identifier_to_gnu): Adjust calls to lvalue_required_p.
	(gnat_to_gnu): Likewise.

2018-07-07  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_param): Minor tweak.
	(gnat_to_gnu_subprog_type): New pure_flag local variable.  Set it for
	a pure Ada function with a by-ref In parameter.  Propagate it onto the
	function type by means of the TYPE_QUAL_RESTRICT flag.
	* gcc-interface/utils.c (finish_subprog_decl): Set DECL_PURE_P if the
	function type has the TYPE_QUAL_RESTRICT flag set.

2018-07-06  Jim Wilson  <jimw@sifive.com>

	* Makefile.rtl: Add riscv*-linux* support.
	* libgnarl/s-linux__riscv.ads: New.
	* libgnat/system-linux-riscv.ads: New.

	* Make-generated.in (treeprs.ads): Use $(GNATMAKE) instead of gnatmake.
	(einfo.h, sinfo.h, stamp-snames, stamp-nmake): Likewise.
	* gcc-interface/Makefile.in (xoscons): Likewise.

2018-07-06  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* libgnat/system-rtems.ads (Frontend_Exceptions): Set to False.
	(ZCX_By_Default): Set to True.

2018-07-02  Martin Liska  <mliska@suse.cz>

	* gnatvsn.ads: Bump Library_Version to 9.

2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/ada-tree.h (TYPE_RETURN_BY_DIRECT_REF_P): Change from
	using TYPE_LANG_FLAG_4 to using TYPE_LANG_FLAG_0.
	(TYPE_ALIGN_OK): Move around.
	(TYPE_PADDING_FOR_COMPONENT): Remove superfluous parentheses.
	* gcc-interface/decl.c (change_qualified_type): Move to...
	(gnat_to_gnu_entity): Adjust comment.
	* gcc-interface/gigi.h (change_qualified_type): ...here; make inline.
	(ceil_pow2): Use ceil_log2.
	* gcc-interface/utils.c (finish_subprog_decl): Add couple of comments
	and do not set TREE_SIDE_EFFECTS.
	(handle_noreturn_attribute): Use change_qualified_type.

2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Do not get
	the expression of a dispatch table that is not being defined.
	<E_Record_Subtype>: Remove obsolete kludge.

2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (warn_on_field_placement): Use specific wording
	for discriminants.
	(warn_on_list_placement): New static function.
	(components_to_record): Use it to warn on multiple fields in list.

2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (variant_desc): Add AUX field.
	(gnat_to_gnu_entity) <discrete_type>: Do not call compute_record_mode
	directly.
	(reverse_sort_field_list): New static function.
	(components_to_record): Place the variant part at the beginning of the
	field list when there is an obvious order of increasing position.
	(build_variant_list): Initialize it.
	(create_variant_part_from): Do not call compute_record_mode directly.
	(copy_and_substitute_in_layout): Likewise.  Always sort the fields with
	fixed position in order of increasing position, in the record and all
	the variants, in any.  Call reverse_sort_field_list.
	* gcc-interface/utils.c (make_packable_type): Compute the sizes before
	calling finish_record_type.  Do not call compute_record_mode directly.
	(finish_record_type): Overhaul final processing depending on REP_LEVEL
	and call finish_bitfield_layout if it is equal to one or two.

2018-06-11  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Reuse the
	existing fields of a dummy fat pointer type, if any.  Clear the
	TYPE_DECL_SUPPRESS_DEBUG on the fat pointer type after completing it.

2018-06-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* contracts.adb (Process_Body_Postconditions): Expand only checked
	postconditions.
	(Process_Contract_Cases_For): Expand only checked contract cases.
	(Process_Inherited_Preconditions): Ignored class-wide preconditions are
	partially expanded because some of their semantic checks are tied to
	the expansion.
	(Process_Preconditions_For): Expand only checked preconditions.
	(Process_Spec_Postconditions): Expand only checked preconditions.
	Ignored class-wide preconditions are partially expanded because some of
	their semantic checks are tied to the expansion.
	* exp_prag.adb (Expand_N_Pragma): Suppress the expansion of ignored
	assertion pragmas.
	* exp_util.adb (Add_Inherited_Invariants): Code clean up.
	* sem_util.adb (Propagate_Invariant_Attributes): Code clean up.

2018-06-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch9.adb, exp_unst.adb, inline.adb, libgnat/a-ciorma.adb,
	libgnat/a-ciormu.adb, libgnat/a-ciorse.adb, libgnat/a-coorma.adb,
	libgnat/a-coormu.adb, libgnat/a-coorse.adb, sem_prag.adb: Minor
	reformatting.

2018-06-11  Gary Dismukes  <dismukes@adacore.com>

	* exp_unst.ads, exp_unst.adb: Typo fixes and minor reformatting.

2018-06-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): Do
	not add any actuals when the size of the object is known, and the
	caller will allocate it.
	(Build_Heap_Allocator): Rename to Build_Heap_Or_Pool_Allocator to
	better illustrate its functionality. Update the comment on the
	generated code.  Generate a branch for the heap and pool cases where
	the object is not necessarity controlled.
	(Expand_N_Extended_Return_Statement): Expand the extended return
	statement into four branches depending the requested mode if the caller
	will not allocate the object on its side.
	(Make_Build_In_Place_Call_In_Allocator): Do not allocate a controlled
	object on the caller side because this will violate the semantics of
	finalizable types. Instead notify the function to allocate the object
	on the heap or a user-defined storage pool.
	(Needs_BIP_Alloc_Form): A build-in-place function needs to be notified
	which of the four modes to employ when returning a limited controlled
	result.
	* exp_util.adb (Build_Allocate_Deallocate_Proc): Remove a redundant
	guard which is already covered in Needs_Finalization.

2018-06-11  Olivier Hainque  <hainque@adacore.com>

	* libgnat/s-excmac*.ads: Factorize Unwind_Action definitions ...
	* libgnat/a-exexpr.adb: ... Here, then add comments describing the
	major datastructures associated with the current exception raised.
	(Setup_Current_Excep): Accept a "Phase" argument conveying the
	unwinding phase during which this subprogram is called.  For an Ada
	exception, don't update the current exception buffer from the raised
	exception object during SEARCH_PHASE, as this is redundant with the
	call now issued just before propagation starts.
	(Propagate_GCC_Exception): Move call to Setup_Current_Excep ahead of
	the unwinding start, conveying Phase 0.
	(Unhandled_Except_Handler): Pass UA_CLEANUP_PHASE as the Phase value on
	the call to Setup_Current_Excep.
	* raise-gcc.c (personality_body): Pass uw_phases as the Phase argument
	on calls to Setup_Current_Excep.

2018-06-11  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.ads, exp_unst.adb (Needs_Fat_Pointer,
	Build_Access_Type_Decl): New subprograms to handle uplevel references
	to formals of an unconstrained array type. The activation record
	component for these is an access type, and the reference is rewritten
	as an explicit derefenrence of that component.

2018-06-11  Bob Duff  <duff@adacore.com>

	* libgnat/a-ciorma.adb, libgnat/a-ciormu.adb, libgnat/a-ciorse.adb,
	libgnat/a-coorma.adb, libgnat/a-coormu.adb, libgnat/a-coorse.adb:
	(Element): Add code to detect dangling cursors in some cases.

2018-06-11  Yannick Moy  <moy@adacore.com>

	* sem_ch6.adb (Build_Subprogram_Declaration): Mark parameters as coming
	from source.

2018-06-11  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Build_Predicate_Functions): For a derived type, ensure
	that its parent is already frozen so that its predicate function, if
	any, has already been constructed.

2018-06-11  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Adapt for
	possible task unit as the enclosing context.

2018-06-11  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat1drv.adb: Remove use clause for Repinfo.
	(Gnat1drv): Beef up comment about the interplay between -gnatc and
	back-end annotations.  Use full qualified name for List_Rep_Info.

2018-06-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* libgnat/g-arrspl.ads: Add pragma Preelaborate.

2018-06-11  Arnaud Charlet  <charlet@adacore.com>

	* exp_ch4.adb (Expand_Record_Equality): Remove extraneous "True and
	then" and general logical "ada" in codepeer mode.

2018-06-11  Javier Miranda  <miranda@adacore.com>

	* exp_ch9.adb (Expand_N_Protected_Body): Add missing handling of
	N_Call_Marker nodes.

2018-06-11  Arnaud Charlet  <charlet@adacore.com>

	* exp_ch3.adb, exp_unst.adb, inline.adb, sem_prag.adb: Minor
	reformatting.

2018-06-11  Yannick Moy  <moy@adacore.com>

	* doc/gnat_rm/implementation_defined_pragmas.rst: Add Suppressible
	argument to Assertion_Policy
	* gnat_rm.texi: Regenerate.

2018-06-11  Yannick Moy  <moy@adacore.com>

	* gnat1drv.adb: Do not check representation information in CodePeer and
	GNATprove modes, as these modes call a special backend instead of gigi,
	so do not have the information.

2018-06-11  Yannick Moy  <moy@adacore.com>

	* inline.adb (Build_Body_To_Inline): Consider case of extended return
	of unconstrained type as one case where inlining is not supported.
	(Expand_Inlined_Call): Remove special case for body as extended return
	of unconstrained type.

2018-06-11  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb (Analyze_Part_Of): Only allow Part_Of on non-generic
	unit.
	(Check_Missing_Part_Of): Do not force Part_Of on generic unit.

2018-06-11  Piotr Trojanek  <trojanek@adacore.com>

	* sem_ch13.adb (Analyze_Aspect_Specifications): Don't split AND THEN
	expressions in Pre/Post contracts while in GNATprove_Mode.

2018-06-11  Piotr Trojanek  <trojanek@adacore.com>

	* sem_util.adb (Is_Potentially_Unevaluated): Fix detection of contracts
	with AND THEN expressions broken down into individual conjuncts.

2018-06-11  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch7.adb (Check_Unnesting_Elaboration_Code): Add guard.

2018-06-11  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Visit_Node): Skip generic associations.

2018-06-11  Arnaud Charlet  <charlet@adacore.com>

	* libgnat/memtrack.adb (fwrite): Remove second definition.

2018-06-11  Javier Miranda  <miranda@adacore.com>

	* sinfo.ads (Is_Dynamic_Coextension): Adding documentation.
	(Is_Static_Coextension): Adding documentation.
	* sinfo.adb (Is_Dynamic_Coextension): Extending the assertion.
	(Is_Static_Coextension): Extending the assertion.
	* sem_util.adb (Mark_Allocator): Clear Is_Static_Coextension when
	setting flag Is_Dynamic_Coextension (and vice versa).

2018-06-11  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Search_Subprograms): Handle explicitly stubs at the top
	level of a compilation unit, becuase they may contain nested
	subprograms that need an activation record.

2018-06-11  Arnaud Charlet  <charlet@adacore.com>

	* Makefile.rtl: Compile Ada files with $(ADAC) instead of $(CC).

2018-06-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch11.adb, exp_unst.adb, inline.adb, sem_ch12.adb, sem_util.adb:
	Minor reformatting.
	* sinfo.ads: Fix a typo.

2018-06-11  Ed Schonberg  <schonberg@adacore.com>

	* inline.adb (Expand_Inlined_Call): If no optimization level is
	specified, the expansion of a call to an Inline_Always function is
	fully performed in the front-end even on a target that support back-end
	inlining.

2018-06-11  Arnaud Charlet  <charlet@adacore.com>

	* bindgen.adb (Gen_Adainit): Protect reference to System.Parameters
	with Sec_Stack_Used.

2018-06-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch8.adb (Find_Direct_Name): Mode the declaration of
	Is_Assignment_LHS further in. Use predicate
	Needs_Variable_Reference_Marker to determine whether to create a
	variable marker.
	(Find_Expanded_Name): Mode the declaration of Is_Assignment_LHS further
	in.  Use predicate Needs_Variable_Reference_Marker to determine whether
	to create a variable marker.
	* sem_elab.adb (Build_Variable_Reference_Marker): Remove the various
	checks that determine whether the identifier or expanded name is a
	suitable variable reference.  The checks are now performed by
	Needs_Variable_Reference_Marker.
	* sem_res.adb (Resolve_Actuals): Use predicate
	Needs_Variable_Reference_Marker to determine whether to create a
	variable marker.
	* sem_util.adb (Needs_Variable_Reference_Marker): New routine.
	* sem_util.ads (Needs_Variable_Reference_Marker): New routine.

2018-06-11  Valentine Reboul  <reboul@adacore.com>

	* doc/gnat_rm.rst, doc/gnat_ugn.rst: Rename "GPL Edition" into
	"Community Edition".

2018-06-11  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Install_Body): In order to determine the placement of
	the freeze node for an instance of a generic nested within another
	instance, take into account that the outer instance may be declared in
	the visible part of a package and the inner intance may be in the
	private part of the same package.

2018-06-11  Eric Botcazou  <ebotcazou@adacore.com>

	* errout.adb (Special_Msg_Delete): Remove handling of Atomic and VFA.

2018-06-11  Nicolas Roche  <roche@adacore.com>

	* libgnat/s-valuti.adb (Bad_Value): Ensure that we do not generate a
	stack overflow while raising a constraint error.

2018-06-11  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.ads (Rep_Value): Use a single line.
	* repinfo.adb (Rep_Value): Likewise.
	(List_Attr): Do not use string concatenation.

2018-06-11  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Visit_Node): Check reference to formal parameter of
	current procedure, because the bounds of its type may be uplevel
	references.

2018-06-02  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: If this is
	not a definition, retrieve the expression only if it's a compile-time
	known value if we are just annotating types.

	* gcc-interface/utils.c (convert): Do not try to upcast properly for a
	conversion between tagged types in type_annotate_only mode.

2018-06-02  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/ada-tree.h (TYPE_PADDING_FOR_COMPONENT): New macro.
	* gcc-interface/decl.c (gnat_to_gnu_component_type): Cache the padding
	type built for an aliased component with variable size.

2018-05-31  Pierre-Marie de Rodat  <derodat@adacore.com>

	* doc/gnat_ugn/project-manager-figure.png: Delete.

2018-05-31  Pierre-Marie de Rodat  <derodat@adacore.com>

	* vxworks-arm-link.spec, vxworks-e500-link.spec,
	vxworks-gnat-crtbe-link.spec, vxworks-smp-arm-link.spec,
	vxworks-smp-e500-link.spec, vxworks-smp-ppc-link.spec,
	vxworks-smp-x86-link.spec: New files.

2018-05-31  Pierre-Marie de Rodat  <derodat@adacore.com>

	* gnatvsn.adb: Re-center the copyright header.
	* indepsw-darwin.adb: Adjust the starting copyright year to 2011.

2018-05-31  Fedor Rybin  <frybin@adacore.com>

	* doc/gnat_ugn/gnat_utility_programs.rst: Document Stubs_Subdir in
	gnattest section on user guide.

2018-05-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Resolve_String_Literal): If the type is a string type
	whose component subtype has a static predicate, ensure that the
	predicate is applied to each character by expanding the string into the
	equivalent aggregate. This is also done if the component subtype is
	constrained.

2018-05-31  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Call_to_gnu): Remove obsolete code.

2018-05-31  Piotr Trojanek  <trojanek@adacore.com>

	* sem_ch6.adb (Check_Missing_Return): Handle procedures with no
	explicit spec.

2018-05-31  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Call_to_gnu): In the by-reference case, if
	the type of the parameter is an unconstrained array type, convert
	to the type of the actual before the type of the formal only if the
	conversion was suppressed earlier.  Use in_param and gnu_actual_type
	local variables throughout, and uniform spelling for In Out or Out.
	Also remove dead code in the component-by-reference case.

2018-05-31  Frederic Konrad  <konrad@adacore.com>

	* tracebak.c (STOP_FRAME): Harden condition.
	(is_return_from, EXTRA_STOP_CONDITION): New helpers for VxWorks in RTP
	mode.

2018-05-31  Ed Schonberg  <schonberg@adacore.com>

	* checks.adb (Apply_Discriminant_Check): Do not apply discriminant
	check to a call to a build-in-place function, given that the return
	object is limited and cannot be copied.

2018-05-31  Olivier Hainque  <hainque@adacore.com>

	* libgnat/s-atopri.ads: Update comment on __atomic_compare_exchange
	builtins.

2018-05-31  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Call_to_gnu): If this is a function call and
	there is no target, also create a temporary for the return value for
	an allocator if the type is an unconstrained record type with default
	discriminant.

2018-05-31  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch7.adb (Find_Transient_Context): An iteration scheme is a valid
	boudary for a transient scope.

2018-05-31  Valentine Reboul  <reboul@adacore.com>

	* gnatvsn.ads: Rename "GPL" version to "Community".

2018-05-31  Ed Schonberg  <schonberg@adacore.com>

	* einfo.ads: Improve documentation for the Is_Unsigned_Type entity
	flag.

2018-05-31  Piotr Trojanek  <trojanek@adacore.com>

	* sem_prag.adb (Analyze_Pragma): Replace call to Unique_Defining_Entity
	with a semantically equivalent call to Defining_Entity.

2018-05-31  Piotr Trojanek  <trojanek@adacore.com>

	* sem_prag.adb (Analyze_Pragma): Set Etype on the rewritten
	Max_Queue_Length expression.

2018-05-31  Sergey Rybin  <rybin@adacore.com>

	* doc/gnat_ugn/gnat_and_program_execution.rst: gnatelim does not need
	that the main unit to be built before the call, now it computes the
	closure of the main unit itself.
	* gnat_ugn.texi: Regenerate.

2018-05-31  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.adb (List_Structural_Record_Layout): Set First to false
	after having listed the fields of the parent type, if any.

2018-05-31  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <discrete_type>: Do not
	deal with the ___XP suffix for packed array types here...
	<E_Array_Subtype>: ...or here when processing the implementation type
	but when processing the original type instead.  Do not reuse the DECL
	of the implementation type for the original type.  Tidy up.

2018-05-31  Eric Botcazou  <ebotcazou@adacore.com>

	* einfo.ads (Object_Size_Clause): Declare.
	* einfo.adb (Object_Size_Clause): New function.
	* gcc-interface/utils.c (maybe_pad_type): Test Has_Size_Clause before
	retrieving Size_Clause and post the warning on the object size clause
	if Has_Object_Size_Clause is true.

2018-05-31  Javier Miranda  <miranda@adacore.com>

	* sem_util.ads, sem_util.adb (Find_Primitive_Eq): New subprogram.
	* exp_ch4.adb (Expand_Composite_Equality): Use the new subprogram
	Find_Primitive_Eq to search for the primitive of types whose underlying
	type is a tagged type.

2018-05-31  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb (Analyze_Pragma.Check_Loop_Pragma_Placement): Inverse
	order of treatment between nodes recognized as loop pragmas (or
	generated from one) and block statements.

2018-05-31  Doug Rupp  <rupp@adacore.com>

	* libgnat/s-osprim__posix2008.adb (Clock): Implement using
	clock_gettime.

2018-05-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.ads, exp_unst.adb (In_Synchronized_Unit): New predicate to
	mark subprograms that cannot be eliminated because they must be treated
	as reachable from outside the current unit. This includes entry bodies
	and protected operations.

2018-05-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch4.adb (Expand_Modular_Addition, Expand_Modular_Subtraction):
	Convert all operands of the generated code to Standard.Unsigned, to
	prevent spurious visibility errors. This is needed when the generated
	expansion involves a modular index type of an array type, and the index
	type is not immediately visible.

2018-05-30  Piotr Trojanek  <trojanek@adacore.com>

	* einfo.ads (Package_Instantiation): Update comment after a routine
	that uses this field has been renamed.

2018-05-30  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch11.adb (Replace_Raise_By_Goto): The transfomation is legal even
	if the local raise statement includes a string expression. This
	expression might be picked up by an outer handler or discarded, but
	plays no role in this transformation.

2018-05-30  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_aggr.adb, exp_unst.adb, freeze.adb, libgnat/a-direct.adb: Minor
	reformatting.

2018-05-30  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Visit_Node): Handle the semantic Procedure_To_Call
	field in relevant nodes: Allocate, Free, and return statements.

2018-05-30  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Visit_Node): Do not traverse a Component_Association
	that has not been analyzed, as will be the case for a nested aggregate
	that is expanded into individual assignments.

2018-05-30  Justin Squirek  <squirek@adacore.com>

	* aspects.adb, aspects.ads: Register new aspect.
	* par-prag.adb (Prag): Register new pragma.
	* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for new
	aspect similar to Aspect_Max_Queue_Length.
	* sem_prag.adb, sem_prag.ads (Analyze_Pragma): Register new pragma and
	set it to use the same processing as Pragma_Max_Queue_Length.
	* snames.ads-tmpl: Move definition of Name_Max_Entry_Queue_Depth so
	that it can be processed as a pragma in addition to a restriction and
	add an entry for the pragma itself.

2018-05-30  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb (Freeze_Object_Declaration): A pragma Thread_Local_Storage
	is now legal on a variable of composite type initialized with an
	aggregate that is fully static and requires no elaboration code.
	* exp_aggr.adb (Convert_To_Positional): Recognize additional cases of
	nested aggregates that are compile-time static, so they can be used to
	initialize variables declared with Threqd_Local_Storage.
	* doc/gnat_rm/implementation_defined_pragmas.rst: Add documentation on
	Thread_Local_Storage.
	* gnat_rm.texi: Regenerate.

2018-05-30  Yannick Moy  <moy@adacore.com>

	* sem_util.adb (Policy_In_Effect): Take into account CodePeer and
	GNATprove modes.

2018-05-30  Justin Squirek  <squirek@adacore.com>

	* libgnat/a-direct.adb, libgnat/a-direct.ads (Name_Case_Equivalence):
	Add implementation.
	(Start_Search): Modify to use Start_Search_Internal
	(Start_Search_Internal): Add to break out an extra flag for searching
	case insensative due to the potential for directories within the same
	OS to allow different casing schemes.
	* sysdep.c (__gnat_name_case_equivalence): Add as a default fallback
	for when the more precise solution fails.

2018-05-30  Hristian Kirtchev  <kirtchev@adacore.com>

	* checks.adb, exp_ch5.adb, exp_ch7.adb, exp_unst.adb, sem_eval.adb:
	Minor reformatting.

2018-05-30  Pascal Obry  <obry@adacore.com>

	* libgnat/g-comlin.ads (Value_Callback, Define_Switch): New.
	* libgnat/g-comlin.adb: Add corresponding implementation.

2018-05-30  Gary Dismukes  <dismukes@adacore.com>

	* sem_res.adb, sem_util.adb: Fix several typos.

2018-05-30  Olivier Hainque  <hainque@adacore.com>

	* vx_crtbegin_attr.c (CTOR_ATTRIBUTE, DTOR_ATTRIBUTE): Empty.
	(eh_registration_ctors, eh_registration_tors): New static variables,
	forced in a .ctors/.dtors section, respectively, with priority.

2018-05-30  Bob Duff  <duff@adacore.com>

	* aspects.ads, contracts.adb, exp_util.adb, expander.adb, expander.ads,
	freeze.adb, inline.adb, lib-xref.adb, sem.ads, sem_aggr.adb,
	sem_attr.adb, sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_ch6.adb,
	sem_ch8.adb, sem_dim.adb, sem_elab.adb, sem_res.adb, sem_res.ads,
	sinfo.ads: Spell preanalysis, preanalyze correctly.

2018-05-30  Bob Duff  <duff@adacore.com>

	* libgnat/g-sestin.ads: Rework documentation comments.

2018-05-30  Piotr Trojanek  <trojanek@adacore.com>

	* errout.adb, exp_aggr.adb, exp_ch7.adb, exp_util.adb, lib.adb,
	sem_ch13.adb, sem_ch4.adb, sem_res.adb, sem_util.adb
	(Has_Original_Node): Refactor to use Is_Rewrite_Substitution.

2018-05-30  Piotr Trojanek  <trojanek@adacore.com>

	* sem_prag.adb (Analyze_Pragma): Remove conjuncts that are always true.

2018-05-30  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_util.adb (Is_Atomic_Object): Cleaned up. Split the entity logic
	in a separate routine.
	(Is_Atomic_Object_Entity): New routine.
	(Is_Atomic_Prefix): Cleaned up.
	(Is_Synchronized_Object): Check that the object is atomic, or its type
	is atomic.
	(Object_Has_Atomic_Components): Removed.
	* sem_util.ads (Is_Atomic_Object): Reword the comment on usage.
	(Is_Atomic_Object_Entity): New routine.

2018-05-30  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Access_Subprogram_Declaration): The flag
	Needs_Activation_Record is only needed on a subprogram type, not on a
	pointer to such.
	* sem_res.adb (Resolve_Selected_Component): If the context type and the
	component type are anonymous access to subprograms, use the component
	type to obtain the proper value of Needs_Activation_Record flag for the
	expression.

2018-05-30  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Add
	comment about the memset case.

2018-05-30  Bob Duff  <duff@adacore.com>

	* exp_ch5.adb (Expand_Formal_Container_Element_Loop): Remove the code
	to analyze the Elmt_Decl, because it gets analyzed in the wrong scope.
	We need to analyze it as part of analyzing the block, so that if the
	call to Element that initializes Elmt_Decl returns on the secondary
	stack, the block will ss_mark/ss_release. This block is inside the
	loop; we don't want to leak memory until the loop exits.  The purpose
	of analyzing Elmt_Decl first was to catch the error of modifying it,
	which is illegal because it's a loop parameter. The above causes us to
	miss that error.  Therefore, we add a flag Is_Loop_Parameter, and set
	it on the Element entity, so we end up with an E_Variable node with the
	flag set.
	* einfo.ads, einfo.adb (Is_Loop_Parameter): New flag.
	* sem_ch5.adb (Diagnose_Non_Variable_Lhs): Give the "assignment to loop
	parameter not allowed" error if Is_Loop_Parameter.
	* sem_util.adb (Is_Variable): Return False if Is_Loop_Parameter, to
	trigger the call to Diagnose_Non_Variable_Lhs.

2018-05-30  Arnaud Charlet  <charlet@adacore.com>

	* checks.adb (Apply_Scalar_Range_Check):
	* sem_eval.adb (Check_Non_Static_Context, Out_Of_Range): Ignore out of
	range values for System.Priority in CodePeer mode since the actual
	target compiler may provide a wider range.

2018-05-30  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb: Search specification of main unit as well, for
	unnesting.

2018-05-30  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch7.adb (Check_Unnesting_Elaboration_Code): The statement part of
	a package body that is a compilation unit may contain blocks that
	declare local subprograms.  In Subprogram_Unnesting Mode such
	subprograms must be handled as nested inside the (implicit) elaboration
	procedure that executes that statement part. To handle properly uplevel
	references we construct that subprogram explicitly, to contain blocks
	and inner subprograms, The statement part of the compilation unit
	becomes a call to this subprogram. This is only done if blocks are
	present in the statement list of the body.

2018-05-30  Bob Duff  <duff@adacore.com>

	* exp_ch7.adb: Minor comment fix.

2018-05-30  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Visit_Node): Handle properly subprogram instantiations
	that have no corresponding body and appear as attributes of the
	corresponding wrapper package declaration.
	(Register_Subprogram): New subprogram, used for subprogram bodies and
	for subprogram instantiations to enter callable entity into Subp table.

2018-05-30  Hristian Kirtchev  <kirtchev@adacore.com>

	* libgnat/s-secsta.adb: Reimplement the secondary stack support.
	* libgnat/s-secsta.ads: Update the documentation of all routines in the
	public part of the package.  Reimplement the private part of the
	package to account for the new secondary stack structure.  Add types
	and subprograms for testing purposes.  Add several documentation
	sections.

2018-05-30  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_aggr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_unst.adb,
	exp_util.adb, exp_util.ads, libgnat/a-calcon.adb, libgnat/a-calcon.ads,
	libgnat/s-os_lib.adb, repinfo.adb, sem_ch3.adb, sem_disp.adb,
	sem_disp.ads, sem_util.adb: Minor reformatting.

2018-05-30  Arnaud Charlet  <charlet@adacore.com>

	* gcc-interface/Makefile.in: Move special flags for Ada runtime files
	from here...
	* Makefile.rtl: ... to here.  Update comments.  Protect call to
	"GCC_FOR_TARGET" in case target_os isn't defined.

2018-05-30  Arnaud Charlet  <charlet@adacore.com>

	* gcc-interface/Makefile.in: Move target pair settings from here...
	* Makefile.rtl: ... to here.
	(setup-rts): New target.

2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>

	* doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
	List of All Switches): Replace "modules" with "units".
	(Subprogram Inlining Control): Likewise.
	* gnat_ugn.texi: Regenerate.
	* usage.adb (Usage): Fix description of -gnatn switch.

2018-05-29  Arnaud Charlet  <charlet@adacore.com>

	* gcc-interface/Makefile.in: Fix typos.

2018-05-29  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch7.adb (Build_Finalizer_Call): Attach to tree the reference to
	the finalizer procedure in the At_End handler, for use in LLVM
	generation.

2018-05-29  Javier Miranda  <miranda@adacore.com>

	* exp_ch4.adb (Expand_N_Op_Eq, Expand_Composite_Equality): Use the new
	subprogram Inherits_From_Tagged_Full_View to identify more reliably
	untagged private types completed with a derivation of an untagged
	private whose full view is a tagged type.
	* sem_util.ads, sem_util.adb (Inherits_From_Tagged_Full_View): New
	subprogram.
	(Collect_Primitive_Operations): Handle untagged private types completed
	with a derivation of an untagged private type whose full view is a
	tagged type. In such case, collecting the list of primitives we may
	find two equality primitives: one associated with the untagged private
	and another associated with the ultimate tagged type (and we must
	remove from the returned list this latter one).

2018-05-29  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Visit_Node): Handle statement sequences that include an
	At_End handler.

2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.adb (List_Entities): Also recurse into blocks without label.

2018-05-29  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb (Expand_N_Subprogram_Body): Do not generate push/pop for
	exceptions if subprogram unnesting is in effect, because these branch
	nodes are relevant only in the presence of nested subprograms.

2018-05-29  Ed Schonberg  <schonberg@adacore.com>

	* libgnat/s-fatgen.adb (Succ, Pred):  Raise Constraint_Error
	unconditionally when applied to the largest positive (resp. largest
	negative) value of a floating-point type.

2018-05-29  Ed Schonberg  <schonberg@adacore.com>

	* einfo.ads, einfo.adb: Clarify use of Activation_Record_Component:
	discriminants and exceptions are never components of such.  The flag
	Needs_Activation_Record is set on subprogram types, not on access to
	them.

2018-05-29  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb: Set scope of component of subtype.

2018-05-29  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Visit_Node): Exclude selected components whose prefix
	carry no type. Such selected components appear in unit names that are
	child units, both in the specification and possibly in an end label for
	the unit, and they do not contain any relevant uplevel references.

2018-05-29  Arnaud Charlet  <charlet@adacore.com>

	* libgnat/a-calend.ads, libgnat/a-calend.adb (Epoch_Offset): Make it a
	function.

2018-05-29  Olivier Hainque  <hainque@adacore.com>

	* libgnat/system-vxworks7-ppc-rtp.ads: New file.
	* libgnat/system-vxworks7-ppc-kernel.ads: New file.
	* libgnat/system-vxworks7-e500-rtp.ads: New file.
	* libgnat/system-vxworks7-e500-kernel.ads: New file.
	* libgnat/system-vxworks7-x86-rtp.ads: New file.
	* libgnat/system-vxworks-ppc64-kernel.ads: Rename as ...
	* libgnat/system-vxworks7-ppc64-kernel.ads: and adjust name of
	gnat-crtbe link spec to use the vx7 variant.

2018-05-29  Olivier Hainque  <hainque@adacore.com>

	* vx_crtbegin.inc: Use a consistent naming convention for the
	registration/deregistration functions across RTP or kernel.  Remove the
	ctor/dtor attribute setting based on RTP/kernel, expect the optional
	attribute extension to be provided by includers instead.
	* vx_crtbegin.c: Mere inclusion of vx_crtbegin.inc with empty attribute
	extension for the registration/deregistration functions.
	* vx_crtbegin_attr.c: New file. Include vx_crtbegin.inc with explicit
	constructor/destructor attribute extensions.
	* vx_crtbegin_array.c: New file. Include vx_crtbegin.inc with empty
	attribute extensions and declare _ctors/_dtors arrays.
	* vx_crtbegin_auto.c: Remove.
	* libgnat/system-vxworks7-aarch64-rtp-smp.ads: Use
	vxworks7-gnat-crtbe-link.spec.
	* libgnat/system-vxworks7-aarch64.ads: Likewise.
	* libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise.
	* libgnat/system-vxworks7-ppc-rtp-smp.ads: Likewise.
	* libgnat/system-vxworks7-ppc64-rtp-smp.ads: Likewise.
	* libgnat/system-vxworks7-x86-kernel.ads: Likewise.
	* libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise.
	* libgnat/system-vxworks7-x86_64-kernel.ads: Likewise.
	* libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise.

2018-05-29  Piotr Trojanek  <trojanek@adacore.com>

	* ali.adb: Minor reformatting.

2018-05-29  Joel Brobecker  <brobecker@adacore.com>

	* doc/gnat_ugn/platform_specific_information.rst: Update package
	requirements for 32bit GNAT on x86_64-linux.
	* gnat_ugn.texi: Regenerate.

2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>

	* doc/gnat_ugn/building_executable_programs_with_gnat.rst (Debugging
	Control): Adjust description of -gnatRj.
	* gnat_ugn.texi: Regenerate.
	* opt.ads (List_Representation_Info_To_JSON): Likewise.
	* repinfo.adb (List_Rep_Info): Do not automatically create a file
	if List_Representation_Info_To_JSON is true.
	* switch-c.adb (Scan_Front_End_Switches) <R>: Remove incompatibility
	check between -gnatRj and -gnatRs.
	* usage.adb (Usage): Adjust description of -gnatRj.

2018-05-29  Pascal Obry  <obry@adacore.com>

	* libgnat/s-os_lib.adb (Normalize_Pathname): Fix handling of ".." in
	the root directory.

2018-05-29  Pascal Obry  <obry@adacore.com>

	* libgnat/s-os_lib.adb: Minor reformatting.

2018-05-29  Doug Rupp  <rupp@adacore.com>

	* libgnat/a-calend.adb (Epoch_Offset): Move from body to ...
	* libgnat/a-calend.ads (Epoch_Offset): to private part of spec
	* libgnat/a-calcon.ads (To_Unix_Nano_Time): New function spec.
	* libgnat/a-calcon.adb (To_Unix_Nano_Time): New function body.

2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.ads (JSON format): Document new pair for components.
	* repinfo.adb (Derived_Discriminant): New function.
	(List_Structural_Record_Layout): Add Outer_Ent parameter and pass it
	in recursive calls. If the record type is the parent of an extension,
	find and list the derived discriminant from the extension, if any.
	(List_Component_Layout): List the Discriminant_Number in JSON mode.
	(List_Record_Info): Adjust call to List_Structural_Record_Layout.

2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>

	* doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
	List of All Switches): Document -gnatRj.
	(Debugging Control): Likewise.
	* gnat_ugn.texi: Regenerate.
	* opt.ads (List_Representation_Info_To_JSON): New boolean variable.
	* osint-c.adb (Create_Repinfo_File): Use the .json instead of .rep
	extension if List_Representation_Info_To_JSON is true.
	* repinfo.ads: Document the JSON output format.
	* repinfo.adb (List_Location): New procedure.
	(List_Array_Info): Add support for JSON output.
	(List_Entities): Likewise.
	(Unop): Likewise.
	(Binop): Likewise.
	(Print_Expr): Likewise.
	(List_Linker_Section): Likewise.
	(List_Mechanisms): Likewise.
	(List_Name): Likewise.
	(List_Object_Info): Likewise.
	(List_Record_Info): Likewise.
	(List_Component_Layout): Likewise.  Add Indent parameter.
	(List_Structural_Record_Layout): New procedure.
	(List_Attr): Add support for JSON output.
	(List_Type_Info): Likewise.
	(Write_Unknown_Val): Likewise.
	* switch-c.adb (Scan_Front_End_Switches) <R>: Deal with 'j'.
	* usage.adb (Usage): List -gnatRj.

2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.adb (List_Component_Layout): New procedure extracted from...
	(List_Record_Layout): ...here.  Invoke it.

2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.adb (Write_Unknown_Val): New procedure.
	(List_GCC_Expression): Call it.
	(List_Record_Layout): Likewise.
	(Write_Val): Likewise.

2018-05-29  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* exp_ch4.adb (Expand_N_Op_Abs): Clear Do_Overflow_Check when inserting
	code to do check.

2018-05-29  Arnaud Charlet  <charlet@adacore.com>

	* lib-writ.adb (Write_ALI): Do not use new function from s-casuti yet.
	This breaks build of cross compilers with older versions of GNAT, so
	better avoid it.

2018-05-29  Doug Rupp  <rupp@adacore.com>

	* libgnarl/s-taprop.ads (Monotonic_Clock): Refine documentation to
	reflect reality.

2018-05-29  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* exp_ch4.adb (Expand_N_Op_Abs): Always do range check against 'First.

2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.adb (List_Entities): Do not list the Linker_Section for
	subprograms here...
	(List_Mechanisms): ...but here instead.  Use consistent name output
	and formatting conventions.

2018-05-29  Bob Duff  <duff@adacore.com>

	* lib-writ.adb (Write_ALI): Cleanup: avoid use of global var; call new
	To_Lower function.
	* libgnat/s-casuti.ads, libgnat/s-casuti.adb (To_Upper, To_Lower,
	To_Mixed): New functions.
	* osint.adb: Cleanup: use Is_Directory_Separator, which correctly
	allows both '\' and '/' on Windows.

2018-05-28  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.ads: Minor fixes and tweaks in comments.

2018-05-28  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.adb (List_GCC_Expression): Remove Valop and replace calls to
	it with calls to Unop.

2018-05-28  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.ads (TCode): Adjust range.
	(Truth_Andif_Expr): Remove.
	(Truth_Orif_Expr): Likewise.
	(Truth_And_Expr .. Dynamic_Val): Adjust value.
	* repinfo.adb (Print_Expr): Remove handling of Truth_{And,Or}if_Expr.
	(Rep_Value): Likewise.
	* repinfo.h (Truth_Andif_Expr): Remove.
	(Truth_Orif_Expr): Likewise.
	(Truth_And_Expr .. Dynamic_Val): Adjust value.
	* gcc-interface/decl.c (annotate_value) <TRUTH_ANDIF_EXPR>: Fall
	through to TRUTH_AND_EXPR case.
	<TRUTH_ORIF_EXPR>: Fall through to TRUTH_OR_EXPR case.

2018-05-28  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Visit_Node): For indexed components and attribute
	references, examine index expressions or associated expressions as well
	to record uplevel references.
	(Vist_Node): For function and procedure calls, if a formal is an
	unconstrained array and the actual is constrained, check whether bounds
	of actual have uplevel references.

2018-05-28  Ed Schonberg  <schonberg@adacore.com>

	* einfo.ads, einfo.adb: Exceptions can be uplevel references, and thus
	they can appear as components of activation records.
	* exp_unst.adb (Visit_Node): A reference to an exception may be an
	uplevel reference.

2018-05-28  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_ch4.adb (Expand_Composite_Equality): Compute whether the size
	depends on a discriminant manually instead of using the predicate
	Size_Depends_On_Discriminant in the array type case.

2018-05-28  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Check_Static_Type): For a record subtype, check
	discriminant constraints as well.
	(Visit_Node): For a selected component, check type of prefix, as is
	done for indexed components and slices.

2018-05-28  Javier Miranda  <miranda@adacore.com>

	* exp_ch4.adb (Real_Range_Check): Add a temporary to store the integer
	value when converting a float value to a fixed-point value. This is
	required for CCG because it handles fixed-point types by means of
	unsigned integer type variables. The range check is now performed using
	the integer value stored in this temporary.

2018-05-28  Yannick Moy  <moy@adacore.com>

	* sem_util.adb (Is_OK_Volatile_Context): Add attributes First, Last and
	Length as valid non-interfering contexts for SPARK.

2018-05-28  Claire Dross  <dross@adacore.com>

	* sem_disp.ads, sem_disp.adb (Inheritance_Utilities): Package for
	generic inheritance utilities.
	(Generic_Inherited_Subprograms): Generic version of
	Inherited_Subprograms, generic in Find_Dispatching_Type function.
	(Generic_Is_Overriding_Subprogram): Generic version of
	Is_Overriding_Subprogram, generic in Find_Dispatching_Type function.
	(Inherited_Subprograms): Instance of Generic_Inherited_Subprograms with
	Sem_Disp.Find_Dispatching_Type.
	(Is_Overriding_Subprogram): Instance of
	Generic_Is_Overriding_Subprogram with Sem_Disp.Find_Dispatching_Type.
	(Inheritance_Utilities_Inst): Instance of Inheritance_Utilities
	with Sem_Disp.Find_Dispatching_Type.

2018-05-28  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_ch4.adb (Expand_Composite_Equality): For a composite (or FP)
	component type, do not expand array equality using the unconstrained
	base type, except for the case where the bounds of the type depend on a
	discriminant.

2018-05-28  Ed Schonberg  <schonberg@adacore.com>

	* einfo.ads, einfo.adb (Needs_Activation_Record): New flag on
	access-to-subprogram types, to indicate that an indirect call through
	such a type requires an activation record when compiling for LLVM.
	* sem_ch3.adb (Access_Subprogram_Declaration): Set new flag as needed.

2018-05-28  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch4.adb (Real_Range_Check): Specialize float-to-fixed conversions
	when bounds of fixed type are static, to remove some spuerfluous
	implicit conversions and provide an accurate result when converting
	back and forth between the fixed point type and a floating point type.

2018-05-28  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Unnest_Subprogram): Prevent creation of empty
	activation records.

2018-05-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* exp_unst.adb (Check_Static_Type): Add argument to indicate node to be
	replaced, if any; all callers changed.
	(Note_Uplevel_Ref): Likewise.  Also replace reference to deferred
	constant with private view so we take the address of that entity.
	(Note_Uplevel_Bound): Add argument to indicate node to be replaced, if
	any; all callers changed.  Handle N_Indexed_Component like
	N_Attribute_Reference.  Add N_Type_Conversion case.
	(Visit_Node): Indexed references can be uplevel if the type isn't
	static.
	(Unnest_Subprograms): Don't rewrite if no reference given.  If call has
	been relocated, set first_named pointer in original node as well.

2018-05-28  Ed Schonberg  <schonberg@adacore.com>

	* exp_aggr.adb (Flatten): Copy tree of expression in a component
	association with a range or a set of discrete choices, rather than
	relocating the node. This avoids inconsistencies in the tree when
	handling nested subprograms with uplevel references for LLVM.

2018-05-28  Arnaud Charlet  <charlet@adacore.com>

	* exp_util.adb (Possible_Bit_Aligned_Component): Always return False in
	codepeer mode.

2018-05-28  Arnaud Charlet  <charlet@adacore.com>

	* exp_unst.adb: Fix typo.

2018-05-28  Bob Duff  <duff@adacore.com>

	* libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an
	unnecessary use of 'Unrestricted_Access.

2018-05-28  Hristian Kirtchev  <kirtchev@adacore.com>

	* repinfo.adb (Expr_Value_S): New routine.
	(List_Linker_Section): Properly extract the value of the section
	argument.

2018-05-28  Patrick Bernardi  <bernardi@adacore.com>

	* doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update the
	description of the -D binder switch to reflect current usage.
	* gnat_ugn.texi: Regenerate.

2018-05-28  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch3.adb: Minor reformatting

2018-05-28  Justin Squirek  <squirek@adacore.com>

	* exp_ch3.adb
	(Build_Initialization_Call): Add logic to pass the appropriate actual to match
	 new formal.
	(Init_Formals): Add new formal *_skip_null_excluding_check
	* exp_util.adb, exp_util.ads
	(Enclosing_Init_Proc): Added to fetch the enclosing Init_Proc from the current
	 scope.
	(Inside_Init_Proc): Refactored to use Enclosing_Init_Proc
	(Needs_Conditional_Null_Excluding_Check): Added to factorize the predicate
	 used to determine how to generate an Init_Proc for a given type.
	(Needs_Constant_Address): Minor reformatting
	* sem_res.adb
	(Resolve_Null): Add logic to generate a conditional check in certain cases

2018-05-28  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_aggr.adb, gnatlink.adb, sem_ch6.adb, sem_res.adb, sem_util.adb:
	Minor reformatting.

2018-05-28  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Include
	the declarations of single concurrent types because they fall in the
	category of full type and object declarations.

2018-05-28  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.adb (Compute_Max_Length): Skip _Parent component.
	(List_Record_Layout): Likewise.

2018-05-28  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Is_Function_Result): Add a warning if a postcondition
	includes a call to function to which it applies. This may mean an
	omission of an attribute reference 'Result, in particular if the
	function is pqrameterless.

2018-05-28  Justin Squirek  <squirek@adacore.com>

	* sem_ch8.adb (Find_Expanded_Name): Add extra guard to make sure the
	misresolved package name is not a case of mistaken identity.

2018-05-28  Yannick Moy  <moy@adacore.com>

	* sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
	GNATprove mode, as the order of resolution (low then high) means that
	all the information is not available when resolving the low bound the
	first time.

2018-05-28  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.adb (List_Array_Info): Start with an explicit blank line and
	end with the linker section, if any.
	(List_Entities): Do not output the linker section for record types,
	array types and variables.
	(Print_Expr): Factor out common processing for unary operators and
	special values.  Adjust and reorder the various cases.
	(List_Object_Info): End with the linker section, if any.
	(List_Record_Info): Likewise.
	(List_Type_Info): Do not start with a blank line.

2018-05-25  Nicolas Roche  <roche@adacore.com>

	* libgnat/s-valrea.adb (Scan_Real): Abort computation once it is sure
	that the result will be either -infinite or +infinite.

2018-05-25  Patrick Bernardi  <bernardi@adacore.com>

	* libgnat/s-parame.ads, libgnat/s-parame__vxworks.ads,
	libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads (Size_Type):
	Expand range of type to match the address space of the target.
	(Task_Storage_Size): Remove unused type.

2018-05-25  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Set_Mixed_Mode_Operand): If the operand is an expression
	of a fixed point type and the parent is a multiplying operation,
	resolve the operand with its own type because the context will impose a
	resulting type on the result of the multiplication by means of
	approriate conversion.

2018-05-25  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch3.adb (Default_Initialize_Object): Ensure that the analysis of
	the in-place initialization aggregate created for pragmas
	Initialize_Scalars or Normalize_Scalars is performed with checks
	suppressed.

2018-05-25  Arnaud Charlet  <charlet@adacore.com>

	* exp_aggr.adb (Convert_To_Positional): Bump default for
	Max_Others_Replicate to 32. Update comments.
	* osint.ads (Unknown_Attributes): No longer pretend this is a constant.
	(No_File_Info_Cache): Initialize separately.
	* osint.adb (No_File_Info_Cache): Update initializer.

2018-05-25  Javier Miranda  <miranda@adacore.com>

	* sem_res.adb (Resolve_Membership_Op): Allow the use of the membership
	test when the left operand is a class-wide interface and the right
	operand is not a class-wide type.
	* exp_ch4.adb (Tagged_Membership): Adding support for interface as the
	left operand.

2018-05-25  Ed Schonberg  <schonberg@adacore.com>

	* exp_aggr.adb (Flatten): A quantified expression cannot be duplicated
	in an others clause to prevent visibility issues with the generated
	loop variable.
	(Component_OK_For_Backend): Return false for a quantified expression.
	(Check_Static_Component): Ditto.

2018-05-25  Hristian Kirtchev  <kirtchev@adacore.com>

	* libgnat/s-secsta.adb (SS_Allocate): Reimplemented.
	(SS_Allocate_Dynamic): New routine. The allocation logic is now split
	into three distring cases rather than in one loop which attempts to
	handle all three cases. This rewrite eliminates an issue where the last
	frame of the stack cannot be freed, thus causing the memory range of a
	new frame to approach the overflow point of the memory index type.
	Since the overflow is logically treated as a
	too-much-memory-on-the-stack scenario, it causes a bogus Storage_Error.
	(SS_Allocate_Static): New routine. The routine factorizes the static
	secondary stack-related code from the former SS_Allocate.

2018-05-25  Sergey Rybin  <rybin@adacore.com>

	* doc/gnat_ugn/gnat_and_program_execution.rst: Add description of '-U'
	option for gnatelim.

2018-05-25  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not create
	Class_Wide_Clone_Body when analyzing a subprogram_body_stub: the clone
	is created when the proper body of the stub is analyzed.
	* sem_util.adb (ZBuild_Class_Wide_Clone_Body): If the subprogram body
	is the proper body of a subunit, the cloned body must be inserted in
	the declarative list that contains the stub.

2018-05-25  Justin Squirek  <squirek@adacore.com>

	* exp_ch6.adb (Expand_Simple_Function_Return): Add guard in check to
	generate code for 6.5(8-10) so that we don't get an assertion error
	when dealing with an incomplete return type.

2018-05-25  Arnaud Charlet  <charlet@adacore.com>

	* pprint.adb (Expression_Name): Strip too long expressions to avoid
	carrying very large strings.

2018-05-25  Patrick Bernardi  <bernardi@adacore.com>

	* switch-b.adb (Scan_Binder_Switches): binder switch -Q accepts Natural
	numbers.

2018-05-25  Doug Rupp  <rupp@adacore.com>

	* tracebak.c (aarch64-linux): Implement.

2018-05-25  Justin Squirek  <squirek@adacore.com>

	* sem_ch8.adb: Minor reformatting.

2018-05-25  Piotr Trojanek  <trojanek@adacore.com>

	* sem_util.adb (Iterate_Call_Parameters): Fix code convention and
	assertions.

2018-05-25  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb, einfo.ads, exp_ch3.adb, exp_ch8.adb, exp_unst.adb,
	pprint.adb, sem_ch12.adb, sem_ch3.adb, sem_prag.adb, sem_util.adb:
	Minor reformatting.

2018-05-25  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Instance_Exists): New function, subsidiary of
	Validate_Derived_Type_Instance, to verify that all interfaces
	implemented by the formal type are also implemented by the actual. The
	verification is complicated when an interface of the formal is declared
	in a generic unit and the actual is declared in an instance of it.
	There is currently no mechanism to relate an interface declared within
	a generic to the corresponding interface in an instance, so we must
	traverse the list of interfaces of the actual, looking for a name
	match, and verifying that that interface is declared in an instance.

2018-05-25  Piotr Trojanek  <trojanek@adacore.com>

	* sem_util.adb (Iterate_Call_Parameters): Rewrite with extra
	assertions; replace function versions of Next_Formal/Next_Actual with
	their procedural versions (which are more concise).

2018-05-25  Doug Rupp  <rupp@adacore.com>

	* libgnarl/s-osinte__aix.ads, libgnarl/s-osinte__android.ads,
	libgnarl/s-osinte__darwin.ads, libgnarl/s-osinte__freebsd.ads,
	libgnarl/s-osinte__hpux.ads, libgnarl/s-osinte__kfreebsd-gnu.ads,
	libgnarl/s-osinte__linux.ads, libgnarl/s-osinte__lynxos178e.ads,
	libgnarl/s-osinte__qnx.ads, libgnarl/s-osinte__rtems.ads
	(Relative_Timed_Wait): Remove.
	* libgnarl/s-tpopmo.adb (Timed_Sleep, Timed_Delay): Rewrite to allow
	for incremental looping. Remove references to Rel_Time and
	Relative_Timed_Wait.
	* libgnat/s-osprim__posix.adb, libgnat/s-osprim__posix2008.adb
	(Timed_Delay): Make separate.
	* libgnat/s-optide.adb: New separate procedure.
	* libgnat/s-osprim.ads (Max_System_Delay): New constant.
	* libgnat/s-osprim__lynxos.ads (Max_Sensible_Delay): Set to 6 months.
	(Max_System_Delay): New constant.

2018-05-25  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Validate_Derived_Type_Instance): Verify that the actual
	for a formal derived type implements all the interfaces declared for
	the formal.

2018-05-25  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb (Check_Applicable_Policy): Deal specially with CodePeer
	and GNATprove modes when applicable policy is Ignore.

2018-05-25  Eric Botcazou  <ebotcazou@adacore.com>

	* freeze.adb (Freeze_Enumeration_Type): Do not give integer size to a
	boolean type with convention C.
	* libgnat/i-cexten.ads (bool): Change to boolean with convention C.
	* gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
	FOREIGN and use it throughout the function.
	<E_Enumeration_Type>: Set precision 1 on boolean types with foreign
	convention.
	<E_Enumeration_Subtype>: Likewise for subtypes.
	<E_Record_Type>: Force the size of a storage unit on empty classes.
	* gcc-interface/utils.c (make_type_from_size) <BOOLEAN_TYPE>: Skip
	boolean types with precision 1 if the size is the expected one.

2018-05-25  Arnaud Charlet  <charlet@adacore.com>

	* pprint.adb (Expression_Name): Do not print non ASCII characters.

2018-05-25  Bob Duff  <duff@adacore.com>

	* libgnat/a-strunb__shared.ads, libgnat/a-stwiun__shared.ads,
	libgnat/a-stzunb__shared.ads: (Initialize, Adjust): Add pragma Inline.

2018-05-25  Bob Duff  <duff@adacore.com>

	* sem_util.ads: Minor comment fix.

2018-05-25  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Visit_Node): Restrict check for uplevel references in
	prefixes of array attributes, to prefixes that are entity names whose
	type is constrained.
	(Note_Uplevel_Bound): Verify that the bound is declared in an enclosing
	subprogram, as itype created for loops in pre/postcondition may appear
	in loops at the library level.

2018-05-25  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Build_Predicate_Functions): The predicate function
	declaration is inserted into the tree and analyzed at that point, so
	should not be reinserted when the body is constructed. Inside a
	generic, ensure that the body is not inserted twice in the tree.

2018-05-25  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb (Check_Grouping): Modify test to ignore statements and
	declarations not coming from source.

2018-05-25  Fedor Rybin  <frybin@adacore.com>

	* doc/gnat_ugn/gnat_utility_programs.rst: Document new switch
	--copy-environment for gnattest.

2018-05-24  Piotr Trojanek  <trojanek@adacore.com>

	* sem_elab.adb (Non_Private_View): Simplify by removing a local Result
	variable.
	* sem_prag.adb (Get_Base_Subprogram): Same as above.

2018-05-24  Eric Botcazou  <ebotcazou@adacore.com>

	* fe.h (Set_Normalized_First_Bit): Declare.
	(Set_Normalized_Position): Likewise.
	* repinfo.adb (List_Record_Layout): Do not use irregular output for a
	variable position.  Fix minor spacing issue.
	* gcc-interface/decl.c (annotate_rep): If a field has a variable
	offset, compute the normalized position and annotate it in addition to
	the bit offset.

2018-05-24  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
	Constify and rename variables.  Fix formatting.
	(gnat_to_gnu) <N_Exception_Handler>: Minor tweak.
	<N_Raise_Statement>: Likewise.

2018-05-24  Javier Miranda  <miranda@adacore.com>

	* exp_ch8.adb (Build_Body_For_Renaming): Adding support to build the
	body of a variant record equality renaming.
	(Expand_N_Subprogram_Renaming_Declaration): Adapt the code to the new
	implementation of Build_Body_For_Renaming.
	* exp_ch3.ads (Build_Variant_Record_Equality): New library level
	function that factorizes the functionality needed by
	Build_Body_For_Renaming and Expand_Freeze_Record_Type to build the body
	of a variant record equality subprogram.
	* exp_ch3.adb (Build_Variant_Record_Equality): New subprogram.
	(Build_Variant_Record_Equality): New local procedure of
	Expand_Freeze_Record_Type containing all the code specific for freezing
	the record type that cannot be place in the new library level function.

2018-05-24  Ed Schonberg  <schonberg@adacore.com>

	* einfo.ads, einfo.adb (Is_Activation_Record): New flag on
	in_parameters, used when unesting subprograms for LLVM, to indicate
	that a generated parameter carries the activation record from the
	enclosing subprogram.
	* exp_unst.adb (Check_Static_Type): Handle array attributes of types
	whose bounds may contain up-level references that need to be added to
	an activation recoord.
	(Add_Extra_Formal): Set Is_Activation_Record on new formal.

2018-05-24  Yannick Moy  <moy@adacore.com>

	* pprint.adb (Expression_Image): Improve the printing of expressions,
	by taking more cases into account, in particular qualified expressions
	and aggregates.  Also count more the number of parentheses to close
	after the expression.

2018-05-24  Javier Miranda  <miranda@adacore.com>

	* sem_ch3.adb (Is_Visible_Component): For untagged types add missing
	check for renamed discriminants.
	* sem_ch4.adb (Analyze_Overloaded_Selected_Component,
	Analyze_Selected_Component, Check_Misspelled_Selector): For calls to
	Is_Visible_Component pass the associated selector node to allow
	checking renamed discriminants on untagged types.

2018-05-24  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb (Analyze_Use_Type): Do not assign the Prev_Use_Clause
	link to a use_type clause if this would cause an infinite loop in the
	machinery that detects redundant use clauses. This may happen when the
	redundant clauses appear in the context of a child unit and the context
	of its parent.

2018-05-24  Piotr Trojanek  <trojanek@adacore.com>

	* sinfo.ads: Fix grammar in comment.

2018-05-24  Justin Squirek  <squirek@adacore.com>

	* einfo.ads, einfo.adb (Append_Entity): Modified to use Link_Entities
	and manage doubly-linked entity chain.
	(Nested_Scenarios): Removed entity field used for optimization during
	 elaboration to make room for the new field Prev_Entity.
	(Link_Entities): Added to replace redundant calls to Set_Next_Entity
	and Set_Prev_Entity as well as centralize changes to the entity chain.
	(Predicated_Parent): Modified to use Node38.
	(Prev_Entity): Added to fetch new node field Prev_Entity in all entity
	types.
	(Remove_Entity): Moved from sem_util.
	(Set_Nested_Scenarios): Deleted.
	(Set_Predicated_Parent): Modified to use Node38.
	(Set_Prev_Entity): Added to set Prev_Entity field.
	(Set_Validated_Object): Modified to use Node38.
	(Unlink_Next_Entity): Added to process Prev_Entity when an unlinking
	action is required.
	(Validated_Object): Modified to use Node38.
	(Write_Field36_Name): Remove Nested_Scenarios, Validated_Object, and
	predicated parent cases.
	(Write_Field38_Name): Add predicated parent and Validated_Object cases.
	* sem_ch3.adb (Process_Subtype): Add guard to protect against
	inappropriate marking of Predicated_Parent to non-itype subtypes.
	(Make_Class_Wide_Type): Preserve Prev_Entity field and set in new type.
	(Copy_And_Swap): Add setting of Prev_Entity.
	(Build_derived_Record_Type): Replace Set_Next_Entity w/ Link_Entities.
	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Replace Set_Next_Entity
	w/ Link_Entities.
	(New_Overloaded_Entity): Remove block created to search for previous
	entities in the entity chain with relevant calls to Prev_Entity as well
	as replace duplicated code from Remove_Entity_And_Homonym with a call
	to that subprogram.
	* sem_ch7.adb (Exchange_Declarations): Replace Set_Next_Entity w/
	Link_Entities.
	* sem_elab.adb (Find_And_Process_Nested_Scenarios): Remove global and
	initial subprogram declarations related to Nested_Scenarios.
	(Process_Nested_Scenarios): Deleted.
	(Save_Scenario): Deleted.
	(Traverse_Body): Remove optimization for Nested_Scenarios so as to free
	node space in the entity tree.
	* sem_util.adb, sem_util.ads (Remove_Entity): Moved to einfo.
	(Remove_Entity_And_Homonym): Added to separate functionality of
	Remove_Entity from the homonym chain directly.
	* exp_attr.adb (Expand_N_Attribute_Reference): Replace Set_Next_Entity
	w/ Link_Entities and Unlink_Next_Entity.
	* exp_ch3.adb (Expand_N_Object_Declaration): Replace Set_Next_Entity w/
	Link_Entities.
	* exp_ch6.adb (Replace_Renaming_Declaration_Id): Replace
	Set_Next_Entity w/ Link_Entities.
	* exp_disp.adb (Expand_Dispatching_Call): Replace Set_Next_Entity w/
	Link_Entities and Unlink_Next_Entity.
	* exp_spark.adb (Expand_SPARK_N_Object_Renaming_Declaration): Replace
	call to Remove_Entity with its new incarnation.
	* exp_util.adb (New_Class_Wide_Subtype): Add setting of Prev_Entity.
	* freeze.adb (Freeze_Record_Type): Replace Set_Next_Entity w/
	Link_Entities.

2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch10.adb (Expand_Limited_With_Clause): Update the call to
	Install_Limited_Withed_Unit.
	(Expand_With_Clause): Update the call to Install_Withed_Unit.
	(Implicit_With_On_Parent): Update the call to Install_Withed_Unit.
	(Install_Context_Clauses): Update the call to Install_Withed_Unit.
	(Install_Limited_Context_Clauses): Update the calls to
	 Install_Limited_Withed_Unit.
	(Install_Limited_Withed_Unit): Renamed to better illustrate its
	purpose.
	(Install_Private_With_Clauses): Update the calls to Install_Withed_Unit
	and Install_Limited_Withed_Unit.
	(Install_With_Clause): Uninstall a limited with clause if a [private]
	with clause is given for the same package.
	(Install_Withed_Unit): Renamed to better illustrate its purpose.
	(Remove_Limited_With_Unit): New routine.

2018-05-24  Eric Botcazou  <ebotcazou@adacore.com>

	* raise-gcc.c (__gnat_SEH_error_handler): Remove prototype.
	(__gnat_personality_seh0): Adjust and beef up comments, and
	fix formatting throughout.
	(__gnat_adjust_context): Deal minimally with version 2.
	* seh_init.c (__gnat_map_SEH): Fix formatting.
	(_gnat_SEH_error_handler): Adjust comments.
	(__gnat_install_SEH_handler): Fix formatting.

2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch7.adb, sem_ch3.adb, sem_res.adb: Minor reformatting.

2018-05-24  Ed Schonberg  <schonberg@adacore.com>

	* exp_aggr.adb (Flatten): Add a warning on an others clause in an array
	aggregate with static bounds when named associations cover all index
	positions and the others clause is redundant.

2018-05-24  Raphael Amiard  <amiard@adacore.com>

	* libgnat/a-cohama.ads: Add documentation.

2018-05-24  Raphael Amiard  <amiard@adacore.com>

	* libgnat/a-convec.ads: Add documentation.

2018-05-24  Justin Squirek  <squirek@adacore.com>

	* exp_ch3.adb (Expand_N_Object_Declaration): Ignore raising an error in
	expansion for limited tagged types when the node to be expanded is a
	raise expression due to it not representing a valid object.
	* exp_ch5.adb (Expand_N_Assignment_Statement): Add exception to error
	message regarding assignments to limited types to ignore genereated
	code.

2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_util.adb (New_Class_Wide_Subtype): Capture and restore relevant
	Ghost-related attributes of the class-wide subtype because the copy
	clobbers them.

2018-05-24  Justin Squirek  <squirek@adacore.com>

	* sem_res.adb (Resolve_Entity_Name): Add guard to protect against
	marking use clauses as effective when the reference appears within
	generated code.

2018-05-24  Cyrille Comar  <comar@adacore.com>

	* doc/gnat_rm/the_gnat_library.rst: Fix typos.
	* gnat_rm.texi: Regenerate.

2018-05-24  Bob Duff  <duff@adacore.com>

	* exp_ch7.adb (Expand_Cleanup_Actions): Create a mark unconditionally
	for build-in-place functions with a caller-unknown-size result.
	(Create_Finalizer): For build-in-place functions with a
	caller-unknown-size result, check at run time whether we need to
	release the secondary stack.

2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Analyze_Pragma): Use the full view of an internally
	generated incomplete type.

2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* expander.adb (Expand): Update the save and restore of the Ghost
	region.
	* exp_ch3.adb (Freeze_Type): Likewise.
	* exp_disp.adb (Make_DT): Likewise.
	* exp_util.adb (Build_DIC_Procedure_Body): Likewise.
	(Build_DIC_Procedure_Declaration): Likewise.
	(Build_Invariant_Procedure_Body): Likewise.
	(Build_Invariant_Procedure_Declaration): Likewise.
	(Make_Predicate_Call): Likewise.
	* freeze.adb (Add_To_Result): Insert the freeze action of a living
	entity prior to the start of the enclosing ignored Ghost region.
	(Freeze_Entity): Update the save and restore of the Ghost region.
	* ghost.adb (Install_Ghost_Mode): Reimplemented.
	(Install_Ghost_Region): New routine.
	(Mark_And_Set_Ghost_Assignment): Install a region rather than a mode.
	(Mark_And_Set_Ghost_Body): Likewise.
	(Mark_And_Set_Ghost_Completion): Likewise.
	(Mark_And_Set_Ghost_Declaration): Likewise.
	(Mark_And_Set_Ghost_Instantiation): Likewise.
	(Mark_And_Set_Ghost_Procedure_Call): Likewise.
	(Name_To_Ghost_Mode): New routine.
	(Restore_Ghost_Region): New routine.
	* ghost.ads (Install_Ghost_Region): New routine.
	(Restore_Ghost_Region): New routine.
	* opt.ads: Add new global variable Ignored_Ghost_Region.
	* rtsfind.adb (Load_RTU): Update the save and restore of the Ghost
	region. Install a clean region.
	* sem.adb (Analyze): Likewise.
	(Do_Analyze): Likewise.
	* sem_ch3.adb (Analyze_Object_Declaration): Likewise
	(Derive_Progenitor_Subprograms): Use local variable Iface_Alias to
	capture the ultimate alias of the current primitive.
	(Process_Full_View): Update the save and restore of the Ghost region.
	Do not inherit DIC and invariant procedures.
	* sem_ch5.adb (Analyze_Assignment): Update the save and restore of the
	Ghost region.
	* sem_ch6.adb (Analyze_Procedure_Call): Likewise.
	(Analyze_Subprogram_Body_Helper): Likewise.
	* sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
	* sem_ch12.adb (Analyze_Package_Instantiation): Likewise.
	(Analyze_Subprogram_Instantiation): Likewise.
	(Instantiate_Package_Body): Likewise.
	(Instantiate_Subprogram_Body): Likewise.
	* sem_ch13.adb (Build_Predicate_Functions): Likewise.
	(Build_Predicate_Function_Declaration): Likewise.
	* sem_disp.adb
	(Add_Dispatching_Operation): Do not consider DIC and invariant
	procedures.
	(Check_Dispatching_Operation): Use Add_Dispatching_Operation to collect
	a dispatching subprogram.
	(Check_Operation_From_Private_View): Likewise.
	(Override_Dispatching_Operation): Likewise.
	* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Update the save
	and restore of the Ghost region.
	(Analyze_Initial_Condition_In_Decl_Part): Likewise.
	(Analyze_Pragma): Update the save and restore of the Ghost region.
	(Analyze_Pre_Post_Condition_In_Decl_Part): Likewise.
	* sem_util.adb (Is_Suitable_Primitive): New routine.
	* sem_util.ads (Is_Suitable_Primitive): New routine.
	* sinfo.ads: Update the section of Ghost regions.

2018-05-24  Piotr Trojanek  <trojanek@adacore.com>

	* doc/gnat_rm/implementation_defined_pragmas.rst (Contract_Cases):
	Change "condition" to "case guard" after renaming in the contract
	grammar.
	* gnat_rm.texi: Regenerate.

2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
	construct with discrete choices no longer contains a subtype with
	predicates since the expansion already handled this case.

2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked
	conversion to the return type to avoid a side effect where an imported
	relocated function generates a new anonymous access type, whose
	accessibility level does not agree with with that of the wrapper.

2018-05-24  Javier Miranda  <miranda@adacore.com>

	* sem_util.adb (Abstract_Interface_List): Add missing support for
	private types whose full view is a synchronized type.
	* sem_ch3.adb (Build_Derived_Private_Type): Skip building the full
	derivation of a private type parent type is a task type with
	discriminants as gigi does not use such type directly.

2018-05-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_elab.adb (Build_Variable_Reference_Marker): Do not create a
	variable marker when the reference appears in the formal part of a
	compilation unit instance because there is no place to insert it.
	(In_Compilation_Instance_Formal_Part): New routine.

2018-05-24  Piotr Trojanek  <trojanek@adacore.com>

	* layout.ads, repinfo.ads: Fix references to renamed Backend_Layout
	configuration parameter.

2018-05-24  Doug Rupp  <rupp@adacore.com>

	* argv-lynxos178-raven-cert.c: New file.
	* libgnat/system-lynxos178-x86.ads: New file.

2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_disp.adb, freeze.adb, gnat1drv.adb, sem_ch5.adb, sem_spark.adb:
	Minor reformattings.

2018-05-23  Pascal Obry  <obry@adacore.com>

	* adaint.c (win32_wait): Properly free the handle/pid lists when
	WaitForMultipleObjects fails (return WAIT_FAILED).

2018-05-23  Pascal Obry  <obry@adacore.com>

	* adaint.c (win32_wait): Add missing parentheses.

2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze.
	(Expand_N_Object_Declaration): Do not check for a large modular array
	here.
	* freeze.adb (Check_Large_Modular_Array): Moved from Exp_Ch3.
	(Freeze_Object_Declaration): Code cleanup. Check for a large modular
	array.
	* sem_ch3.adb: Minor reformatting.

2018-05-23  Ed Schonberg  <schonberg@adacore.com>

	* einfo.ads: New attribute on types: Predicated_Parent, to simplify the
	retrieval of the applicable predicate function to an itype created for
	a constrained array component.
	* einfo.adb: Subprograms for Predicated_Parent.
	(Predicate_Function): Use new attribute.
	* exp_util.adb (Make_Predicate_Call): If the predicate function is not
	available for a subtype, retrieve it from the base type, which may have
	been frozen after the subtype declaration and not captured by the
	subtype declaration.
	* sem_aggr.adb (Resolve_Array_Aggregate): An Others association is
	legal within a generated initiqlization procedure, as may happen with a
	predicate check on a component, when the predicate function applies to
	the base type of the component.
	* sem_ch3.adb (Analyze_Subtype_Declaration): Clean up inheritance of
	predicates for subtype declarations and for subtype indications in
	other contexts.
	(Process_Subtype): Likewise. Handle properly the case of a private type
	with unknown discriminants whose full view is an unconstrained array.
	Use Predicated_Parent to indicate source of predicate function on an
	itype whose parent is itself an itype.
	(Complete_Private_Subtype): If the private view has unknown
	discriminants and the full view is an unconstrained array, set base
	type of completion to the full view of parent.
	(Inherit_Predicate_Flags): Prevent double assignment of predicate
	function and flags.
	(Build_Subtype): For a constrained array component, propagate predicate
	information from original component type declaration.

2018-05-23  Boris Yakobowski  <yakobowski@adacore.com>

	* libgnat/a-ngelfu.ads (Arctanh, Arccoth): Fix faulty preconditions.

2018-05-23  Arnaud Charlet  <charlet@adacore.com>

	* checks.adb (Minimize_Eliminate_Overflows): Default initialize Lo and
	Hi.
	* sem_elab.adb: Make "out" parameters instead of "in out" when
	relevant.

2018-05-23  Bob Duff  <duff@adacore.com>

	* gnatbind.adb (List_Applicable_Restrictions): Add
	No_Implementation_Restrictions to the list of restrictions not to list.
	Remove double negative "not No_Restriction_List".  Comment the
	commentary that is output, so it won't cause errors if used directly in
	a gnat.adc.

2018-05-23  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Inherit_Class_Wide_Pre): Refine legality check on
	class-wide precondition on a type extension when ancestor does not have
	a class-wide precondition.  Previously the compiler accepted such a
	precondition when the ancestor had a class-wide postcondition.

2018-05-23  Javier Miranda  <miranda@adacore.com>

	* sem_attr.adb (Valid_Scalars): Do not invoke Error_Attr_P to report
	the warning on occurrences of this attribute whose evaluation is always
	true (since that subprogram aborts processing the attribute). In
	addition, replace the node by its boolean result 'True' (required
	because the backend has no knowledge of this attribute).

2018-05-23  Bob Duff  <duff@adacore.com>

	* libgnat/a-convec.adb: (Insert, Insert_Space): Suppress warnings. The
	code in question is not reachable in the case where Count_Type'Last is
	out of range.

2018-05-23  Yannick Moy  <moy@adacore.com>

	* doc/gnat_rm/implementation_defined_pragmas.rst: Clarify meaning of
	local pragma Warnings Off without On.
	* gnat_rm.texi: Regenerate.

2018-05-23  Olivier Hainque  <hainque@adacore.com>

	* libgnat/g-excact.ads (Is_Foreign_Exception): New predicate.
	* libgnat/g-excact.adb: Implement.

2018-05-23  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch5.adb (Analyze_Iterator_Specification): If a subtype indication
	is present, verify its legality when the domain of iteration is a
	GNAT-specific formal container, as is already done for arrays and
	predefined containers.

2018-05-23  Yannick Moy  <moy@adacore.com>

	* sem_util.adb (Enclosing_Declaration): Fix the case of a named number
	declaration, which was not taken into account.

2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* debug.adb: Switch -gnatd_s is now used to stop elaboration checks on
	synchronized suspension.
	* rtsfind.ads: Add entries for units Ada.Synchronous_Barriers and
	Ada.Synchronous_Task_Control and routines Suspend_Until_True and
	Wait_For_Release.
	* sem_elab.adb: Document switch -gnatd_s.
	(In_Task_Body): New routine.
	(Is_Potential_Scenario): Code cleanup. Stop the traversal of a task
	body when the current construct denotes a synchronous suspension call,
	and restriction No_Entry_Calls_In_Elaboration_Code or switch -gnatd_s
	is in effect.
	(Is_Synchronous_Suspension_Call): New routine.
	* switch-c.adb (Scan_Front_End_Switches): Switch -gnatJ now sets switch
	-gnatd_s.

2018-05-23  Javier Miranda  <miranda@adacore.com>

	* exp_disp.adb (Make_DT): Restrict the initialization of
	External_Tag and Expanded_Name to an empty string to the case where
	both pragmas apply (i.e. No_Tagged_Streams and Discard_Names), since
	restricted runtimes are compiled with pragma Discard_Names.
	* doc/gnat_rm/implementation_defined_pragmas.rst,
	doc/gnat_rm/implementation_defined_characteristics.rst: Add
	documentation.
	* gnat_rm.texi: Regenerate.

2018-05-23  Maroua Maalej  <maalej@adacore.com>

	* sem_spark.adb: Fix of some permission rules of pointers in SPARK.

2018-05-23  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch5.adb (Preanalyze_Range): The pre-analysis of the domain of
	iteration of an Ada2012 loop is performed to determine the type of the
	domain, but full analysis is performed once the loop is rewritten as a
	while-loop during expansion. The pre-analysis suppresses expansion; it
	must also suppress the generation of freeze nodes, which may otherwise
	appear in the wrong scope before rewritting.

2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_elab.adb: Update the section on suppressing elaboration warnings.

2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb (Is_Elaboration_Checks_OK_Id): Use predicate
	Is_Elaboration_Target.
	(Is_Elaboration_Target): New routine.
	(Is_Elaboration_Warnings_OK_Id): Use predicate Is_Elaboration_Target.
	(Set_Is_Elaboration_Checks_OK_Id): Use predicate Is_Elaboration_Target.
	(Set_Is_Elaboration_Warnings_OK_Id): Use predicate
	Is_Elaboration_Target.
	* einfo.ads: Add new synthesized attribute Is_Elaboration_Target along
	with occurrences in nodes.
	(Is_Elaboration_Target): New routine.
	* sem_prag.adb (Analyze_Pragma): Suppress elaboration warnings when an
	elaboration target is subject to pragma Warnings (Off, ...).

2018-05-23  Eric Botcazou  <ebotcazou@adacore.com>

	* repinfo.adb (List_Type_Info): Remove obsolete stuff.

2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb: Flag304 is now Is_Elaboration_Warnings_OK_Id.
	(Is_Elaboration_Warnings_OK_Id): New routine.
	(Set_Is_Elaboration_Warnings_OK_Id): New routine.
	(Write_Entity_Flags): Output Flag304.
	* einfo.ads: Add new attribute Is_Elaboration_Warnings_OK_Id along with
	occurrences in entities.
	(Is_Elaboration_Warnings_OK_Id): New routine along with pragma Inline.
	(Set_Is_Elaboration_Warnings_OK_Id): New routine along with pragma
	Inline.
	* sem_attr.adb (Analyze_Access_Attribute): Capture the state of
	elaboration warnings.
	* sem_ch3.adb (Analyze_Object_Declaration): Capture the state of
	elaboration warnings.
	* sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Capture the
	state of elaboration warnings.
	(Analyze_Subprogram_Body_Helper): Capture the state of elaboration
	warnings.
	(Analyze_Subprogram_Declaration): Capture the state of elaboration
	warnings.
	* sem_ch9.adb (Analyze_Entry_Declaration): Capture the state of
	elaboration warnings.
	(Analyze_Single_Task_Declaration): Capture the state of elaboration
	warnings.
	(Analyze_Task_Type_Declaration): Capture the state of elaboration
	warnings.
	* sem_ch12.adb (Analyze_Generic_Package_Declaration): Capture the state
	of elaboration warnings.
	(Analyze_Generic_Subprogram_Declaration): Capture the state of
	elaboration warnings.
	* sem_elab.adb: Add a section on suppressing elaboration warnings.
	Type Processing_Attributes includes component Suppress_Warnings
	intended to suppress any elaboration warnings along a path in the
	graph.  Update Initial_State to include a value for this component.
	Types Target_Attributes and Task_Attriutes include component
	Elab_Warnings_OK to indicate whether the target or task has elaboration
	warnings enabled.  component Elab_Warnings_OK.
	(Build_Access_Marker): Propagate attribute
	Is_Elaboration_Warnings_OK_Node from the attribute to the generated
	call marker.
	(Extract_Instantiation_Attributes): Set the value for Elab_Warnings_OK.
	(Extract_Target_Attributes): Set the value for Elab_Warnings_OK.
	(Extract_Task_Attributes): Set the value for Elab_Warnings_OK.
	(Process_Conditional_ABE_Access): Suppress futher elaboration warnings
	when already in this mode or when the attribute or target have warnings
	suppressed.
	(Process_Conditional_ABE_Activation_Impl): Do not emit any diagnostics
	if warnings are suppressed.
	(Process_Conditional_ABE_Call): Suppress further elaboration warnings
	when already in this mode, or the target or call have warnings
	suppressed.
	(Process_Conditional_ABE_Call_Ada): Do not emit any diagnostics if
	warnings are suppressed.
	(Process_Conditional_ABE_Call_SPARK): Do not emit any diagnostics if
	warnings are suppressed.
	(Process_Conditional_ABE_Instantiation): Suppress further elaboration
	warnings when already in this mode or when the instantiation has
	warnings suppressed.
	(Process_Conditional_ABE_Instantiation_Ada): Do not emit any
	diagnostics if warnings are suppressed.
	(Process_Conditional_ABE_Variable_Assignment_Ada): Use the more
	specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
	(Process_Conditional_ABE_Variable_Assignment_SPARK): Use the more
	specific Is_Elaboration_Warnings_OK_Id rather than Warnings_Off.
	(Process_Task_Object): Suppress further elaboration warnings when
	already in this mode, or when the object, activation call, or task type
	have warnings suppressed. Update the processing state to indicate that
	the path goes through a task body.
	* sinfo.adb (Is_Elaboration_Warnings_OK_Node): Accept attribute
	references.
	(Set_Is_Elaboration_Warnings_OK_Node): Accept attribute references.
	* sinfo.ads: Attribute Is_Elaboration_Warnings_OK_Node now applies to
	attribute references.

2018-05-23  Piotr Trojanek  <trojanek@adacore.com>

	* einfo.ads: Minor reformatting.

2018-05-23  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Analyze_Object_Declaration): If expression is an
	anonymous_access_to_ subprogram formal, apply a conversion to force an
	accsssibility check that will fail statically, enforcing 3.10.2 (13).

2018-05-23  Daniel Mercier  <mercier@adacore.com>

	* gnat1drv.adb: Turn off length expansion in CodePeer mode.

2018-05-23  Bob Duff  <duff@adacore.com>

	* freeze.adb: (Check_Address_Clause): Deal with build-in-place
	aggregates in addition to build-in-place calls.

2018-05-23  Bob Duff  <duff@adacore.com>

	* einfo.ads: Minor reformatting.
	* sem_ch3.adb: Likewise.
	* sinfo.ads: Likewise.

2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch3.adb (Default_Initialize_Object): Do not optimize scalar array
	initialization when the component type has predicates.
	* exp_ch4.adb (Expand_N_Allocator): Do not optimize scalar array
	allocation when the component type has predicates.

2018-05-23  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb, exp_disp.adb, sem_ch3.adb, sem_ch6.adb, sem_prag.adb:
	Minor reformatting.

2018-05-22  Justin Squirek  <squirek@adacore.com>

	* sem_ch6.adb (Analyze_Expression_Function): Propagate flags from the
	original function spec into the generated function spec due to
	expansion of expression functions during analysis.
	(Analyze_Subprogram_Body_Helper): Modify check on formal parameter
	references from the body to the subprogram spec in the case of
	expression functions because of inconsistances related to having a
	generated body.
	* libgnarl/s-osinte__android.ads: Flag parameters as unused.
	* libgnarl/s-osinte__lynxos178e.ads: Likewise.
	* libgnarl/s-osinte__qnx.adb: Likewise.
	* libgnarl/s-osinte__qnx.ads: Likewise.

2018-05-22  Doug Rupp  <rupp@adacore.com>

	* init.c (HAVE_ADJUST_CONTEXT_FOR_RAISE): Don't define on VxWorks7 for
	AArch64.

2018-05-22  Olivier Hainque  <hainque@adacore.com>

	* libgnat/a-except.adb (Exception_Propagation.Propagate_Exception):
	Expect an Exception_Occurence object, not an Access.
	(Complete_And_Propagate_Occurrence): Adjust accordingly.
	(Raise_From_Signal_Handler): Likewise.
	(Reraise_Occurrence_No_Defer): If we have a Machine_Occurrence
	available in the provided occurrence object, just re-propagate the
	latter as a bare "raise;" would do.
	* libgnat/a-exexpr.adb (Propagate_Exception): Adjust to spec change.
	* libgnat/a-exstat.adb (String_To_EO): Initialize X.Machine_Occurrence
	to null, to mark that the occurrence we're crafting from the stream
	contents is not being propagated (yet).

2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_aggr.adb (Initialize_Ctrl_Record_Component): Insert the generated
	code for a transient component in line with the rest of the
	initialization code, rather than before the aggregate. This ensures
	that the component has proper visibility of the discriminants.

2018-05-22  Jerome Lambourg  <lambourg@adacore.com>

	* adaint.c: Reorganize QNX-specific macros, use syspage to retreive the
	number of CPUs.

2018-05-22  Jerome Lambourg  <lambourg@adacore.com>

	* sigtramp-qnx.c: Properly restore link register in signal trampoline.

2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Strip away any
	conversions before extracting the value of the expression.
	* exp_ch3.adb (Default_Initialize_Object): Optimize the default
	initialization of an array of scalars.
	(Get_Simple_Init_Val): Add processing for array types. Remove the
	processing of strings because this case is already handled by the array
	case.
	(Needs_Simple_Initialization): Moved to Sem_Util.
	(Simple_Init_Array_Type): New routine.
	(Simple_Init_Initialize_Scalars_Type): Reimplemented to use the new
	facilities from Sem_Util.
	(Simple_Initialization_OK): New routine.
	* exp_ch3.ads (Needs_Simple_Initialization): Moved to Sem_Util.
	* exp_ch4.adb (Expand_N_Allocator): Optimize the default allocation of
	an array of scalars.
	* sem_prag.adb (Analyze_Float_Value): New routine.
	(Analyze_Integer_Value): New routine.
	(Analyze_Pragma): Reimplement the analysis of pragma Initialize_Scalars
	to handled the extended form of the pragma.
	(Analyze_Type_Value_Pair): New routine.
	* sem_util.adb: Add invalid value-related data structures.
	(Examine_Array_Bounds): New routine.
	(Has_Static_Array_Bounds): Reimplemented.
	(Has_Static_Non_Empty_Array_Bounds): New routine.
	(Invalid_Scalar_Value): New routine.
	(Needs_Simple_Initialization): Moved from Exp_Ch3.
	(Set_Invalid_Scalar_Value): New routines.
	* sem_util.ads (Has_Static_Non_Empty_Array_Bounds): New routine.
	(Invalid_Scalar_Value): New routine.
	(Needs_Simple_Initialization): Moved from Exp_Ch3.
	(Set_Invalid_Scalar_Value): New routines.
	* snames.ads-tmpl: Add names for the salar type families used by pragma
	Initialize_Scalars.

2018-05-22  Javier Miranda  <miranda@adacore.com>

	* exp_disp.adb (Make_DT): Initialize the External_Tag with an empty
	string when pragma No_Tagged_Streams is applicable to the tagged type,
	and initialize the Expanded_Name with an empty string when pragma
	Discard_Names is applicable to the tagged type.

2018-05-22  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Check_Conformance): Add RM reference for rule that a
	formal subprogram is never subtype conformqnt, and thus cannot be the
	prefix of 'Access.  Reject as well the attribute when applied to a
	renaming of a formal subprogram.

2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch3.adb (Build_Array_Init_Proc): Update the call to
	Needs_Simple_Initialization.
	(Build_Init_Statements): Update the call to Get_Simple_Init_Val.
	(Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
	profile and comment on usage.
	(Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
	Sloc of a value obtained from aspect Default_Value because this could
	potentially replicate large trees. The proper Sloc is now set in
	Get_Simple_Init_Val.
	(Get_Simple_Init_Val): Reorganized by breaking the various cases into
	separate routines. Eliminate the use of global variables.
	(Init_Component): Update the call to Get_Simple_Init_Val.
	(Needs_Simple_Initialization): Update the parameter profile and all
	uses of T.
	(Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
	and set the proper Sloc.
	* exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
	comment on usage.
	(Needs_Simple_Initialization): Update the parameter profile.

2018-05-22  Patrick Bernardi  <bernardi@adacore.com>

	* sem_ch3.adb (Build_Discriminant_Constraints): Raise an error if the
	user tries to use a subtype indication as a discriminant constraint.

2018-05-22  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch4.ads, exp_ch4.adb, exp_util.adb, expander.adb: Remove mention
	of N_Reduction_Expression and N_Reduction_Expression_Parameter.
	* par-ch4.adb: Remove parsing routines for reduction expressions.
	* sem.adb, sinfo.ads, sinfo.adb, sem_ch4.ads, sem_ch4.adb, sem_res.adb,
	sem_spark.adb, sprint.adb: Remove analysis routines for reduction
	expressions.

2018-05-22  Arnaud Charlet  <charlet@adacore.com>

	* sem_ch8.adb (Check_Frozen_Renaming): Do not emit error in
	Relaxed_RM_Semantics mode.

2018-05-22  Arnaud Charlet  <charlet@adacore.com>

	* comperr.adb (Delete_SCIL_Files): Take into account
	N_Generic_Package_Renaming_Declaration.

2018-05-22  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is
	private, use the full view if available, because it may include renamed
	discriminants whose values are stored in the corresponding
	Stored_Constraint.

2018-05-22  Ed Schonberg  <schonberg@adacore.com>

	* einfo.ads, einfo.adb: New attribute Hidden_In_Formal_Instance,
	defined on packages that are actuals for formal packages, in order to
	set/reset the visibility of the formals of a formal package with given
	actuals, when there are subsequent uses of those formals in the
	enclosing generic, as required by RN 12.7 (10).
	* atree.ads, atree.adb: Add operations for Elist30.
	* atree.h: Add Elist30.
	* sem_ch12.adb (Analyze_Formal_Package_Instantiation): Collect formals
	that are not defaulted and are thus not visible within the current
	instance.
	(Check_Formal_Packages): Reset visibility of formals of a formal
	package that are not defaulted, on exit from current instance.

2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_prag.adb (Analyze_Input_Output): Emit an error when a non-null,
	non-'Result output appears in the output list of a function.

2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_attr.adb (Build_Array_VS_Func): Reimplemented.
	(Build_Record_VS_Func): Reimplemented.
	(Expand_N_Attribute): Reimplement the handling of attribute
	'Valid_Scalars.
	* sem_attr.adb (Analyze_Attribute): Reimplement the handling of
	attribute 'Valid_Scalars.
	* sem_util.adb (Scalar_Part_Present): Reimplemented.
	(Validated_View): New routine.
	* sem_util.ads (Scalar_Part_Present): Update the parameter profile and
	comment on usage.
	(Validated_View): New routine.
	* doc/gnat_rm/implementation_defined_attributes.rst: Update the
	documentation of attribute 'Valid_Scalars.
	* gnat_rm.texi: Regenerate.

2018-05-22  Bob Duff  <duff@adacore.com>

	* binde.adb: (Choose): Ignore a pragma Elaborate_Body that appears in
	the spec of a SAL_Interface package.

2018-05-22  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb (Freeze_Entity): When analyzing delayed aspects of an
	entity E within a generic unit, indicate that there are no remaining
	delayed aspects after invoking Analyze_Aspects_At_Freeze_Point. The
	entity E is not frozen yet but the aspects should not be reanalyzed at
	the freeze point, which may be outside of the generic and may not have
	the proper visibility.

2018-05-22  Bob Duff  <duff@adacore.com>

	* doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for
	the new --split-line-before-record, --indent-named-statements and
	--no-align-modes gnatpp switches.

2018-05-22  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
	a second argument that is a constant of a given string value.

2018-05-22  Doug Rupp  <rupp@adacore.com>

	* sigtramp-vxworks-target.inc: Align stack to 128bits on AArch64.

2018-05-22  Jerome Lambourg  <lambourg@adacore.com>

	* sigtramp-qnx.c: Fix stack alignment issue in the signal trampoline.

2018-05-22  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb (Freeze_Fixed_Point_Type): If the first subtype has
	delayed aspects, analyze them now, os that the representation of the
	type (size, bounds) can be computed and validated.

2018-05-22  Olivier Hainque  <hainque@adacore.com>

	* libgnat/s-dwalin.adb (Enable_Cache): Skip symbols outside of the
	executable code section boundaries.

2018-05-22  Javier Miranda  <miranda@adacore.com>

	* locales.c: New implementation for the Ada.Locales package.
	* libgnat/a-locale.ads: Remove comment indicating that this is not
	implemented.
	* doc/gnat_rm/standard_library_routines.rst: Remove comment indicating
	that this is not implemented.
	* gnat_rm.texi: Regenerate.

2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch5.adb, freeze.adb, pprint.adb, sem_ch4.adb, sem_res.adb: Minor
	reformattings.

2018-05-22  Justin Squirek  <squirek@adacore.com>

	* sem_ch12.adb (In_Same_Declarative_Part): Moved to sem_util.
	(Freeze_Subprogram_Body, Install_Body): Modify calls to
	In_Same_Declarative_Part.
	* sem_prag.adb (Analyze_Pragma-Pragma_Pure_Function): Add check to
	verify pragma declaration is within the same declarative list with
	corresponding error message.
	* sem_util.adb, sem_util.ads (In_Same_Declarative_Part): Moved from
	sem_ch12.adb and generalized to be useful outside the scope of
	freezing.

2018-05-22  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch6.adb (Analyze_Subprogram_Declaration): Set the proper
	categorization of the unit after processing the aspects in case one of
	its aspects is converted into a categorization pragma.

2018-05-21  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb (Warn_Overlay): Do not emit a wawrning on an object
	declaration with an explicit address clause and a type with default
	initialization, if the declaration carries an aspect
	Suppress_Initialization.

2018-05-21  Daniel Mercier  <mercier@adacore.com>

	* pprint.adb: Use mixed case for attribute names.

2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch6.adb (Analyze_Generic_Subprogram_Body): Rename the call to
	Analyze_Aspect_Specifications_On_Body_Or_Stub.
	(Analyze_Subprogram_Body_Helper): Rename the calls to
	Analyze_Aspect_Specifications_On_Body_Or_Stub.
	* sem_ch9.adb (Analyze_Entry_Body): Rename the call to
	Analyze_Aspect_Specifications_On_Body_Or_Stub.
	* sem_ch10.adb: Add with and use clause for Sem_Ch13.
	(Analyze_Package_Body_Stub): Add constant Id. Decorate the package stub
	prior to analyzing its aspects.
	(Analyze_Protected_Body_Stub): Add constant Id. Decorate the package
	stub prior to analyzing its aspects. Save and restore the configuration
	switches.
	(Analyze_Task_Body_Stub): Add constant Id. Decorate the package stub
	prior to analyzing its aspects.
	* sem_ch13.adb (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
	to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
	* sem_ch13.ads (Analyze_Aspect_Specifications_On_Body_Or_Stub): Renamed
	to Analyze_Aspects_On_Subprogram_Body_Or_Stub.
	* sem_prag.adb: Code reformatting.
	(Analyze_Refined_Depends_Global_Post): Consider task body stubs.

2018-05-21  Jerome Lambourg  <lambourg@adacore.com>

	* gcc-interface/Makefile.in: Add g-soliop__qnx.ads to the runtime build
	for QNX.

2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_cg.adb: Remove with and use clause for Exp_Disp.
	* exp_ch9.adb: Remove with and use clause for Exp_Disp.
	* exp_disp.adb (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
	(Is_Predefined_Interface_Primitive): Moved to Sem_Util.
	(Is_Predefined_Internal_Operation): Moved to Sem_Util.
	* exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved to Sem_Util.
	(Is_Predefined_Interface_Primitive): Moved to Sem_Util.
	(Is_Predefined_Internal_Operation): Moved to Sem_Util.
	* exp_dist.adb: Remove with and use clause for Exp_Disp.
	* freeze.adb: Remove with and use clause for Exp_Disp.
	* sem_cat.adb: Remove with and use clause for Exp_Disp.
	* sem_ch6.adb: Remove with and use clause for Exp_Disp.
	* sem_ch12.adb: Remove with and use clause for Exp_Disp.
	* sem_elab.adb (Check_Overriding_Primitive): Do not process predefined
	primitives.
	* sem_util.adb: Remove with and use clause for Exp_Disp.
	(Is_Predefined_Dispatching_Operation): Moved from Exp_Disp.
	(Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
	(Is_Predefined_Internal_Operation): Moved from Exp_Disp.
	* sem_util.ads (Is_Predefined_Dispatching_Operation): Moved from
	Exp_Disp.
	(Is_Predefined_Interface_Primitive): Moved from Exp_Disp.
	(Is_Predefined_Internal_Operation): Moved from Exp_Disp.

2018-05-21  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Valid_Conversion): Improve error message on an illegal
	type conversion whose expression has a limited view of a type.

2018-05-21  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch5.adb (Build_Formal_Container_Iteration): If source has
	explicit name for iterator loop, preserve that name in expanded
	construct, for possible use in exit statements.

2018-05-21  Javier Miranda  <miranda@adacore.com>

	* sem_ch4.adb (Analyze_Membership_Op): Avoid compiler crash when the
	spec of a unit has Ada 2012 membership tests with multiple choices and
	the unit body is not compiled under Ada 2012 mode.

2018-05-21  Doug Rupp  <rupp@adacore.com>

	* sigtramp-vxworks-target.inc: Set cfa_reg properly from sigcontext
	pregs.
	(CFI_COMMON_REGS): Restore LR jic probed from prologue.
	(REGNO_PC_OFFSET): Change to correct value for Aarch64.

2018-05-21  Jose Ruiz  <ruiz@adacore.com>

	* doc/gnat_ugn/gnat_utility_programs.rst, exp_attr.adb,
	libgnarl/s-tassta.adb: Minor typo fixes

2018-05-21  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Analyze_One_Call): Recognize complex cases where an
	indexed call originally in prefix forn is itself the prefix of a
	further call.

2018-05-21  Piotr Trojanek  <trojanek@adacore.com>

	* sem_eval.adb (Is_Null_Range): Clarify access to the full view of a
	type.
	(Not_Null_Range): Same as above.

2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch3.adb: Minor reformatting.
	* exp_ch6.adb: Likewise.
	* freeze.adb: Likewise.
	* inline.adb: Likewise.
	* sem_util.adb: Likewise.

2018-05-21  Yannick Moy  <moy@adacore.com>

	* inline.adb (Expand_Inlined_Call.Process_Formals): Use a type
	conversion instead of an unchecked type conversion when inlining a
	return statement, unless type qualification is required (for character
	and string literal) or no check can result from the conversion (for
	access types).
	* opt.ads: Update comment.

2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Install the elaboration
	model of the compilation unit spec, if any.
	* sem_ch7.adb (Analyze_Package_Body_Helper): Install the elaboration
	model of the compilation unit spec, if any.
	* sem_ch10.adb (Analyze_Subunit): Install the elaboration model of the
	parent compilation unit spec, if any.
	* sem_elab.adb (Check_Elaboration_Scenarios): Restore the elaboration
	model of the main unit.
	(Is_Same_Unit): The routine now uses Unit_Entity.
	(Is_Subunit): Removed.
	(Normalize_Unit): Removed.
	(Unit_Entity): New routine.
	* sem_prag.adb (Analyze_Pragma): Reimplement the handling of pragma
	Elaboration_Checks. The analysis now ensures that the pragma appears at
	the configuration level, and on the initial declaration of a unit.
	Other placements are either flagged as illegal, or ignored.
	(Check_Duplicate_Elaboration_Checks_Pragma): New routine.
	(Ignore_Elaboration_Checks_Pragma): New routine.
	* sem_util.adb (Install_Elaboration_Model): New routine.
	* sem_util.ads (Install_Elaboration_Model): New routine.
	* doc/gnat_rm/implementation_defined_pragmas.rst: Update the
	documentation of pragma Elaboration_Checks.
	* gnat_rm.texi: Regenerate.

2018-05-21  Olivier Hainque  <hainque@adacore.com>

	* libgnat/s-trasym__dwarf.adb (Executable_Name): Return argv[0] instead
	of empty string when argv[0] couldn't be found on PATH.
	(Enable_Cache): Raise Program_Error instead of attempting a null
	pointer dereference when the Exec_Module initialization failed.

2018-05-21  Piotr Trojanek  <trojanek@adacore.com>

	* libgnarl/a-reatim.ads (Clock_Time): Remove External aspect.
	* libgnarl/a-taside.ads (Tasking_State): Likewise.
	* libgnat/a-calend.ads (Clock_Time): Likewise.

2018-05-21  Yannick Moy  <moy@adacore.com>

	* sem_ch6.adb (Analyze_Procedure_Call): Refine test to recognize prefix
	call notation in inlined call in GNATprove mode.

2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb (Is_External_State): An abstract state is also external
	when it is declared with option "synchronous".
	* einfo.ads: Update the documentation of synthesized attribute
	Is_External_State.
	* sem_util.adb (Find_Simple_Properties): New routine.
	(Is_Enabled_External_Property): New routine.
	(State_Has_Enabled_Property): Reimplemented. The two flavors of option
	External have precedence over option Synchronous when determining
	whether a property is in effect.

2018-05-21  Yannick Moy  <moy@adacore.com>

	* sem_eval.adb (Static_Length): Take into account case of variable of
	subtype string literal.

2018-05-21  Olivier Hainque  <hainque@adacore.com>

	* libgnat/s-objrea.ads (Get_Memory_Bounds): Rename as Get_Xcode_Bounds.
	(Object_Section): Rename Flag_Alloc component as Flag_Xcode.
	* libgnat/s-objrea.adb (Get_Xcode_Bounds): Adjust to new subprogram and
	component name.
	(Get_Section, ELF case): Set Flag_Xcode from SHF_EXECINSTR.
	* libgnat/s-dwalin.adb (Open): Adjust to the Get_Memory_Bounds name
	change.

2018-05-21  Olivier Hainque  <hainque@adacore.com>

	* libgnat/s-dwalin.ads (Dwarf_Context): Change type of Load_Address to
	Address, and type of Low, High to Storage_Offset.
	(Low): Rename as Low_Address and convey that the return value is a
	runtime reference accounting for a load address.
	* libgnat/s-dwalin.adb (Read_Aranges_Entry): Adjust to the
	address/offset type changes.
	(Aranges_Lookup): Likewise.
	(Symbolic_Address): Likewise.
	(Symbolic_Traceback): Likewise.
	(Dump_Cache): Likewise.
	(Is_Inside): Likewise.
	(Open): Likewise.
	(Set_Load_Address): Likewise.
	(Low_Address): Likewise, and account for C.Load_Address.
	* libgnat/s-trasym__dwarf.adb (Lt): Use Low_Address instead of Low.
	(Multi_Module_Symbolic_Traceback): Compare address in traceback
	with module Low_Address instead of Low.

2018-05-21  Olivier Hainque  <hainque@adacore.com>

	* libgnat/s-dwalin.ads (Dwarf_Context): Rename Load_Slide as
	Load_Address.
	* libgnat/s-dwalin.adb (Is_Inside): Adjust accordingly.
	(Set_Load_Address): Likewise.
	(Symbolic_Traceback): Likewise.

2018-05-21  Olivier Hainque  <hainque@adacore.com>

	* libgnat/s-trasym__dwarf.adb (Add_Module_To_Cache): Expect a
	Load_Address argument and pass it down to Init_Module.
	* libgnat/s-tsmona__linux.adb (Build_Cache_For_All_Modules): Pass
	lm.l_addr as the Load_Address to Add_Module_To_Cache.

2018-05-21  Piotr Trojanek  <trojanek@adacore.com>

	* einfo.adb (Has_Discriminants): Stronger assertion.
	(Set_Has_Discriminants): Stronger assertion.
	* sem_ch13.adb (Push_Scope_And_Install_Discriminants): Adapt to respect
	the stronger assertion on Has_Discriminant.
	(Uninstall_Discriminants_And_Pop_Scope): Same as above.
	* sem_util.adb (New_Copy_Tree): Same as above.
	* sem_ch7.adb (Generate_Parent_References): Prevent calls to
	Has_Discriminant on non-type entities that might happen when the
	compiled code has errors.
	* sem_ch3.adb (Derived_Type_Declaration): Only call
	Set_Has_Discriminant on type entities.

2018-05-21  Arnaud Charlet  <charlet@adacore.com>

	* exp_unst.adb (Unnest_Subprogram): Unnest all subprograms relevant for
	code generation.

2018-05-21  Piotr Trojanek  <trojanek@adacore.com>

	* lib.ads: Fix typo in enumeration in comment.

2018-05-21  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Analyze_Attribute, case Scalar_Storage_Order): The
	attribute reference is legal within a generic unit when the prefix is a
	formal private type.

2018-05-21  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch7.adb (Establish_Transient_Scope): Code cleanup. Do not
	delegate the secondary stack management when there is no suitable
	transient context, and the transient scope was intended to manage the
	secondary stack because this causes premature reclamation. Change the
	transient scope creation logic by special casing assignment statements
	of controlled components for type initialization procedures.
	(Find_Node_To_Be_Wrapped): Renamed to Find_Transient_Context. Update
	the comment on usage.
	(Find_Transient_Context): Change the initinte loop into a while loop.
	Iterations schemes and iterator specifications are not valid transient
	contexts because they rely on special processing. Assignment statements
	are now treated as a normal transient context, special cases are
	handled by the caller. Add special processing for pragma Check.
	(Is_OK_Construct): Removed. Its functionality has been merged in
	routine Find_Transient_Context.
	* sem_ch5.adb (Check_Call): Reimplemented. Add code to properly
	retrieve the subprogram being invoked. Use a more accurate predicate
	(Requires_Transient_Scope) to determine that the function will emply
	the secondary stack.

2018-05-21  Piotr Trojanek  <trojanek@adacore.com>

	* ada_get_targ.adb: Fix subprogram body headers.
	* adabkend.adb: Likewise.
	* checks.adb: Likewise.
	* exp_ch3.adb: Likewise.
	* exp_ch5.adb: Likewise.
	* exp_ch9.adb: Likewise.
	* exp_dist.adb: Likewise.
	* exp_tss.adb: Likewise.
	* inline.adb: Likewise.
	* lib-writ.adb: Likewise.
	* lib-xref-spark_specific.adb: Likewise.
	* libgnarl/s-osinte__darwin.adb: Likewise.
	* libgnarl/s-stusta.adb: Likewise.
	* libgnarl/s-taprop__solaris.adb: Likewise.
	* libgnarl/s-tposen.adb: Likewise.
	* libgnarl/s-vxwext__kernel-smp.adb: Likewise.
	* libgnarl/s-vxwext__kernel.adb: Likewise.
	* libgnat/a-btgbso.adb: Likewise.
	* libgnat/a-cfdlli.adb: Likewise.
	* libgnat/a-cfhama.adb: Likewise.
	* libgnat/a-cfinve.adb: Likewise.
	* libgnat/a-cimutr.adb: Likewise.
	* libgnat/a-coboho.adb: Likewise.
	* libgnat/a-cofove.adb: Likewise.
	* libgnat/a-cofuve.adb: Likewise.
	* libgnat/a-comutr.adb: Likewise.
	* libgnat/a-exexda.adb: Likewise.
	* libgnat/a-tags.adb: Likewise.
	* libgnat/a-tideau.adb: Likewise.
	* libgnat/a-wtdeau.adb: Likewise.
	* libgnat/a-ztdeau.adb: Likewise.
	* libgnat/g-alleve.adb: Likewise.
	* libgnat/s-excdeb.adb: Likewise.
	* libgnat/s-parint.adb: Likewise.
	* libgnat/s-shasto.adb: Likewise.
	* libgnat/s-traceb__hpux.adb: Likewise.
	* prepcomp.adb: Likewise.
	* sem_ch4.adb: Likewise.
	* sem_ch6.adb: Likewise.
	* sem_dist.adb: Likewise.
	* sem_prag.adb: Likewise.
	* sem_util.adb: Likewise.
	* sinfo.adb: Likewise.
	* switch.adb: Likewise.

2018-05-04  John Marino  <gnugcc@marino.st>

	PR ada/85635
	* link.c (BSD platforms): Add missing backslash.

2018-04-27  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/85540
	* init.c (__gnat_handle_vms_condition): Add missing parentheses.

2018-04-25  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/85007
	* gnat_ugn.texi: Regenerate.

2018-03-23  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/85007
	* gnatlink.adb (Gnatlink): Remove handling of -b switch.
	* doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
	Remove documentation of -b switch.

2018-03-23  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/85036
	* gnatlink.adb (Process_Args): Drop existing link switches if multiple
	switches are passed for --LINK.

2018-03-12  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/82813
	* gcc-interface/misc.c (gnat_post_options): Disable string overflow
	warnings.

2018-03-10  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
	Consider only entities for objects.

2018-03-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* gcc-interface/Makefile.in (OSCONS_CPP): Remove redundant
	$(GNATLIBCFLAGS).
	(OSCONS_EXTRACT): Add $(GNATLIBCFLAGS_FOR_C).

2018-03-06  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (convert_with_check): Fix typo in the condition
	guarding the overflow check emitted for the upper bound of a floating-
	point conversion.

2018-03-06  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/utils.c (def_builtin_1): Bail out on error_mark_node.

2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>

	* libgnat/i-cexten.ads (Float_128): New type.

2018-02-02  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (array_type_has_nonaliased_component): Return
	false if the component type is a pointer.

2018-01-11  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch3.adb (Default_Initialize_Object): Call New_Copy_Tree on the
	result of Get_Simple_Init_Value and pass the source location of the
	object declaration's object_definition.

2018-01-11  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Handle
	properly object declarations with initializations that are
	build-in-place function calls, when there is an address specification,
	either as an aspect specification or an explicit attribute
	specification clause, for the initialized object.
	* freeze.adb (Check_Address_Clause): Do not remove side-effects from
	initial expressions in the case of a build-in-place call.

2018-01-11  Piotr Trojanek  <trojanek@adacore.com>

	* sem_eval.adb (Is_Null_Range): Retrieve the full view when called on a
	private (sub)type; refactor to avoid early return statement.
	(Not_Null_Range): Same as above.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* freeze.adb (Freeze_Entity): Ensure that a Ghost type is not
	concurrent, nor effectively volatile.
	* ghost.adb (Check_Ghost_Type): New routine.
	* ghost.ads (Check_Ghost_Type): New routine.
	* sem_util.adb (Is_Declaration): Reimplemented. The routine can now
	consider specific subsets of declarations.
	(Is_Declaration_Other_Than_Renaming): Removed. Its functionality is
	replicated by Is_Declaration.
	* sem_util.ads (Is_Declaration): New parameter profile. Update the
	comment on usage.
	(Is_Declaration_Other_Than_Renaming): Removed.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch5.adb (Analyze_Assignment): Assignments to variables that act
	as Part_Of consituents of single protected types are illegal when they
	take place inside a protected function.
	(Diagnose_Non_Variable_Lhs): Use Within_Function to check for an
	enclosing function.
	(Is_Protected_Part_Of_Constituent): New routine.
	(Within_Function): New routine.

2018-01-11  Arnaud Charlet  <charlet@adacore.com>

	Bump copyright notices to 2018.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
	Minor reformatting.

2018-01-11  Justin Squirek  <squirek@adacore.com>

	* par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
	to make sure a given expression function is properly parenthesized.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
	categorization of a subprogram body which does not complete a previous
	declaration.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
	scope of package Ada is Standard.

2018-01-11  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
	subcomponent of the current entity when building the body for a dynamic
	predicate function for a record with composite subcomponents.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
	Establish_Transient_Scope.
	(Convert_To_Assignments): Update the call to Establish_Transient_Scope.
	(Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
	* exp_ch6.adb (Expand_Call_Helper): Update the call to
	Establish_Transient_Scope.
	(Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
	Establish_Transient_Scope.
	* exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
	management of the secondary stack to an enclosing scope if there is no
	suitable construct to wrap, and the transient scope was intended to
	manage the secondary stack.
	(Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
	is a valid boundary for a transient expression which comes from the
	statements of the alternative, otherwise alternatives cannot be
	wrapped. Assignments of controlled objects which have controlled
	actions suppressed now stop the traversal as there is no point in
	looking for an enclosing construct. Add several N_xxx_Body choices to
	the termination conditions for completeness.
	* exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
	and the associated comment on usage.
	* exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
	Establish_Transient_Scope.
	(Add_Write_After): Update the call to Establish_Transient_Scope.
	* sem_res.adb (Check_Initialization_Call): Removed.
	(Resolve_Actuals): Account for additional cases where finalization
	actions are required by utilizing predicate Needs_Finalization rather
	than Is_Controlled.
	(Resolve_Call): Type initialization procedures can now utilize
	transient scopes to manage the secondary stack, thus preventing leaks
	during initialization.  Remove the previous kludgy algorithm which
	attempts to manage the secondary stack at the object creation site.

2018-01-11  Jerome Lambourg  <lambourg@adacore.com>

	* libgnat/g-soliop__qnx.ads: New.
	* adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
	for QNX.

2018-01-11  Bob Duff  <duff@adacore.com>

	* par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
	a null procedure occurs in a protected definition.

2018-01-11  Bob Duff  <duff@adacore.com>

	* binderr.ads, namet.ads: Minor reformatting.

2018-01-11  Bob Duff  <duff@adacore.com>

	* doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
	xml2gnat.

2018-01-11  Bob Duff  <duff@adacore.com>

	* binde.adb (Force_Elab_Order): Give an error if there are duplicate
	unit names.

2018-01-11  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb (Freeze_Expr_Types): If an access value is the
	controlling argument of a dispatching call. freeze the corresponding
	designated type.

2018-01-11  Ben Brosgol  <brosgol@adacore.com>

	* doc/Makefile: Add Sphinx option -W to treat warnings as errors.

2018-01-11  Ben Brosgol  <brosgol@adacore.com>

	* doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
	corrections.
	* gnat_rm.texi: Regenerate.

2018-01-11  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
	formsl type corresponding to the actual fixed point type is private,
	because in this case there can be no suspicious arithmetic operations
	in the generic unless they reference a formal subprogram.  Clarify
	warning.

2018-01-11  Javier Miranda  <miranda@adacore.com>

	* exp_util.adb (Remove_Side_Effects): No action done for functions
	returning class-wide types since it requires generating code using
	'reference and the CCG target has no secondary stack.
	* gnat1drv.adb: Disable building static dispatch tables when generating
	C code.

2018-01-11  Piotr Trojanek  <trojanek@adacore.com>

	* libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
	libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
	(File_Type): Add Default_Initial_Condition aspect.

2018-01-11  Pascal Obry  <obry@adacore.com>

	* libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.

2018-01-11  Bob Duff  <duff@adacore.com>

	* doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
	to match what the Libadalang-based version does.
	* doc/gnat_ugn/about_this_guide.rst: Update reference.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_res.adb (Uses_SS): A controlled type requires the secondary stack
	if it contains at least one component declaration employing a function
	call returning on the secondary stack.

2018-01-11  Yannick Moy  <moy@adacore.com>

	* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
	Update description of restriction SPARK_05 with SPARK 2014.
	* gnat_rm.texi: Regenerate.

2018-01-11  Vasiliy Fofanov  <fofanov@adacore.com>

	* doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
	sem_res.adb, sem_util.adb: Minor reformatting.

2018-01-11  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
	has a delayed aspect which must be processed at the point the type is
	frozen. This mimics what is done when the predicate is provided by a
	source aspect.

2018-01-11  Doug Rupp  <rupp@adacore.com>

	* init.c (vxworks): Add macro checks for __aarch64__.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_util.adb (Add_Failure_Expression): New routine.
	(Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
	* sem_util.adb (Is_Current_Instance): Code cleanup.

2018-01-11  Patrick Bernardi  <bernardi@adacore.com>

	* libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
	Default_Sec_Stack_Size.
	* libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
	limit check so that the integer index does not overflow. Check the
	dynamic stack allocation does not cause the secondary stack pointer to
	overflow.
	(SS_Info): Align colons.
	(SS_Init): Cover the case when bootstraping with an old compiler that
	does not set Default_SS_Size.

2018-01-11  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
	legality of an inherited operation that may require overriding, ignore
	primitive_wrappers that correspond to explicit operations that override
	an interface primitive.
	* exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
	operation to which the class-wide expression applies is a protected op.
	with a primitive_wrapper, verify that the updated inherited expression
	does not contain an internal call to a protected function.  This
	completes the implementation of AI12-0166.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* ali.adb: Document the remaining letters available for ALI lines.
	(Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
	* ali.ads: Update type With_Record. Field
	Implicit_With_From_Instantiation is no longer in use. Add field
	Implicit_With.
	* csinfo.adb (CSinfo): Remove the setup for attribute
	Implicit_With_From_Instantiation.
	* lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
	either implicitly or explicitly withed.
	(Is_Implicit_With_Clause): New routine.
	(Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
	confusion with the with clause attribute by the same name.
	(Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
	* rtsfind.adb (Maybe_Add_With): Code cleanup.
	* sem_ch8.adb (Present_System_Aux): Code cleanup.
	* sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
	for a parent unit.
	(Implicit_With_On_Parent): Mark the with clause as generated for a
	parent unit.
	* sem_ch12.adb (Inherit_Context): With clauses inherited by an
	instantiation are no longer marked as Implicit_With_From_Instantiation
	because they are already marked as implicit.
	* sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
	which marks implicit with clauses as related to an instantiation.
	* sinfo.adb (Implicit_With_From_Instantiation): Removed.
	(Parent_With): New routine.
	(Set_Implicit_With_From_Instantiation): Removed.
	(Set_Parent_With): New routine.
	* sinfo.ads: Update the documentation of attribute Implicit_With.
	Remove attribute Implicit_With_From_Instantiation along with
	occurrences in nodes.  Add attribute Parent_With along with occurrences
	in nodes.
	(Implicit_With_From_Instantiation): Removed along with pragma Inline.
	(Parent_With): New routine along with pragma Inline.
	(Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
	(Set_Parent_With): New routine along with pragma Inline.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_util.adb (Find_Enclosing_Scope): Return the unique defining
	entity when the enclosing construct is a body.

2018-01-11  Patrick Bernardi  <bernardi@adacore.com>

	* exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
	Secondary_Stack_Size handling as a pragma is now generated for the
	corresponding aspect instead of an attribute.  Pragma expression is
	relocated instead of evaluated. Discriminant of the corresponding
	record type is referenced rather than the type discriminant.
	(Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
	Secondary_Stack_Size rep item checks to only look for the pragma rep.
	* sem_ch13.adb (Analyze_One_Aspect): Transform
	Aspect_Secondary_Stack_Size into a pragma instead of an attribute
	because the attribute does not have visibility on a task type's
	discriminants when the type's definition is expanded.
	(Analyze_Attribute_Definition_Clause): Remove handling of
	Attribute_Secondary_Stack_Size.
	* snames.adb-tmpl, snames.ads-tmpl: Remove
	Attribute_Secondary_Stack_Size, no longer used.

2018-01-11  Justin Squirek  <squirek@adacore.com>

	* sem_ch8.adb: Minor comment fix.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch4.adb (Process_Action): Do not abandon the inspection of an
	individual action because the action may denote a complex expression,
	such as a case statement, which in turn may contain additional
	transient objects.

2018-01-11  Ed Schonberg  <schonberg@adacore.com>

	* sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
	analysis on a copy of the expression with a copy of the index variable,
	because full expansion will rewrite construct into a loop with the
	original loop variable.
	* exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
	expression is an iterated component association. Full analysis takes
	place when construct is rewritten as a loop.
	(In_Place_Assign_OK, Safe_Component): An iterated_component_association
	is not safe for in-place assignment.
	* sem_util.adb (Remove_Entity): Handle properly the case of an isolated
	entity with no homonym and no other entity in the scope.

2018-01-11  Justin Squirek  <squirek@adacore.com>

	* sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
	message to be printed on the pragma argument identifier.

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
	entity of the generated invariant procedure in order to construct a
	proper entity chain.

2018-01-11  Piotr Trojanek  <trojanek@adacore.com>

	* sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
	comment.

2018-01-11  Arnaud Charlet  <charlet@adacore.com>

	* einfo.ads, einfo.adb (Activation_Record_Component,
	Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
	Allow E_Discriminant.

2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
	for atomic access once the component size is taken into account and
	also do it if the component type is Atomic or Volatile_Full_Access.

2018-01-04  Eric Botcazou  <ebotcazou@adacore.com>

	* gnatvsn.ads: Bump copyright year.

2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
	as polynomial.

2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
	as polynomial.

2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* gcc-interface/utils.c (gnat_types_compatible_p): Handle
	polynomial TYPE_VECTOR_SUBPARTS.

2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* gcc-interface/misc.c (enumerate_modes): Handle polynomial
	GET_MODE_NUNITS.

2018-01-03  Jakub Jelinek  <jakub@redhat.com>

	Update copyright years.

 	* gnat_ugn.texi: Bump @copying's copyright year.
 	* gnat_rm.texi: Likewise.

Copyright (C) 2018 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.