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
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
|
2016-10-11 Eric Botcazou <ebotcazou@adacore.com>
Tristan Gingold <gingold@adacore.com>
* system-linux-ppc64.ads: Delete.
* system-linux-ppc.ads: Make 32-bit/64-bit neutral.
* gcc-interface/Makefile.in (PowerPC/Linux): Simplify.
2016-10-10 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Put volatile qualifier
on types at the very end of the processing.
(gnat_to_gnu_param): Remove redundant test.
(change_qualified_type): Do nothing for unconstrained array types.
2016-10-10 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (find_common_type): Do not return the LHS type
if it's an array with non-constant lower bound and the RHS type is an
array with a constant one.
2016-10-10 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (convert): For a biased input type, convert the
bias itself to the base type before adding it.
2016-10-08 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (convert) <VECTOR_CST>: Add missing break.
Revert
2016-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gcc-interface/decl.c: Fix fall through comment formatting.
* gcc-interface/misc.c: Likewise.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils.c: Likewise.
* gcc-interface/utils2.c: Likewise.
2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
* gcc-interface/misc.c (gnat_post_options): Remove special case for
TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
2016-09-27 Jakub Jelinek <jakub@redhat.com>
* terminals.c (is_gui_app): Remove break after return.
2016-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gcc-interface/decl.c: Fix fall through comment formatting.
* gcc-interface/misc.c: Likewise.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils.c: Likewise.
* gcc-interface/utils2.c: Likewise.
2016-09-23 Jakub Jelinek <jakub@redhat.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Use
CONSTRUCTOR_NELTS (...) instead of
vec_safe_length (CONSTRUCTOR_ELTS (...)).
2016-07-14 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Also use
the void pointer type if the designated type is incomplete and has no
full view in LTO mode.
<E_Access_Protected_Subprogram_Type>: Adjust comment.
<E_Incomplete_Type>: Likewise.
* gcc-interface/trans.c (Call_to_gnu): Do not convert to the type of
the actual if it is a dummy type.
2016-07-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gcc-interface/ada-tree.h (TYPE_ALIGN_OK): Define.
* gcc-interface/trans.c (Attribute_to_gnu): Adjust call to
get_inner_reference.
* gcc-interface/utils2.c (build_unary_op): Likewise.
2016-07-11 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (add_decl_expr): Minor tweak.
* gcc-interface/utils.c (create_var_decl): For an external variable,
also clear TREE_READONLY in LTO mode if the initializer is not a valid
constant and set DECL_READONLY_ONCE_ELAB instead.
2016-07-11 Eric Botcazou <ebotcazou@adacore.com>
PR ada/71817
* adaint.c (__gnat_is_read_accessible_file): Add parentheses.
(__gnat_is_write_accessible_file): Likewise.
2016-07-07 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Internal_Init_Call): Subsidiary procedure
to Expand_Protected_ Subprogram_Call, to handle properly a
call to a protected function that provides the initialization
expression for a private component of the same protected type.
* sem_ch9.adb (Analyze_Protected_Definition): Layout must be
applied to itypes generated for a private operation of a protected
type that has a formal of an anonymous access to subprogram,
because these itypes have no freeze nodes and are frozen in place.
* sem_ch4.adb (Analyze_Selected_Component): If prefix is a
protected type and it is not a current instance, do not examine
the first private component of the type.
2016-07-07 Arnaud Charlet <charlet@adacore.com>
* exp_imgv.adb, g-dynhta.adb, s-regexp.adb, s-fatgen.adb, s-poosiz.adb:
Minor removal of extra whitespace.
* einfo.ads: minor removal of repeated "as" in comment
2016-07-07 Vadim Godunko <godunko@adacore.com>
* adaint.c: Complete previous change.
2016-07-07 Vadim Godunko <godunko@adacore.com>
* adainit.h, adainit.c (__gnat_is_read_accessible_file): New
subprogram.
(__gnat_is_write_accessible_file): New subprogram.
* s-os_lib.ads, s-os_lib.adb (Is_Read_Accessible_File): New subprogram.
(Is_Write_Accessible_File): New subprogram.
2016-07-07 Justin Squirek <squirek@adacore.com>
* sem_ch12.adb (Install_Body): Minor refactoring in the order
of local functions.
(In_Same_Scope): Change loop condition to be more expressive.
2016-07-07 Gary Dismukes <dismukes@adacore.com>
* sem_ch3.adb, sem_prag.adb, sem_prag.ads, prj-ext.adb, freeze.adb,
sem_attr.adb: Minor reformatting, fix typos.
2016-07-07 Justin Squirek <squirek@adacore.com>
* sem_ch12.adb (In_Same_Scope): Created this function to check
a generic package definition against an instantiation for scope
dependancies.
(Install_Body): Add function In_Same_Scope and
amend conditional in charge of delaying the package instance.
(Is_In_Main_Unit): Add guard to check if parent is present in
assignment of Current_Unit.
2016-07-07 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove redundant test,
adjust comments and formatting.
* sem_prag.adb (Inlining_Not_Possible): Do not test Front_End_Inlining
here but...
(Make_Inline): ...here before calling Inlining_Not_Possible instead.
(Set_Inline_Flags): Remove useless test.
(Analyze_Pragma) <Pragma_Inline>: Add comment about -gnatn switch.
2016-07-07 Ed Schonberg <schonberg@adacore.com>
* sem_prag.ads, sem_prag.adb (Build_Classwide_Expression): Include
overridden operation as parameter, in order to map formals of
the overridden and overring operation properly prior to rewriting
the inherited condition.
* freeze.adb (Check_Inherited_Cnonditions): Change call to
Build_Class_Wide_Expression accordingly. In Spark_Mode, add
call to analyze the contract of the parent operation, prior to
mapping formals between operations.
2016-07-07 Arnaud Charlet <charlet@adacore.com>
* adabkend.adb (Scan_Back_End_Switches): Ignore -o/-G switches
as done in back_end.adb.
(Scan_Compiler_Args): Remove special case for CodePeer/SPARK, no longer
needed, and prevents proper handling of multi-unit sources.
2016-07-07 Thomas Quinot <quinot@adacore.com>
* g-sechas.adb, g-sechas.ads (GNAT.Secure_Hashes.H): Add Hash_Stream
type with Write primitive calling Update on the underlying context
(and dummy Read primitive raising P_E).
2016-07-07 Thomas Quinot <quinot@adacore.com>
* sem_ch13.adb: Minor reformatting.
2016-07-07 Thomas Quinot <quinot@adacore.com>
* g-socket.ads: Document performance consideration for stream
wrapper.
2016-07-07 Arnaud Charlet <charlet@adacore.com>
* osint-c.ads (Set_File_Name): Clarify spec.
2016-07-07 Eric Botcazou <ebotcazou@adacore.com>
* freeze.adb: Reenable code.
2016-07-07 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Process_Formals): Set ghost flag
on formal entities of ghost subprograms.
* ghost.adb (Check_Ghost_Context.Is_OK_Ghost_Context): Accept ghost
entities in use type clauses.
2016-07-06 Javier Miranda <miranda@adacore.com>
* sem_ch6.adb (Check_Inline_Pragma): if the subprogram has no spec
then move its aspects to the internally built subprogram spec.
2016-07-06 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Mark body of
expression function as ghost if needed when created.
* sem_prag.adb (Analyze_Pragma.Process_Inline.Set_Inline_Flags):
Remove special case.
2016-07-06 Arnaud Charlet <charlet@adacore.com>
* lib.adb (Check_Same_Extended_Unit): Complete previous change.
* sem_intr.adb (Errint): New parameter Relaxed. Refine previous
change to only disable errors selectively.
* sem_util.adb: minor style fix in object declaration
2016-07-06 Yannick Moy <moy@adacore.com>
* sem_warn.adb (Check_Infinite_Loop_Warning.Find_Var): Special case a
call to a volatile function, so that it does not lead to a warning in
that case.
2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb, sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
* gnat1drv.adb: Code clean up. Do not emit any
code generation errors when the unit is ignored Ghost.
2016-07-06 Ed Schonberg <schonberg@adacore.com>
* sem_eval.adb (Check_Non_Static_Context): If the expression
is a real literal of a floating point type that is part of a
larger expression and is not a static expression, transform it
into a machine number now so that the rest of the computation,
even if other components are static, is not evaluated with
extra precision.
2016-07-06 Javier Miranda <miranda@adacore.com>
* sem_ch13.adb (Freeze_Entity_Checks): Undo previous patch and move the
needed functionality to Analyze_Freeze_Generic_Entity.
(Analyze_Freeze_Generic_Entity): If the entity is not already frozen
and has delayed aspects then analyze them.
2016-07-06 Yannick Moy <moy@adacore.com>
* sem_prag.adb (Analyze_Pragma.Process_Inline.Set_Inline_Flags):
Special case for unanalyzed body entity of ghost expression function.
2016-07-06 Javier Miranda <miranda@adacore.com>
* sem_ch7.adb (Analyze_Package_Specification): Insert its
freezing nodes after the last declaration. Needed to ensure
that global entities referenced in aspects of frozen types are
properly handled.
* freeze.adb (Freeze_Entity): Minor code reorganization to ensure
that freezing nodes of generic packages are handled.
* sem_ch13.adb (Freeze_Entity_Checks): Handle N_Freeze_Generic nodes.
* sem_ch12.adb (Save_References_In_Identifier): Handle selected
components which denote a named number that is constant folded
in the analyzed copy of the tree.
2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb Remove with and use clauses for Exp_Ch11 and Inline.
(Initialize_Array_Component): Protect the initialization
statements in an abort defer / undefer block when the associated
component is controlled.
(Initialize_Record_Component): Protect the initialization statements
in an abort defer / undefer block when the associated component is
controlled.
(Process_Transient_Component_Completion): Use Build_Abort_Undefer_Block
to create an abort defer / undefer block.
* exp_ch3.adb Remove with and use clauses for Exp_ch11 and Inline.
(Default_Initialize_Object): Use Build_Abort_Undefer_Block to
create an abort defer / undefer block.
* exp_ch5.adb (Expand_N_Assignment_Statement): Mark an abort
defer / undefer block as such.
* exp_ch9.adb (Find_Enclosing_Context): Do not consider an abort
defer / undefer block as a suitable context for an activation
chain or a master.
* exp_util.adb Add with and use clauses for Exp_Ch11.
(Build_Abort_Undefer_Block): New routine.
* exp_util.ads (Build_Abort_Undefer_Block): New routine.
* sinfo.adb (Is_Abort_Block): New routine.
(Set_Is_Abort_Block): New routine.
* sinfo.ads New attribute Is_Abort_Block along with occurrences
in nodes.
(Is_Abort_Block): New routine along with pragma Inline.
(Set_Is_Abort_Block): New routine along with pragma Inline.
2016-07-06 Justin Squirek <squirek@adacore.com>
* sem_ch4.adb (Analyze_One_Call): Add a conditional to handle
disambiguation.
2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb Flag252 is now used as Is_Finalized_Transient. Flag295
is now used as Is_Ignored_Transient.
(Is_Finalized_Transient): New routine.
(Is_Ignored_Transient): New routine.
(Is_Processed_Transient): Removed.
(Set_Is_Finalized_Transient): New routine.
(Set_Is_Ignored_Transient): New routine.
(Set_Is_Processed_Transient): Removed.
(Write_Entity_Flags): Output Flag252 and Flag295.
* einfo.ads: New attributes Is_Finalized_Transient
and Is_Ignored_Transient along with occurrences in
entities. Remove attribute Is_Processed_Transient.
(Is_Finalized_Transient): New routine along with pragma Inline.
(Is_Ignored_Transient): New routine along with pragma Inline.
(Is_Processed_Transient): Removed along with pragma Inline.
(Set_Is_Finalized_Transient): New routine along with pragma Inline.
(Set_Is_Ignored_Transient): New routine along with pragma Inline.
(Set_Is_Processed_Transient): Removed along with pragma Inline.
* exp_aggr.adb Add with and use clauses for Exp_Ch11 and Inline.
(Build_Record_Aggr_Code): Change the handling
of controlled record components.
(Ctrl_Init_Expression): Removed.
(Gen_Assign): Add new formal parameter In_Loop
along with comment on usage. Remove local variables Stmt and
Stmt_Expr. Change the handling of controlled array components.
(Gen_Loop): Update the call to Gen_Assign.
(Gen_While): Update the call to Gen_Assign.
(Initialize_Array_Component): New routine.
(Initialize_Ctrl_Array_Component): New routine.
(Initialize_Ctrl_Record_Component): New routine.
(Initialize_Record_Component): New routine.
(Process_Transient_Component): New routine.
(Process_Transient_Component_Completion): New routine.
* exp_ch4.adb (Process_Transient_In_Expression): New routine.
(Process_Transient_Object): Removed. Replace all existing calls
to this routine with calls to Process_Transient_In_Expression.
* exp_ch6.adb (Expand_Ctrl_Function_Call): Remove local constant
Is_Elem_Ref. Update the comment on ignoring transients.
* exp_ch7.adb (Process_Declarations): Do not process ignored
or finalized transient objects.
(Process_Transient_In_Scope): New routine.
(Process_Transients_In_Scope): New routine.
(Process_Transient_Objects): Removed. Replace all existing calls
to this routine with calls to Process_Transients_In_Scope.
* exp_util.adb (Build_Transient_Object_Statements): New routine.
(Is_Finalizable_Transient): Do not consider a transient object
which has been finalized.
(Requires_Cleanup_Actions): Do not consider ignored or finalized
transient objects.
* exp_util.ads (Build_Transient_Object_Statements): New routine.
* sem_aggr.adb: Major code clean up.
* sem_res.adb: Update documentation.
2016-07-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Subtype_Declaration): For generated
subtypes, such as actual subtypes of unconstrained formals,
inherit predicate functions, if any, from the parent type rather
than creating redundant new ones.
2016-07-06 Hristian Kirtchev <kirtchev@adacore.com>
* exp_attr.adb, sem_attr.adb, sem_ch13.adb: Minor reformatting.
2016-07-06 Arnaud Charlet <charlet@adacore.com>
* lib.adb (Check_Same_Extended_Unit): Prevent looping forever.
* gnatbind.adb: Disable some consistency checks in codepeer mode,
which are not needed.
2016-07-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Check_Fixed_Point_Actual): Add a warning when
a formal fixed point type is instantiated with a type that has
a user-defined arithmetic operations, but the generic has no
corresponding formal functions. This is worth a warning because
of the special semantics of fixed-point operators.
2016-07-06 Bob Duff <duff@adacore.com>
* sem_attr.adb (Analyze_Attribute): Allow any expression of
discrete type.
* exp_attr.adb (Expand_N_Attribute_Reference): Change the
constant-folding code to correctly handle cases newly allowed
by Analyze_Attribute.
2016-07-05 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Invoke global_bindings_p
last when possible. Do not call elaborate_expression_2 on offsets in
local record types and avoid useless processing for constant offsets.
2016-07-04 Arnaud Charlet <charlet@adacore.com>
* gnat_rm.texi, gnat_ugn.texi,
doc/gnat_ugn/gnat_project_manager.rst,
doc/gnat_ugn/building_executable_programs_with_gnat.rst,
doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
doc/gnat_ugn/about_this_guide.rst,
doc/gnat_ugn/platform_specific_information.rst,
doc/gnat_ugn/tools_supporting_project_files.rst,
doc/gnat_ugn/gnat_and_program_execution.rst,
doc/gnat_ugn/gnat_utility_programs.rst,
doc/gnat_ugn/the_gnat_compilation_model.rst,
doc/gnat_rm/implementation_defined_attributes.rst,
doc/gnat_rm/implementation_defined_pragmas.rst,
doc/gnat_rm/representation_clauses_and_pragmas.rst,
doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
doc/gnat_ugn.rst: Update documentation.
2016-07-04 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Makefile.in: Cleanups.
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute_Old_Result): The attributes can
appear in the postcondition of a subprogram renaming declaration,
when the renamed entity is an attribute reference that is a
function (such as 'Value).
* sem_attr.adb (Eval_Attribute): It doesn't
need to be static, just known at compile time, so use
Compile_Time_Known_Value instead of Is_Static_Expression.
This is an efficiency improvement over the previous bug fix.
* sem_ch13.adb (Analyze_One_Aspect): Use Original_Node to detect
illegal aspects on subprogram renaming declarations that may
have been rewritten as bodies.
2016-07-04 Arnaud Charlet <charlet@adacore.com>
* sem_intr.adb (Errint): Do not emit error message in
Relaxed_RM_Semantics mode.
2016-07-04 Bob Duff <duff@adacore.com>
* sem_attr.adb (Eval_Attribute): The code was assuming
that X'Enum_Rep, where X denotes a constant, can be constant
folded. Fix it so it makes that assumption only when X denotes
a STATIC constant.
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Compatible_Types_In_Predicate): New function
to handle cases where a formal of a predicate function and the
corresponding actual have different views of the same type.
2016-07-04 Philippe Gil <gil@adacore.com>
* g-debpoo.adb (Free_Blocks) free blocks also until
Logically_Deallocated less than Maximum_Logically_Freed_Memory
(Dump) add dump of number of traceback & validity elements
already allocated.
2016-07-04 Justin Squirek <squirek@adacore.com>
* sem_ch12.adb (Instantiate_Package_Body): Add
a guard to ignore Itypes which fail when installing primitives.
2016-07-04 Bob Duff <duff@adacore.com>
* sem_eval.adb (Decompose_Expr): Set 'out' parameters
Kind and Cons to valid values, to avoid use of uninit vars.
(Extract_Length): Reorder the check to make it clearer that
we're depending on BOTH Ent1 and Ent2 to be Present.
* sem_aggr.adb (Resolve_Aggregate): Remove dead code.
(Check_Misspelled_Component): Remove exit statement, because
it's covered by the 'while' condition.
* checks.adb (Apply_Selected_Range_Checks): Remove useless
condition "or else not Checks_On".
(Selected_Range_Checks):
Initialize Known_LB and Known_HB to False, because they are
tested unconditionally; avoid use of uninit vars.
* frontend.adb (Frontend): Removed useless condition
"Operating_Mode = Check_Semantics and then", and added an Assert
to clarify why it was useless.
* prep.adb (Preprocess): Remove redundant condition. Add an
assertion.
* sem_ch10.adb (Analyze_Proper_Body): Moved redundant condition
"Original_Operating_Mode = Generate_Code" to an Assert.
(Process_Spec_Clauses, Process_Body_Clauses): Change parameters
from 'in out' to 'out', and don't initialize actuals.
* sem_ch12.adb (Is_In_Main_Unit): Removed useless condition
"Unum = Main_Unit or else".
(Save_Global_Descendant): Moved
redundant condition "D = Union_Id (No_List)" to an Assert.
* sem_ch4.adb (Check_Misspelled_Selector): Remove exit
statement, because it's covered by the 'while' condition.
(Analyze_Case_Expression): Initialize Wrong_Alt to Empty,
because it looks like it is used uninitialized otherwise.
* sem_ch6.adb (Check_Return_Subtype_Indication): Moved redundant
condition "not R_Type_Is_Anon_Access" to an Assert.
* sem_elim.adb (Line_Num_Match): Moved redundant condition
"Sloc_Trace (Idx) = '['" to an Assert.
* sem_util.adb (Compile_Time_Constraint_Error): Change "J" to
"J - 1". This code is trying to replace "?" with "<", but not if
the "?" is quoted, as in "'?", so we want to check the PREVIOUS
character for '''.
* snames.adb-tmpl (Is_Pragma_Name): Remove useless condition
"or else N = Name_Relative_Deadline". It's useless because
Name_Relative_Deadline is in the range First_Pragma_Name
.. Last_Pragma_Name.
* treepr.adb (Visit_Node): Moved redundant condition "D =
Union_Id (No_List)" to an Assert.
* sem_ch3.adb (Derive_Subprogram, Derive_Subprograms): Change
parameters from 'in out' to 'out'.
* errout.adb (Error_Msg_Internal): Replace redundant test with Assert.
* inline.adb (Add_Inlined_Body): Code cleanup.
2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
* g-sercom-mingw.adb, sem_ch6.adb: Minor reformatting.
2016-07-04 Olivier Hainque <hainque@adacore.com>
* g-sercom-mingw.adb (Set): Fix port configuration for the
non-blocking + null-timeout case, request of immediate return.
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Is_Non_Overriding_Operation): Add guard to test
of generic parent type when operation is a parameterless function
that may dispatch on result.
2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb, ghost.adb, sem_ch13.adb: Minor reformatting.
2016-07-04 Pascal Obry <obry@adacore.com>
* g-forstr.ads: More documentation for the Formatted_String
support.
2016-07-04 Justin Squirek <squirek@adacore.com>
* sem_ch7.adb (Install_Parent_Private_Declarations): When
instantiating a child unit, do not install private declaration of
a non-generic ancestor of the generic that is also an ancestor
of the current unit: its private part will be installed when
private part of ancestor itself is analyzed.
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Instantiate_Object): In SPARK mode add a guard
to verify that the actual is an object reference before checking
for volatility.
(Check_Generic_Child_Unit): Prevent cascaded errors when prefix
is illegal.
2016-07-04 Gary Dismukes <dismukes@adacore.com>
* sem_ch12.ads, freeze.adb: Minor reformatting and typo fixes.
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (New_Stream_Subprogram): If the attribute
definition clause comes from an aspect specification, place the
generated subprogram renaming in the freeze actions of the type.
2016-07-04 Philippe Gil <gil@adacore.com>
* g-debpoo.adb (Dump.Do_Report) - add space prefix to backtrace
address dump - avoid new line sent directly to stdout.
2016-07-04 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb, sem_ch12.adb, sem_elab.adb, sem_prag.adb, sem_res.adb:
Relax elaboration checks in SPARK_Mode so that we rely on the
static elaboration model (if used). We'll have a more precise
check performed in flow analysis of gnat2why.
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* ghost.adb (Prune_Node): A freeze node for an ignored ghost
entity must be pruned as well.
2016-07-04 Gary Dismukes <dismukes@adacore.com>
* sem_type.adb, einfo.ads, freeze.adb, exp_ch6.adb: Minor reformatting
and typo fix.
2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb, sem_type.adb, sem_ch12.adb, xref_lib.adb,
freeze.adb, sinput-l.adb, sinput-l.ads, sem_ch4.adb, sem_ch8.adb:
Minor reformatting.
2016-07-04 Justin Squirek <squirek@adacore.com>
* sem_prag.adb (Analyze_Unmodified_Or_Unused and
Analyze_Unreferenced_Or_Unused): Change warning message to be
more clear about pragma duplicates.
2016-07-04 Yannick Moy <moy@adacore.com>
* sinput-l.adb (Create_Instantiation_Source): Set component
Inlined_Call for inherited pragma case.
* sinput.adb, sinput.ads (Instantiation): Return component
Inlined_Call for inherited pragma case.
2016-07-04 Bob Duff <duff@adacore.com>
* sem_type.adb (Remove_Conversions): Protect
the call to Left_Opnd by checking for Nkind in N_Unary_Op --
unary operators do not have a left operand.
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): A declaration of a
constant in a protected operation may be a homonym of a private
component of the enclosing protected type. This declaration hides
the component renaming constructed within the protected operation.
2016-07-04 Bob Duff <duff@adacore.com>
* xref_lib.adb (Parse_X_Filename, Parse_Identifier_Info): Ignore
unknown files. Check that File_Nr is in the range of files we
know about. The previous code was checking the lower bound,
but not the upper bound.
2016-07-04 Arnaud Charlet <charlet@adacore.com>
* tracebak.c: Minor reformatting.
2016-07-04 Yannick Moy <moy@adacore.com>
* sem_ch12.adb, sem_ch12.ads Update calls to
Create_Instantiation_Source to use default argument.
(Adjust_Inherited_Pragma_Sloc): New function to adjust sloc
of inherited pragma.
(Set_Copied_Sloc_For_Inherited_Pragma):
New function that wraps call to Create_Instantiation_Source for
copying an inherited pragma.
(Set_Copied_Sloc_For_Inlined_Body): Update call to
Create_Instantiation_Source with new arguments.
* sem_prag.adb (Build_Pragma_Check_Equivalent): In the case
of inherited pragmas, use the generic machinery to get chained
locations for the pragma and its sub-expressions.
* sinput-c.adb: Adapt to new type Source_File_Record.
* sinput-l.adb, sinput-l.ads (Create_Instantiation_Source):
Add parameter Inherited_Pragma and make parameter Inlined_Body
optional.
* sinput.adb, sinput.ads (Comes_From_Inherited_Pragma): New
function to return when a location comes from an inherited pragma.
(Inherited_Pragma): New function to detect when a location comes
from an inherited pragma.
(Source_File_Record): New component Inherited_Pragma.
2016-07-04 Yannick Moy <moy@adacore.com>
* sem_elab.adb: Register existence of quickfix for error message.
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Resolve_One_Call): In the context of a predicate
function the formal and the actual in a call may have different
views of the same type, because of the delayed analysis of
predicates aspects. Extend the patch that handles this potential
discrepancy to handle private and full views as well.
* sem_ch8.adb (Find_Selected_Component): Refine predicate that
produces additional error when an illegal selected component
looks like a prefixed call whose first formal is untagged.
2016-07-04 Justin Squirek <squirek@adacore.com>
* einfo.adb (Has_Pragma_Unused): Create this function as a setter
for a new flag294 (Set_Has_Pragma_Unused): Create this procedure
as a getter for flag294 (Write_Entity_Flags): Register the new
flag with an alias
* einfo.ads Add comment documenting Has_Pragma_Unused (flag294)
and subsequent getter and setter declarations.
* lib-xref.adb (Generate_Reference): Recognize Has_Pragma_Unused
flag to print appropriate warning messages.
* par-prag.adb (Prag): Classify Pragma_Unused into "All Other
Pragmas."
* snames.ads-tmpl Add a new name to the name constants and a
new pramga to Pragma_Id for pramga Unused.
* sem_prag.adb (Analyze_Pragma): Create case for Pragma_Unused
and move the block for Pragma_Unmodified and Pragma_Unreferenced
out and into local subprograms.
(Analyze_Unmodified, Analyze_Unreferenced): From the old pragma blocks
that have been separated in to local subprograms add a parameter to
indicate the if they are being called in the context of Pragma_Unused
and handle it accordingly.
(Is_Non_Significant_Pragma_Reference): Add an entry for Pragma_Unused
and correct the position of Pragma_Unevaluated_Use_Of_Old.
* sem_util.adb (Note_Possible_Modification): Recognize
Has_Pragma_Unused flag to print appropriate warning messages.
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Check_Inherited_Conditions): Perform two passes over
the primitive operations of the type: one over source overridings
to build the primitives mapping, and one over inherited operations
to check for the need to create wrappers, and to check legality
of inherited condition in SPARK.
* sem_prag.ads (Update_Primitive_Mapping): Make public, for use
in freeze actions.
* sem_prag.adb (Build_Pragma_Check_Equivalent): Refine error
message in the case of an inherited condition in SPARK that
includes a call to some other overriding primitive.
2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb (Ctrl_Init_Expression): New routine.
(Gen_Assign): Code cleanup. Perform in-place side effect removal when
the expression denotes a controlled function call.
* exp_util.adb (Remove_Side_Effects): Do not remove side effects
on a function call which has this behavior suppressed.
* sem_aggr.adb Code cleanup.
* sinfo.adb (No_Side_Effect_Removal): New routine.
(Set_Side_Effect_Removal): New routine.
* sinfo.ads New attribute No_Side_Effect_Removal along with
occurences in nodes.
(No_Side_Effect_Removal): New routine along with pragma Inline.
(Set_Side_Effect_Removal): New routine along with pragma Inline.
2016-07-04 Arnaud Charlet <charlet@adacore.com>
* opt.ads, sem_prag.adb (Universal_Addressing_On_AAMP): Removed.
Remove support for pragma No_Run_Time. Update comments.
2016-07-04 Pascal Obry <obry@adacore.com>
* g-forstr.ads: More documentation for the Formatted_String
support.
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
'Address): If the address comes from an aspect specification
and not a source attribute definition clause, do not remove
side effects from the expression, because the expression must
be elaborated at the freeze point of the object and not at the
object declaration, because of the delayed analysis of aspect
specifications.
2016-06-29 Eric Botcazou <ebotcazou@adacore.com>
PR ada/48835
PR ada/61954
* gcc-interface/gigi.h (enum standard_datatypes): Add ADT_realloc_decl
(realloc_decl): New macro.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use local
variable for the entity type and translate it as void pointer if the
entity has convention C.
(gnat_to_gnu_entity) <E_Function>: If this is not a definition and the
external name matches that of malloc_decl or realloc_decl, return the
correspoding node directly.
(gnat_to_gnu_subprog_type): Likewise for parameter and return types.
* gcc-interface/trans.c (gigi): Initialize void_list_node here, not...
Initialize realloc_decl.
* gcc-interface/utils.c (install_builtin_elementary_types): ...here.
(build_void_list_node): Delete.
* gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Return the
alignment of the system allocator for malloc_decl and realloc_decl.
Do not take alignment from void pointer types either.
2016-06-29 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): Reorder.
(LANG_HOOKS_INIT_TS): Likewise.
2016-06-22 Arnaud Charlet <charlet@adacore.com>
* sem_prag.adb: Revert unwanted change in previous commit,
only keep message fix.
2016-06-22 Ed Schonberg <schonberg@adacore.com>
* sem_prag.ads (Build_Classwide_Expression): new procedure to
build the expression for an inherited classwide condition, and
to validate such expressions when they apply to an inherited
operation that is not overridden.
* sem_prag.adb (Primitives_Mapping): new data structure to
handle the mapping between operations of a root type and the
corresponding overriding operations of a type extension. Used
to construct the expression for an inherited classwide condition.
(Update_Primitives_Mapping): add to Primitives_Mapping the links
between primitive operations of a root type and those of a given
type extension.
(Build_Pragma_Check_Equivalent): use Primitives_Mapping.
* sem_ch6.adb (New_Overloaded_Entity): Remove call to
Collect_Iherited_Class_Wide_Conditions in GNATprove_Mode. This
needs to be done at freeze point of the type.
* freeze.adb (Check_Inherited_Conditions): new procedure to
verify the legality of inherited classwide conditions. In normal
compilation mode the procedure determines whether an inherited
operation needs a wrapper to handle an inherited condition that
differs from the condition of the root type. In SPARK mode
the routine invokes Collect_Inherited_Class_Wide_Conditions to
produce the SPARK version of these inherited conditions.
(Freeze_Record_Type): For a type extension, call
Check_Inherited_Conditions.
2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb, sem_type.adb, sem.adb, freeze.adb, sem_util.adb,
s-htable.adb, exp_ch11.adb, s-secsta.adb, restrict.adb, exp_disp.adb,
sem_ch8.adb, s-tpobop.adb, exp_aggr.ads, sem_ch13.adb: Minor
reformatting.
2016-06-22 Yannick Moy <moy@adacore.com>
* lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Inverse order of
treatments so that files without compilation unit are simply skipped
before more elaborate treatments.
2016-06-22 Bob Duff <duff@adacore.com>
* s-memory.ads: Minor typo fixes in comments.
* s-memory.adb: Code cleanup.
2016-05-22 Olivier Hainque <hainque@adacore.com>
* vxworks-crtbe-link.spec: Removed, no longer used.
2016-06-22 Justin Squirek <squirek@adacore.com>
* sem_ch8.adb (Push_Scope): Add a check for when the
scope table is empty to assign the global variable
Configuration_Component_Alignment.
* sem.adb (Do_Analyze): Add Configuration_Component_Alignment
to be assigned when the environment is cleaned instead of the
default.
* sem.ads Add a global variable Configuration_Component_Alignment
to store the value given by pragma Component_Alignment in the
context of a configuration file.
* sem_prag.adb (Analyze_Pragma): Correct the case for
Component_Alignment so that the pragma is verified and add
comments to explain how it is applied to the scope stack.
2016-06-22 Justin Squirek <squirek@adacore.com>
* sprint.adb (Sprint_Node_Actual): Add check in
the case of an N_Object_Declaration when evaluating an expression
to properly ignore errors.
2016-06-22 Bob Duff <duff@adacore.com>
* g-comlin.ads (Parameter_Type): Change subtype of Last to
Natural.
* g-comlin.adb (Set_Parameter): Change subtype of Last to
Natural.
(Getopt): Check for Arg = "", and Switches /= "".
(Internal_Initialize_Option_Scan): Check for Argument (Parser,
Index) /= "".
2016-06-22 Gary Dismukes <dismukes@adacore.com>
* sem_prag.adb, sem_ch8.adb: Minor reformatting.
2016-06-22 Ed Schonberg <schonberg@adacore.com>
* einfo.ads, einfo.adb (Is_Actual_Subtype): New flag, defined
on subtypes that are created within subprogram bodies to handle
unconstrained composite formals.
* checks.adb (Apply_Predicate_Check): Do not generate a check on
an object whose type is an actual subtype.
* sem_ch6.adb (Set_Actual_Subtypes): Do not generate an
actual subtype for a formal whose base type is private.
Set Is_Actual_Subtype on corresponding entity after analyzing
its declaration.
2016-06-22 Justin Squirek <squirek@adacore.com>
* sem_prag.adb (Check_Expr_Is_OK_Static_Expression): Fix ordering
of if-block and add in a condition to test for errors during
resolution.
* sem_res.adb (Resolution_Failed): Add comment to explain why
the type of a node which failed to resolve is set to the desired
type instead of Any_Type.
* sem_ch8.adb (Analyze_Object_Renaming): Add a check for Any_Type
to prevent crashes on Is_Access_Constant.
2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
* lib-xref-spark_specific.adb, checks.adb, sem_ch13.adb: Minor
reformatting.
* exp_ch7.adb: Minor typo fix.
* lib.ads (Get_Top_Level_Code_Unit): Add comment.
2016-06-22 Bob Duff <duff@adacore.com>
* s-tassta.adb (Task_Wrapper): Fix handling of Fall_Back_Handler
wrt independent tasks.
2016-06-22 Ed Schonberg <schonberg@adacore.com>
* sem_dim.adb (Analyze_Dimension): Propagate dimension for
explicit_dereference nodes when they do not come from source,
to handle correctly dimensional analysis on iterators over
containers whose elements have declared dimensions.
2016-06-22 Arnaud Charlet <charlet@adacore.com>
* spark_xrefs.ads (Scope_Num): type refined to positive integers.
* lib-xref-spark_specific.adb (Detect_And_Add_SPARK_Scope):
moved into scope of Collect_SPARK_Xrefs.
(Add_SPARK_Scope): moved into scope of Collect_SPARK_Xrefs;
now uses Dspec and Scope_Id from Collect_SPARK_Xrefs.
(Collect_SPARK_Xrefs): refactored to avoid retraversing the list
of scopes.
(Traverse_Compilation_Unit): refactored as a generic procedure.
* types.ads (Unit_Number_Type): range refined.
2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
* lib-xref-spark_specific.adb, a-cuprqu.ads, sem_ch6.adb: Minor
reformatting.
2016-06-22 Eric Botcazou <ebotcazou@adacore.com>
* sem_util.ads (Address_Value): Declare new function.
* sem_util.adb (Address_Value): New function extracted
unmodified from Apply_Address_Clause_Check, which returns the
underlying value of the expression of an address clause.
* checks.adb (Compile_Time_Bad_Alignment): Delete.
(Apply_Address_Clause_Check): Call Address_Value on
the expression. Do not issue the main warning here and
issue the secondary warning only when the value of the
expression is not known at compile time.
* sem_ch13.adb (Address_Clause_Check_Record): Add A component and
adjust the description.
(Analyze_Attribute_Definition_Clause): In the case
of an address, move up the code creating an entry in the table of
address clauses. Also create an entry for an absolute address.
(Validate_Address_Clauses): Issue the warning for absolute
addresses here too. Tweak condition associated with overlays
for consistency.
2016-06-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Is_Predicate_Static): An inherited predicate
can be static only if it applies to a scalar type.
2016-06-22 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Adjust_Result_Type): Convert operand to base
type to prevent spurious constraint checks on subtypes of Boolean.
2016-06-22 Bob Duff <duff@adacore.com>
* debug.adb: Document debug switch -gnatd.o.
* sem_elab.adb (Check_Internal_Call): Debug switch -gnatd.o
now causes a more conservative treatment of indirect calls,
treating P'Access as a call to P in more cases. We Can't make
this the default, because it breaks common idioms, for example
the soft links.
* sem_util.adb: Add an Assert.
2016-06-22 Bob Duff <duff@adacore.com>
* a-cuprqu.ads, a-cuprqu.adb: Completely rewrite this package. Use
red-black trees, which gives O(lg N) worst-case performance on
Enqueue and Dequeue. The previous version had O(N) Enqueue in
the worst case.
2016-06-22 Arnaud Charlet <charlet@adacore.com>
* sem_warn.adb: minor style fix in comment.
* spark_xrefs.ads (Scope_Num): type refined to positive integers.
* lib-xref-spark_specific.adb (Detect_And_Add_SPARK_Scope):
moved into scope of Collect_SPARK_Xrefs.
(Add_SPARK_Scope): moved into scope of Collect_SPARK_Xrefs;
now uses Dspec and Scope_Id from Collect_SPARK_Xrefs.
(Collect_SPARK_Xrefs): refactored to avoid retraversing the list
of scopes.
* sem_ch3.adb (Build_Discriminal): Set Parent of the discriminal.
2016-06-22 Arnaud Charlet <charlet@adacore.com>
* lib-xref-spark_specific.adb (Generate_Dereference): Assignment to not
commented local variables replaced with direct uses of their values.
2016-06-22 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Add_Invariant): Replace the
current type instance with the _object parameter even in ASIS mode.
(Build_Invariant_Procedure_Body): Do not insert the
invariant procedure body into the tree for ASIS and GNATprove.
(Build_Invariant_Procedure_Declaration): Do not insert the
invariant procedure declaration into the tree for ASIS and
GNATprove.
* lib-xref-spark_specific.adb (Add_SPARK_Scope): Update comment.
2016-06-22 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Set_Actual_Subtypes): If the type of the actual
has predicates, the actual subtype must be frozen properly
because of the generated tests that may follow. The predicate
may be specified by an explicit aspect, or may be inherited in
a derivation.
2016-06-22 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (In_Range_Chec)): New predicate, subsidiary of
Expand_N_In: within an expanded range check that might raise
Constraint_Error do not generate a predicate check as well. It
is redundant because the context will add an explicit predicate
check, and it will raise the wrong exception if it fails.
* lib-xref-spark_specific.adb (Add_SPARK_File): Remove useless checks
since dependency units always have an associated compilation unit.
2016-06-22 Arnaud Charlet <charlet@adacore.com>
* lib.ads: Code cleanup.
* inline.adb: Type refinement for a counter variable.
* lib-xref-spark_specific.adb (Add_SPARK_File): removal of no-op code.
Code cleanup.
2016-06-21 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (set_nonaliased_component_on_array_type): New
function.
(set_reverse_storage_order_on_array_type): Likewise.
(gnat_to_gnu_entity) <E_Array_Type>: Call them to set the flags.
<E_Array_Subtype>: Likewise.
<E_String_Literal_Subtype>: Likewise.
(substitute_in_type) <ARRAY_TYPE>: Likewise.
* gcc-interface/utils.c (gnat_pushdecl): Always create a variant for
the DECL_ORIGINAL_TYPE of a type.
2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
* make.adb, gnatbind.adb, g-socket.adb, sem_ch13.adb: Minor
reformatting.
* lib.ads, sem_util.adb: Minor typo in comment.
2016-06-20 Yannick Moy <moy@adacore.com>
* sem_prag.adb, sem_prag.ads (Build_Pragma_Check_Equivalent):
Add parameter Keep_Pragma_Id to optionally keep
the identifier of the pragma instead of converting
to pragma Check. Also set type of new function call
appropriately. (Collect_Inherited_Class_Wide_Conditions):
Call Build_Pragma_Check_Equivalent with the new parameter
Keep_Pragma_Id set to True to keep the identifier of the copied
pragma.
* sinfo.ads: Add comment.
2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Build_Invariant_Procedure_Body):
Always install the scope of the invariant procedure
in order to produce better error messages. Do not
insert the body when the context is a generic unit.
(Build_Invariant_Procedure_Declaration): Perform minimal
decoration of the invariant procedure and its formal parameter
in case they are not analyzed. Do not insert the declaration
when the context is a generic unit.
2016-06-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Visible_Component): New procedure, subsidiary
of Replace_Type_References_ Generic, to determine whether an
identifier in a predicate or invariant expression is a visible
component of the type to which the predicate or invariant
applies. Implements the visibility rule stated in RM 13.1.1
(12/3).
2016-06-20 Hristian Kirtchev <kirtchev@adacore.com>
* s-regpat.adb, sem_prag.adb, pprint.adb, sem_ch13.adb: Minor
reformatting.
2016-06-20 Tristan Gingold <gingold@adacore.com>
* make.adb (Check_Standard_Library): Consider system.ads
if s-stalib.adb is not available.
* gnatbind.adb (Add_Artificial_ALI_File): New procedure extracted from
gnatbind.
2016-06-20 Thomas Quinot <quinot@adacore.com>
* g-socket.adb (Is_IP_Address): A string consisting in digits only is
not a dotted quad.
2016-06-20 Arnaud Charlet <charlet@adacore.com>
* exp_ch7.adb (Build_Invariant_Procedure_Body):
decorate invariant procedure body with typical properties of
procedure entityes.
2016-06-20 Arnaud Charlet <charlet@adacore.com>
* a-exetim-darwin.adb: New file.
2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
* atree.ads, atree.adb (Elist29): New routine.
(Set_Elist29): New routine.
* atree.h New definition for Elist29.
* einfo.adb Subprograms_For_Type is now an Elist rather than
a node. Has_Invariants is now a synthesized attribute
and does not require a flag. Has_Own_Invariants
is now Flag232. Has_Inherited_Invariants is
Flag291. Is_Partial_Invariant_Procedure is Flag292.
(Default_Init_Cond_Procedure): Reimplemented.
(Has_Inherited_Invariants): New routine.
(Has_Invariants): Reimplemented.
(Has_Own_Invariants): New routine.
(Invariant_Procedure): Reimplemented.
(Is_Partial_Invariant_Procedure): New routine.
(Partial_Invariant_Procedure): Reimplemented.
(Predicate_Function): Reimplemented.
(Predicate_Function_M): Reimplemented.
(Set_Default_Init_Cond_Procedure): Reimplemented.
(Set_Has_Inherited_Invariants): New routine.
(Set_Has_Invariants): Removed.
(Set_Has_Own_Invariants): New routine.
(Set_Invariant_Procedure): Reimplemented.
(Set_Is_Partial_Invariant_Procedure): New routine.
(Set_Partial_Invariant_Procedure): Reimplemented.
(Set_Predicate_Function): Reimplemented.
(Set_Predicate_Function_M): Reimplemented.
(Set_Subprograms_For_Type): Reimplemented.
(Subprograms_For_Type): Reimplemented.
(Write_Entity_Flags): Output Flag232 and Flag291.
* einfo.ads Add new attributes Has_Inherited_Invariants
Has_Own_Invariants Is_Partial_Invariant_Procedure
Partial_Invariant_Procedure Change the documentation
of attributes Has_Inheritable_Invariants Has_Invariants
Invariant_Procedure Is_Invariant_Procedure Subprograms_For_Type
(Has_Inherited_Invariants): New routine along with pragma Inline.
(Has_Own_Invariants): New routine along with pragma Inline.
(Is_Partial_Invariant_Procedure): New routine along with pragma Inline.
(Partial_Invariant_Procedure): New routine.
(Set_Has_Inherited_Invariants): New routine along with pragma Inline.
(Set_Has_Invariants): Removed along with pragma Inline.
(Set_Has_Own_Invariants): New routine along with pragma Inline.
(Set_Is_Partial_Invariant_Procedure): New routine
along with pragma Inline.
(Set_Partial_Invariant_Procedure): New routine.
(Set_Subprograms_For_Type): Update the signature.
(Subprograms_For_Type): Update the signature.
* exp_ch3.adb Remove with and use clauses for Sem_Ch13.
(Build_Array_Invariant_Proc): Removed.
(Build_Record_Invariant_Proc): Removed.
(Freeze_Type): Build the body of the invariant procedure.
(Insert_Component_Invariant_Checks): Removed.
* exp_ch7.adb Add with and use clauses for Sem_Ch6, Sem_Ch13,
and Stringt.
(Build_Invariant_Procedure_Body): New routine.
(Build_Invariant_Procedure_Declaration): New routine.
* exp_ch7.ads (Build_Invariant_Procedure_Body): New routine.
(Build_Invariant_Procedure_Declaration): New routine.
* exp_ch9.adb (Build_Corresponding_Record): Do not propagate
attributes related to invariants to the corresponding record
when building the corresponding record. This is done by
Build_Invariant_Procedure_Declaration.
* exp_util.adb (Make_Invariant_Call): Reimplemented.
* freeze.adb (Freeze_Array_Type): An array type requires an
invariant procedure when its component type has invariants.
(Freeze_Record_Type): A record type requires an invariant
procedure when at least one of its components has an invariant.
* sem_ch3.adb (Analyze_Private_Extension_Declaration): Inherit
invariant-related attributes.
(Analyze_Subtype_Declaration):
Inherit invariant-related attributes.
(Build_Derived_Record_Type): Inherit invariant-related attributes.
(Check_Duplicate_Aspects): Reimplemented.
(Get_Partial_View_Aspect): New routine.
(Process_Full_View): Inherit invariant-related attributes. Reimplement
the check on hidden inheritance of class-wide invariants.
(Remove_Default_Init_Cond_Procedure): Reimplemented.
* sem_ch6.adb (Analyze_Subprogram_Specification): Do not modify
the controlling type for an invariant procedure declaration
or body.
(Is_Invariant_Procedure_Or_Body): New routine.
* sem_ch7.adb (Analyze_Package_Specification): Build the partial
invariant body in order to preanalyze and resolve all invariants
of a private type at the end of the visible declarations. Build
the full invariant body in order to preanalyze and resolve
all invariants of a private type's full view at the end of
the private declarations.
(Preserve_Full_Attributes): Inherit invariant-related attributes.
* sem_ch9.adb (Analyze_Protected_Type_Declaration): Ensure that
aspects are analyzed with the proper view when the protected type
is a completion of a private type. Inherit invariant-related attributes.
(Analyze_Task_Type_Declaration): Ensure that
aspects are analyzed with the proper view when the task type
is a completion of a private type. Inherit invariant-related
attributes.
* sem_ch13.adb Remove with and use clauses for Stringt.
(Build_Invariant_Procedure_Declaration): Removed.
(Build_Invariant_Procedure): Removed.
(Freeze_Entity_Checks): Do not build the body of the invariant
procedure here.
The body is built when the type is frozen in Freeze_Type.
(Inherit_Aspects_At_Freeze_Point): Do not inherit any attributes
related to invariants here because this leads to erroneous
inheritance.
(Replace_Node): Rename to Replace_Type_Ref.
* sem_ch13.ads (Build_Invariant_Procedure_Declaration): Removed.
(Build_Invariant_Procedure): Removed.
* sem_prag.adb Add with and use clauses for Exp_Ch7.
(Analyze_Pragma): Reimplement the analysis of pragma Invariant.
* sem_res.adb (Resolve_Actuals): Emit a specialized error when
the context is an invariant.
* sem_util.adb (Get_Views): New routine.
(Incomplete_Or_Partial_View): Consider generic packages when
examining declarations.
(Inspect_Decls): Consider full type
declarations because they may denote a derivation from a
private type.
(Propagate_Invariant_Attributes): New routine.
* sem_util.ads (Get_Views): New routine.
(Propagate_Invariant_Attributes): New routine.
2016-06-16 Arnaud Charlet <charlet@adacore.com>
* pprint.adb (Expression_Image): Add better handling of UCs,
we don't want to strip them all for clarity.
2016-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* exp_util.adb (Safe_Unchecked_Type_Conversion): Use "alignment"
instead of "alignement".
2016-06-16 Gary Dismukes <dismukes@adacore.com>
* sem_util.adb: Minor typo fix.
2016-06-16 Emmanuel Briot <briot@adacore.com>
* s-regpat.adb: Further fix for invalid index in GNAT.Regexp.
2016-06-16 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch13.adb (Validate_Address_Clauses): Use the same logic to
issue the warning on the offset for the size as for the alignment
and tweak the wording for the sake of consistency.
2016-06-16 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Check_Class_Wide_COndition): New procedure,
subsidiary of Analyze_Pre_Post_ Condition_In_Decl_Part, to
check legality rules that follow from the revised semantics of
class-wide pre/postconditions described in AI12-0113.
(Build_Pragma_Check_Equivalent): Abstract subprogram declarations
must be included in list of overriding primitives of a derived
type.
2016-06-16 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (May_Be_Lvalue): An actual in an unexpanded
attribute reference 'Read is an assignment and must be considered
a modification of the object.
2016-06-16 Gary Dismukes <dismukes@adacore.com>
* einfo.adb: Minor editorial.
2016-06-16 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Overridden_Ancestor): Clean up code to use
controlling type of desired primitive rather than its scope,
because the primitive that inherits the classwide condition may
comes from several derivation steps.
2016-06-16 Javier Miranda <miranda@adacore.com>
* einfo.adb (Set_Default_Init_Cond_Procedure): Allow calls setting
this attribute to Empty (only if the attribute has not been set).
* sem_util.adb (Build_Default_Init_Cond_Procedure_Body):
No action needed if the spec was not built.
(Build_Default_Init_Cond_Procedure_Declaration): The spec is
not built if DIC is set to NULL or no condition was specified.
* exp_ch3.adb (Expand_N_Object_Declaration): Check availability
of the Init_Cond procedure before generating code to call it.
2016-06-16 Emmanuel Briot <briot@adacore.com>
* s-regpat.adb: Fix invalid index check when matching end-of-line
on substrings.
2016-06-16 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb: Minor reformatting.
2016-06-16 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Check_Entry_Contracts): New procedure, subsidiary
of Analyze_Declarations, that performs pre-analysis of
pre/postconditions on entry declarations before full analysis
is performed after entries have been converted into procedures.
Done solely to capture semantic errors.
* sem_attr.adb (Analyze_Attribute, case 'Result): Add guard to
call to Denote_Same_Function.
2016-06-16 Emmanuel Briot <briot@adacore.com>
* g-comlin.adb: Fix minor memory leak in GNAT.Command_Line.
2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Find_Last_Init): Remove obsolete code. The
logic is now performed by Process_Object_Declaration.
(Process_Declarations): Recognize a controlled deferred
constant which is in fact initialized by means of a
build-in-place function call as needing finalization actions.
(Process_Object_Declaration): Insert the counter after the
build-in-place initialization call for a controlled object. This
was previously done in Find_Last_Init.
* exp_util.adb (Requires_Cleanup_Actions): Recognize a controlled
deferred constant which is in fact initialized by means of a
build-in-place function call as needing finalization actions.
2016-06-16 Justin Squirek <squirek@adacore.com>
* exp_aggr.adb (Expand_Array_Aggregate): Minor comment changes and
additional style fixes.
* exp_ch7.adb: Minor typo fixes and reformatting.
2016-06-16 Justin Squirek <squirek@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Add a missing check
for optimized aggregate arrays with qualified expressions.
* exp_aggr.adb (Expand_Array_Aggregate): Fix block and
conditional statement in charge of deciding whether to perform
in-place expansion. Specifically, use Parent_Node to jump over
the qualified expression to the object declaration node. Also,
a check has been inserted to skip the optimization if SPARK 2005
is being used in strict adherence to RM 4.3(5).
2016-06-16 Tristan Gingold <gingold@adacore.com>
* sem_prag.adb (Analyze_Pragma): Simplify code
for Pragma_Priority.
2016-06-16 Eric Botcazou <ebotcazou@adacore.com>
* sem_util.ads (Indexed_Component_Bit_Offset): Declare.
* sem_util.adb (Indexed_Component_Bit_Offset): New
function returning the offset of an indexed component.
(Has_Compatible_Alignment_Internal): Call it.
* sem_ch13.adb (Offset_Value): New function returning the offset of an
Address attribute reference from the underlying entity.
(Validate_Address_Clauses): Call it and take the offset into
account for the size warning.
2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
* bindgen.adb, exp_util.adb, sem_ch9.adb, sem_util.adb: Minor
reformatting.
2016-06-16 Gary Dismukes <dismukes@adacore.com>
* sem_ch9.adb, sem_util.ads, sem_res.adb: Minor reformatting and typo
fixes.
2016-06-16 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Resolve): Under relaxed RM semantics silently
replace occurrences of null by System.Null_Address.
* sem_ch4.adb (Analyze_One_Call, Operator_Check): Under
relaxed RM semantics silently replace occurrences of null by
System.Null_Address.
* sem_util.ad[sb] (Null_To_Null_Address_Convert_OK): New subprogram.
(Replace_Null_By_Null_Address): New subprogram.
2016-06-16 Bob Duff <duff@adacore.com>
* exp_util.adb (Is_Controlled_Function_Call):
This was missing the case where the call is in prefix format,
with named notation, as in Obj.Func (Formal => Actual).
2016-06-16 Hristian Kirtchev <kirtchev@adacore.com>
* exp_attr.adb, inline.adb, sem_attr.adb, sem_elab.adb: Minor
reformatting.
2016-06-16 Bob Duff <duff@adacore.com>
* sem_util.adb (Collect): Avoid Empty Full_T. Otherwise Etype
(Full_T) crashes when assertions are on.
* sem_ch12.adb (Matching_Actual): Correctly handle the case where
"others => <>" appears in a generic formal package, other than
by itself.
2016-06-16 Arnaud Charlet <charlet@adacore.com>
* usage.adb: Remove confusing comment in usage line.
* bindgen.adb: Fix binder generated file in codepeer mode wrt
recent additions.
2016-06-16 Javier Miranda <miranda@adacore.com>
* restrict.adb (Check_Restriction_No_Use_Of_Entity): Avoid
never-ending loop, code cleanup; adding also support for Text_IO.
* sem_ch8.adb (Find_Expanded_Name): Invoke
Check_Restriction_No_Use_Entity.
2016-06-16 Tristan Gingold <gingold@adacore.com>
* exp_ch9.adb: Minor comment fix.
* einfo.ads (Has_Protected): Clarify comment.
* sem_ch9.adb (Analyze_Protected_Type_Declaration): Do not
consider private protected types declared in the runtime for
the No_Local_Protected_Types restriction.
2016-06-14 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Set_Actual_Subtypes): Do not generate actual
subtypes for unconstrained formals when analyzing the generated
body of an expression function, because it may lead to premature
and misplaced freezing of the types of formals.
2016-06-14 Gary Dismukes <dismukes@adacore.com>
* sem_elab.adb, sem_ch4.adb: Minor reformatting and typo fix.
2016-06-14 Tristan Gingold <gingold@adacore.com>
* einfo.adb (Set_Has_Timing_Event): Add assertion.
* sem_util.ads, sem_util.adb (Propagate_Concurrent_Flags): New
name for Propagate_Type_Has_Flags.
* exp_ch3.adb, sem_ch3.adb, sem_ch7.adb, sem_ch9.adb: Adjust after
renaming.
2016-06-14 Bob Duff <duff@adacore.com>
* sem_elab.adb (Check_A_Call): Do nothing if the callee is
(or is in) an instance, and the caller is outside. Misc cleanup.
2016-06-14 Javier Miranda <miranda@adacore.com>
* sem_ch4.adb (Analyze_Quantified_Expression):
Generating C code avoid spurious warning on loop variable of
inlinined postconditions.
2016-06-14 Javier Miranda <miranda@adacore.com>
* sem_attr.adb (Analyze_Attribute_Old_Result): Adding assertion.
(Analyze_Attribute [Attribute_Old]): Generating C handle
analysis of 'old in inlined postconditions.
(Analyze_Attribute [Attribute_Result]): Generating C handle analysis
of 'result in inlined postconditions.
* exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):
Generating C handle expansion of 'old in inlined postconditions.
* inline.adb (Declare_Postconditions_Result): New subprogram.
* sem_ch12.adb (Copy_Generic_Node): Copy pragmas generated from
aspects when generating C code since pre/post conditions are
inlined and the frontend inlining relies on this routine to
perform inlining.
* exp_ch6.adb (Inlined_Subprogram): Replace Generate_C_Code
by Modify_Tree_For_C.
* exp_unst.adb (Visit_Node): Searching for up-level references
skip entities defined in inlined subprograms.
2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch7.adb, sem_ch12.adb, freeze.adb, lib-xref.ads, exp_ch3.adb:
Minor reformatting.
2016-06-14 Bob Duff <duff@adacore.com>
* sem_elab.adb: Do nothing if the callee is intrinsic.
* sinfo.ads, einfo.ads: Minor comment fixes.
2016-06-14 Ed Schonberg <schonberg@adacore.com>
* contracts.adb (Has_Null_Body): Move to sem_util, for general
availability.
* sem_util.ads, sem_util.adb (Has_Null_Body): Predicate to
determine when an internal procedure created for some assertion
checking (e.g. type invariant) is a null procedure. Used to
eliminate redundant calls to such procedures when they apply to
components of composite types.
* exp_ch3.adb (Build_Component_Invariant_Call): Do not add call
if invariant procedure has a null body.
2016-06-14 Thomas Quinot <quinot@adacore.com>
* g-socket.ads (Check_Selector): Clarify effect on IN OUT socket
set parameters.
2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Process_Action): Pass the action
list to Process_Transient_Object.
(Process_If_Case_Statements): Pass the action list to
Process_Transient_Object.
(Process_Transient_Object): Add new parameter Stmts and update the
comment on usage. When the context is a Boolean evaluation, insert
any finalization calls after the last statement of the construct.
2016-06-14 Tristan Gingold <gingold@adacore.com>
* einfo.adb, einfo.ads (Has_Timing_Event,
Set_Has_Timing_Event): Add Has_Timing_Event flag.
(Write_Entity_Flags): Display * sem_util.ads, sem_util.adb:
(Propagate_Type_Has_Flags): New procedure to factorize code.
* exp_ch3.adb (Expand_Freeze_Array_Type,
Expand_Freeze_Record_Type): Call Propagate_Type_Has_Flags.
* sem_ch3.adb (Access_Type_Decalaration): Initialize
Has_Timing_Event flag. (Analyze_Object_Declaration):
Move code that check No_Local_Timing_Events near
the code that check No_Local_Protected_Objects.
(Analyze_Private_Extension_Declaration, Array_Type_Declaration)
(Build_Derived_Type, Copy_Array_Base_Type_Attributes,
Process_Full_View) (Record_Type_Definition): Call
Propagate_Type_Has_Flags.
* sem_ch4.adb (Analyze_Allocator): Check No_Local_Timing_Events.
* sem_ch7.adb (New_Private_Type): Set Has_Timing_Event on the
Timing_Event type.
(Uninstall_Declaration): Call Propagate_Type_Has_Flags.
* sem_ch9.adb (Analyze_Protected_Definition): Call
Propagate_Type_Has_Flags.
2016-06-14 Arnaud Charlet <charlet@adacore.com>
* sem.ads: Minor style fix.
2016-06-14 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Analyze_Associations): An actual parameter
with a box must be included in the count of actuals, to detect
possible superfluous named actuals that do not match any of the
formals of the generic unit in a formal package declaration.
2016-06-14 Justin Squirek <squirek@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Fix formatting
of error output related to SPARK RM 6.1.7(3) and pragma
Extensions_Visible.
* sem_ch4.adb (Analyze_Type_Conversion): Fix formatting of error
output related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
* sem_prag.adb (Analyze_Pragma): Fix formatting of error output
related to SPARK RM 7.1.2(15) and pragma Volatile_Function
so that the values True and False are no longer surrounded by
double quotes.
* sem_res.adb (Resolve_Actuals): Fix formatting of error output
related to SPARK RM 6.1.7(3) and pragma Extensions_Visible.
2016-06-14 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb (Adjust_Global_Switches): Enable access checks
in codepeer mode.
* freeze.adb: Minor grammar fix in comment.
2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
* lib.adb: Minor reformatting.
* sem_util.adb (Is_OK_Volatile_Context): Do
include Address in the supported attributes.
2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_N_Case_Expression):
Code cleanup. Finalize any transient controlled
objects on exit from a case expression alternative.
(Expand_N_If_Expression): Code cleanup.
(Process_Actions): Removed.
(Process_If_Case_Statements): New routine.
(Process_Transient_Object): Change the name of formal Rel_Node to
N and update all occurrences. Update the comment on usage. When
the type of the context is Boolean, the proper insertion point
for the finalization call is after the last declaration.
2016-06-14 Ed Schonberg <schonberg@adacore.com>
* lib-xref.ads, lib-xref.adb (Has_Deferred_Reference): new
predicate to determine whether an entity appears in a context
for which a Deferred_Reference was created, because it is not
possible to determine when reference is analyzed whether it
appears in a context in which the entity is modified.
* sem_ch5.adb (Analyze_Statement): Do not emit a useless warning
on assignment for an entity that has a deferred_reference.
2016-06-14 Javier Miranda <miranda@adacore.com>
* sem_res.adb (Resolve_Actuals): Generate a reference to actuals that
come from source. Previously the reference was generated only if the
call comes from source but the call may be rewritten by the expander
thus causing the notification of spurious warnings.
2016-06-14 Arnaud Charlet <charlet@adacore.com>
* gnat1drv.adb: Remove further references to AAMP.
* checks.adb (Apply_Scalar_Range_Check): Take
Check_Float_Overflow info account.
* live.ads, live.adb Added subprogram headers and
start-of-processing-for comments.
* sem_ch12.adb (Instantiate_Package_Body): Do not suppress
checks when instantiating runtime units in CodePeer mode.
2016-06-14 Arnaud Charlet <charlet@adacore.com>
* exp_ch3.adb (Expand_N_Object_Declaration): Only consider
nodes from sources.
2016-06-14 Arnaud Charlet <charlet@adacore.com>
* switch-c.adb, gnat1drv.adb (Adjust_Global_Switches): Only disable
simple value propagation in CodePeer mode when warnings are disabled.
(Scan_Front_End_Switches): Enable relevant front-end switches
when using -gnateC.
2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb (Is_OK_Volatile_Context): A
reference to a volatile object is considered OK if appears as
the prefix of attributes Address, Alignment, Component_Size,
First_Bit, Last_Bit, Position, Size, Storage_Size.
2016-06-14 Yannick Moy <moy@adacore.com>
* lib-xref-spark_specific.adb (Add_SPARK_File): Do not traverse
subunits directly, as they are already traversed as part of the
top-level unit to which they belong.
(Add_SPARK_Xrefs): Add assertions to ensure correct sorting.
(Generate_Dereference): Use unique definition place for special
variable __HEAP, to ensure correct sorting of references.
* lib-xref.adb (Generate_Reference): Use top-level unit in case
of subunits.
* lib.adb, lib.ads (Get_Top_Level_Code_Unit): New functions that
compute the top-level code unit for a source location of AST node,
that go past subunits.
2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_subprog_type): Build only a minimal
PARM_DECL when the parameter type is dummy.
* gcc-interface/trans.c (Call_to_gnu): Translate formal types before
formal objects.
2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Deal with
PLUS_EXPR in the expression of a renaming.
2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
with calls to malloc.
2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
constant, use the generic implementation of the middle-end; otherwise
turn the dynamic conditions into static conditions and simplify.
2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Case_Statement_to_gnu): Deal with characters.
2016-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber
gnat_entity_name with temporary names for XUP and XUT types.
2016-06-10 Martin Sebor <msebor@redhat.com>
PR c/71392
* gcc/ada/gcc-interface/utils.c (handle_nonnull_attribute): Accept
the nonnull attribute in type-generic builtins.
2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (Gigi_Equivalent_Type): Make sure equivalent
types are present before returning them. Remove final assertion.
(gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Adjust to
above change.
<E_Protected_Type>: Likewise.
2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (elaborate_all_entities_for_package): Also do
not elaborate Itypes.
2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (gnat_internal_attribute_table): Add support
for noinline and noclone attributes.
(handle_noinline_attribute): New handler.
(handle_noclone_attribute): Likewise.
2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (process_type): Beef up comment.
2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (build_call_alloc_dealloc): Do not substitute
placeholder expressions here but...
* gcc-interface/trans.c (gnat_to_gnu) <N_Free_Statement>: ...here.
Make an exception to the protection of a CALL_EXPR result with an
unconstrained type only in the same cases as Call_to_gnu.
2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu): Rework special code dealing
with boolean rvalues and set the location directly. Do not set the
location in the other cases for a simple name.
(gnat_to_gnu_external): Clear the location on the expression.
2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Remove
useless 'else' statements and tidy up.
<E_Array_Subtype>: Fully deal with the declaration here.
<E_Incomplete_Type>: Use properly-typed constant.
Assert that we don't apply the special type treatment to dummy types.
Separate this treatment from the final back-annotation and simplify
the condition for the RM size.
(gnat_to_gnu_param): Add GNU_PARAM_TYPE parameter and adjust.
(gnat_to_gnu_subprog_type): Ajust call to gnat_to_gnu_param.
* gcc-interface/trans.c (gnat_to_gnu) <N_Subprogram_Declaration>: Add
comment.
(process_freeze_entity): Remove obsolete code.
(process_type): Minor tweaks.
2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
* einfo.ads (Returns_Limited_View): Remove.
(Set_Returns_Limited_View ): Likewise.
* einfo.adb (Returns_Limited_View): Likewise.
(Set_Returns_Limited_View ): Likewise.
* freeze.adb (Late_Freeze_Subprogram): Remove.
(Freeze_Entity): Do not defer the freezing of functions returning an
incomplete type coming from a limited context.
2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (finish_subprog_decl): Add ASM_NAME parameter.
* gcc-interface/decl.c (gnu_ext_name_for_subprog): New function.
(gnat_to_gnu_entity) <E_Subprogram_Type>: Do not check compatibility
of profiles for builtins here... Call gnu_ext_name_for_subprog.
Also update profiles if pointers to limited_with'ed types are
updated.
(gnat_to_gnu_param): Restore the correct source location information
for vector ABI warnings.
(associate_subprog_with_dummy_type): Add comment about AI05-019.
Set TYPE_DUMMY_IN_PROFILE_P flag unconditionally.
(update_profile): Deal with builtin declarations.
Call gnu_ext_name_for_subprog. Adjust call to finish_subprog_decl.
(update_profiles_with): Add comment.
(gnat_to_gnu_subprog_type): Reuse the return type if it is complete.
Likewise for parameter declarations in most cases. Do not change
the return type for the CICO mechanism if the profile is incomplete.
...but here instead. Always reset the slot for the parameters.
* gcc-interface/utils.c (create_subprog_decl): Call
gnu_ext_name_for_subprog. Do not set the assembler name here but...
(finish_subprog_decl): ...but here instead. Add ASM_NAME parameter.
2016-06-06 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch9.adb (Expand_N_Protected_Type_Declaration): Insert the
declaration of the corresponding record type before that of the
unprotected version of the subprograms that operate on it.
(Expand_Access_Protected_Subprogram_Type): Declare the Equivalent_Type
just before the original type.
* sem_ch3.adb (Handle_Late_Controlled_Primitive): Point the current
declaration to the newly created declaration for the primitive.
(Analyze_Subtype_Declaration): Remove obsolete code forcing the
freezing of the subtype before its declaration.
(Replace_Anonymous_Access_To_Protected_Subprogram): Insert the new
declaration in the nearest enclosing scope for formal parameters too.
(Build_Derived_Access_Type): Restore the status of the created Itype
after it is erased by Copy_Node.
* sem_ch6.adb (Exchange_Limited_Views): Remove guard on entry.
(Analyze_Subprogram_Body_Helper): Call Exchange_Limited_Views only if
the specification is present.
Move around the code changing the designated view of the return type
and save the original view. Restore it on exit.
* sem_ch13.adb (Build_Predicate_Function_Declaration): Always insert
the declaration right after that of the type.
2016-06-01 Simon Wright <simon@pushface.org>
PR ada/71358
* g-comlin.adb (Display_Section_Help): Do not dereference
Config.Switches if it's null.
(Getopt): Likewise.
2016-05-31 Eric Botcazou <ebotcazou@adacore.com>
* s-osinte-kfreebsd-gnu.ads (clock_getres): Define.
(Get_Page_Size): Remove duplicate and return int.
2016-05-31 Jan Sommer <soja-lists@aries.uberspace.de>
PR ada/71317
* s-osinte-rtems.ads (clock_getres): Define.
(Get_Page_Size): Remove duplicate and return int.
2016-05-20 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
Make same-sized subtypes of signed base types signed.
* gcc-interface/utils.c (make_type_from_size): Adjust to above change.
(unchecked_convert): Likewise.
2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Do not build
a specific type for the object if it is deemed a constant.
2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
* freeze.adb (Freeze_Record_Type): Extend pragma Implicit_Packing to
components of any elementary types and of composite types.
2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
* freeze.adb (Freeze_Array_Type): Call Addressable predicate instead
of testing for individual sizes.
(Freeze_Entity): Rework implementation of pragma Implicit_Packing for
array types, in particular test for suitable sizes upfront and do not
mimic the processing that will be redone later in Freeze_Array_Type.
2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (elaborate_all_entities_for_package): Also skip
formal objects.
2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_rm/implementation_defined_attributes.rst
(Scalar_Storage_Order): Adjust restriction for packed array types.
* einfo.ads (Is_Bit_Packed_Array): Adjust description.
(Is_Packed): Likewise.
(Is_Packed_Array_Impl_Type): Likewise.
(Packed_Array_Impl_Type): Likewise.
* exp_ch4.adb (Expand_N_Indexed_Component): Do not do anything special
if the prefix is not a packed array implemented specially.
* exp_ch6.adb (Expand_Actuals): Expand indexed components only for
bit-packed array types.
* exp_pakd.adb (Install_PAT): Set Is_Packed_Array_Impl_Type flag on
the PAT before analyzing its declaration.
(Create_Packed_Array_Impl_Type): Remove redundant statements.
* freeze.adb (Check_Component_Storage_Order): Reject packed array
components only if they are bit packed.
(Freeze_Array_Type): Fix logic detecting bit packing and do not bit
pack for composite types whose size is multiple of a byte.
Create the implementation type for packed array types only when it is
needed, i.e. bit packing or packing because of holes in index types.
Make sure the Has_Non_Standard_Rep and Is_Packed flags agree.
* gcc-interface/gigi.h (make_packable_type): Add MAX_ALIGN parameter.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
Call maybe_pad_type instead of building the padding type manually.
(gnat_to_gnu_entity) <E_Array_Subtype>: Do not assert that
Packed_Array_Impl_Type is present for packed arrays.
(gnat_to_gnu_component_type): Also handle known alignment for packed
types by passing it to make_packable_type.
* gcc-interface/utils.c (make_packable_type): Add MAX_ALIGN parameter
and deal with it in the array case. Adjust recursive call. Simplify
computation of new size and cap the alignment to BIGGEST_ALIGNMENT.
2016-05-16 Thomas Quinot <quinot@adacore.com>
* freeze.adb (Check_Component_Storage_Order): Also get full view of
enclosing type.
2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
* exp_util.adb (Remove_Side_Effects): Also make a constant if we need
to capture the value for a small not by-reference record type.
* freeze.ads (Check_Compile_Time_Size): Adjust comment.
* freeze.adb (Set_Small_Size): Likewise. Accept a size in the range
of 33 .. 64 bits.
(Check_Compile_Time_Size): Merge scalar and access type cases. Change
variable name in array type case. For the computation of the packed
size, deal with record components and remove redundant test.
(Freeze_Array_Type): Also adjust packing status when the size of the
component type is in the range 33 .. 64 bits.
* doc/gnat_rm/representation_clauses_and_pragmas.rst: Turn primitive
into elementary type throughout. Minor tweaks.
(Alignment Clauses): Document actual alignment of packed array types.
(Pragma Pack for Arrays): List only the 3 main cases and adjust. Add
"simple" to the record case. Document effect on non packable types.
(Pragma Pack for Records): Likewise. Add record case and adjust.
2016-05-16 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian
cross case, use host_noncanonical instead of host as prefix.
(GNATBIND_FOR_HOST): Likewise.
(GNATLINK_FOR_HOST): Likewise.
(GNATLS_FOR_HOST): Likewise.
2016-05-06 Eric Botcazou <ebotcazou@adacore.com>
PR ada/70969
* system-darwin-ppc64.ads: Add pragma No_Elaboration_Code_All.
* system-linux-armeb.ads: Likewise.
* system-linux-mips64el.ads: Likewise.
* system-linux-mips.ads: Likewise.
* system-linux-mipsel.ads: Likewise.
* system-linux-ppc64.ads: Likewise.
* system-linux-sparcv9.ads: Likewise.
* system-rtems.ads: Likewise.
2016-05-04 Samuel Thibault <samuel.thibault@ens-lyon.org>
* s-osinte-gnu.ads (Get_Page_Size): Return int and use getpagesize
instead of __getpagesize.
2016-05-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
Honor DESTDIR.
2016-05-02 Tristan Gingold <gingold@adacore.com>
* fname.adb (Is_Predefined_File_Name): Also consider non-krunched
i-* names.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Aggregate_Constraint_Checks): Separate
accessibility checks and non-null checks for aggregate components,
to prevent spurious accessibility errors.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (OK_For_Limited_Init): A type conversion is not
always legal in the in-place initialization of a limited entity
(e.g. an allocator).
* sem_res.adb (Resolve_Allocator): Improve error message with RM
reference when allocator expression is illegal.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Call): When inlining a call to a function
declared in a package instance, locate the instance node of the
package after the actual package declaration. skipping over
pragmas that may have been introduced when the generic unit
carries aspects that are transformed into pragmas.
2016-05-02 Bob Duff <duff@adacore.com>
* s-memory.adb (Alloc, Realloc): Move checks
for Size = 0 or size_t'Last into the Result = System.Null_Address
path for efficiency. Improve comments (based on actual C language
requirements for malloc).
* exp_util.adb (Build_Allocate_Deallocate_Proc): Optimize the
case where we are using the default Global_Pool_Object, and we
don't need the heavy finalization machinery.
2016-05-02 Gary Dismukes <dismukes@adacore.com>
* exp_util.ads, sem_ch12.adb: Minor reformatting.
2016-05-02 Javier Miranda <miranda@adacore.com>
* exp_util.ads, exp_util.adb (Force_Evaluation): Adding new formal.
(Remove_Side_Effects): Adding a new formal.
* exp_ch6.adb (Expand_Simple_Function_Return): Generating the
call to the _Postconditions procedure ensure that side-effects
are unconditionally removed.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Check_Formal_Package_Instance, Check_Mismatch):
Use original node to determine whether the declaration is for
a formal type declaration, to take into account that formwl
private types are rewritten as private extension declarations
to simplify semantic analysis.
2016-05-02 Gary Dismukes <dismukes@adacore.com>
* exp_ch9.adb, sem_ch6.adb, sem_ch6.ads: Minor reformatting and typo
fixes.
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb, exp_ch9.adb, einfo.adb, sem_ch4.adb, sem_ch6.adb: Minor
reformatting.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_N_Allocator): If the designated type
is a private derived type with no discriminants, examine its
underlying_full_view to determine whether the full view has
defaulted discriminants, so their defaults can be used in the
call to the initialization procedure for the designated object.
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* exp_prag.adb, comperr.adb: Minor reformatting.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* exp_pakd.adb (Rj_Unchecked_Convert_To): Do not perform an
unchecked conversion if the source size is 0 (indicating that
its RM size is unknown). This will happen with packed arrays of
non-discrete types, in which case the component type is known
to match.
2016-05-02 Arnaud Charlet <charlet@adacore.com>
* debug.adb: Reserve -gnatd.V.
2016-05-02 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Process_Full_View): Remove from visibility
wrappers of synchronized types to avoid spurious errors with
their wrapped entity.
* exp_ch9.adb (Build_Wrapper_Spec): Do not generate the wrapper
if no interface primitive is covered by the subprogram and this is
not a primitive declared between two views; see Process_Full_View.
(Build_Protected_Sub_Specification): Link the dispatching
subprogram with its original non-dispatching protected subprogram
since their names differ.
(Expand_N_Protected_Type_Declaration):
If a protected subprogram overrides an interface primitive then
do not build a wrapper if it was already built.
* einfo.ads, einfo.adb (Original_Protected_Subprogram): New attribute.
* sem_ch4.adb (Names_Match): New subprogram.
* sem_ch6.adb (Check_Synchronized_Overriding): Moved
to library level and defined in the public part of the
package to invoke it from Exp_Ch9.Build_Wrapper_Spec
(Has_Matching_Entry_Or_Subprogram): New subprogram.
(Report_Conflict): New subprogram.
2016-05-02 Jerome Lambourg <lambourg@adacore.com>
* s-unstyp.ads: Code cleanups.
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Size_Too_Small_Error): Fix the error message format.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* exp_prag.adb (Expand_attributes_In_Consequence,
Expand_Attributes): If the prefix of'Old is an unconstrained type,
for example an unconstrained formal of the enclosing subprogram,
create an object declaration with an expression to obtain the
actual subtype of the temporary.
2016-05-02 Arnaud Charlet <charlet@adacore.com>
* comperr.adb (Delete_SCIL_Files): Add missing handling of
N_Subprogram_Declaration.
2016-05-02 Gary Dismukes <dismukes@adacore.com>
* exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, checks.adb, sem_attr.adb,
gnat1drv.adb, sem_ch4.adb, sem_ch13.adb: Minor reformatting and typo
fixes.
* sem_prag.adb, sem_ch12.adb: Minor typo fixes.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): The
function call may be wrapped in an explicit type conversion.
2016-05-02 Jerome Lambourg <lambourg@adacore.com>
* interfac.ads: use pragma No_Elaboration_Code_All.
* s-unstyp.ads: s-unstyp.ads: use pragma No_Elaboration_Code_All.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* sem.adb (Analyze: If node is an error node previously created
by the parser, disable expansion to prevent subsequent glitches
in error recovery.
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Alignment_Error): Removed.
(Get_Alignment_Value): Code cleanup.
2016-05-02 Tristan Gingold <gingold@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Use Has_Protected
to check for the no local protected objects restriction.
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb Anonymous_Master now uses Node35.
(Anonymous_Master): Update the assertion and node reference.
(Set_Anonymous_Master): Update the assertion and node reference.
(Write_Field35_Name): Add output for Anonymous_Master.
(Write_Field36_Name): The output is now undefined.
* einfo.ads Update the node and description of attribute
Anonymous_Master. Remove prior occurrences in entities as this
is now a type attribute.
* exp_ch3.adb (Expand_Freeze_Array_Type): Remove local variable
Ins_Node. Anonymous access- to-controlled component types no
longer need finalization masters. The master is now built when
a related allocator is expanded.
(Expand_Freeze_Record_Type): Remove local variable Has_AACC. Do not
detect whether the record type has at least one component of anonymous
access-to- controlled type. These types no longer need finalization
masters. The master is now built when a related allocator is expanded.
* exp_ch4.adb Remove with and use clauses for Lib and Sem_Ch8.
(Current_Anonymous_Master): Removed.
(Expand_N_Allocator): Call Build_Anonymous_Master to create a
finalization master for an anonymous access-to-controlled type.
* exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
Call routine Build_Anonymous_Master to create a finalization master
for an anonymous access-to-controlled type.
* exp_ch7.adb (Allows_Finalization_Master): New routine.
(Build_Anonymous_Master): New routine.
(Build_Finalization_Master): Remove formal parameter
For_Anonymous. Use Allows_Finalization_Master to determine whether
circumstances warrant a finalization master. This routine no
longer creates masters for anonymous access-to-controlled types.
(In_Deallocation_Instance): Removed.
* exp_ch7.ads (Build_Anonymous_Master): New routine.
(Build_Finalization_Master): Remove formal parameter For_Anonymous
and update the comment on usage.
* sem_util.adb (Get_Qualified_Name): New routines.
(Output_Name): Reimplemented.
(Output_Scope): Removed.
* sem_util.ads (Get_Qualified_Name): New routines.
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* debug.adb: Document the use of switch -gnatd.H.
* gnat1drv.adb (Adjust_Global_Switches): Set ASIS_GNSA mode when
-gnatd.H is present.
(Gnat1drv): Suppress the call to gigi when ASIS_GNSA mode is active.
* opt.ads: Add new option ASIS_GNSA_Mode.
* sem_ch13.adb (Alignment_Error): New routine.
(Analyze_Attribute_Definition_Clause): Suppress certain errors in
ASIS mode for attribute clause Alignment, Machine_Radix, Size, and
Stream_Size.
(Check_Size): Use routine Size_Too_Small_Error to
suppress certain errors in ASIS mode.
(Get_Alignment_Value): Use routine Alignment_Error to suppress certain
errors in ASIS mode.
(Size_Too_Small_Error): New routine.
2016-05-02 Arnaud Charlet <charlet@adacore.com>
* spark_xrefs.ads Description of the spark cross-references
clarified; small style fixes.
* lib-xref-spark_specific.adb (Add_SPARK_Scope,
Detect_And_Add_SPARK_Scope): consider protected types and bodies
as yet another scopes.
(Enclosing_Subprogram_Or_Library_Package): refactored using
Hristian's suggestions; added support for scopes of protected
types and bodies; fix for entries to return the scope of the
enclosing concurrent type, which is consistent with what is
returned for protected subprograms.
* sem_intr.adb: Minor style fix in comment.
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* lib-xref.ads, lib-xref-spark_specific.adb, get_spark_xrefs.adb,
put_spark_xrefs.adb: Minor reformatting.
2016-05-02 Doug Rupp <rupp@adacore.com>
* g-traceb.ads: Document traceback for ARM.
2016-05-02 Javier Miranda <miranda@adacore.com>
* exp_disp.adb (Make_Tags): Do not generate the
external name of interface tags adding the suffix counter since
it causes problems at link time when the IP routines are inlined
across units with optimization.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* einfo.ads, einfo.adb (Predicates_Ignared): new flag to indicate
that predicate checking is disabled for predicated subtypes in
the context of an Assertion_Policy pragma.
* checks.adb (Apply_Predicate_Check): Do nothing if
Predicates_Ignored is true.
* exp_ch3.adb (Expand_Freeze_Enumeration_Type): If
Predicates_Ignores is true, the function Rep_To_Pos does raise
an exception for invalid data.
* exp_ch4.adb (Expand_N_Type_Conversion): IF target is a predicated
type do not apply check if Predicates_Ignored is true.
* exp_ch5.adb (Expand_N_Case_Statement): If Predicates_Ignored
is true, sem_prag.adb:
* sem_ch3.adb (Analyze_Object_Declaration): If Predicates_Ignored
is true do not emit predicate check on initializing expression.
2016-05-02 Arnaud Charlet <charlet@adacore.com>
* get_spark_xrefs.adb (Get_Nat, Get_Name): Initialize variables when
they are declared; refine type of a counter from Integer to Natural.
* sem_ch5.adb, gnatcmd.adb, s-intman-posix.adb, eval_fat.adb,
prj.adb, sem_util.adb, s-intman-android.adb, prj-nmsc.adb, sem_ch8.adb,
exp_ch3.adb: Minor editing.
2016-05-02 Yannick Moy <moy@adacore.com>
* a-tigeli.adb (Get_Line): Always set Last prior to returning.
2016-05-02 Yannick Moy <moy@adacore.com>
* lib-xref.adb: Minor style fix in whitespace of declarations.
* put_spark_xrefs.adb (Put_SPARK_Xrefs): printing of strings
refactored without loops.
* put_spark_xrefs.ads (Write_Info_Str): new formal argument of
generic procedure.
* spark_xrefs.adb (Write_Info_Str): new actual in instantiation
of generic procedure.
2016-05-02 Arnaud Charlet <charlet@adacore.com>
* lib-xref-spark_specific.adb (Add_SPARK_Scope): add task type scope.
(Detect_And_Add_SPARK_Scope): detect and add task type scope.
(Enclosing_Subprogram_Or_Package): Respect boundaries of task
and entry declarations.
* spark_xrefs.ads: minor typo in comment.
2016-05-02 Arnaud Charlet <charlet@adacore.com>
* make.adb: Minor: avoid an exception when calling gnatmake with
no argument and gnatmake is built with checks on.
* lib-xref-spark_specific.adb: Minor code cleanup.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Normalize_Actuals): Take into account extra
actuals that may have been introduced previously. Normally extra
actuals are introduced when a call is expanded, but a validity
check may copy and reanalyze a call that carries an extra actual
(e.g. an accessibility parameter) before the call itself is
marked Analzyed, and the analysis of the copy has to be able to
cope with the added actual.
2016-05-02 Bob Duff <duff@adacore.com>
* sem_ch10.adb (Analyze_Compilation_Unit): Preserve
treeishness. Previous version had Context_Items shared between
the spec and body.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Aggr_Expression): For both array and
record cases, apply predicate check on component for expression
only if expression has been analyzed already. For expressions
that need to be duplicated when they cover multiple components,
resolution and predicate checking take place later.
2016-05-02 Olivier Hainque <hainque@adacore.com>
* a-direct.adb (Delete_Tree): Use full names to designate subdirs
and files therein, instead of local names after a change of
current directory.
2016-05-02 Thomas Quinot <quinot@adacore.com>
* freeze.adb (Check_Component_Storage_Order): Get full view of
component type.
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb:
Minor reformatting.
2016-05-02 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch4.adb (Find_Indexing_Operations): Use the underlying type
of the container base type in case the container is a subtype.
* sem_ch5.adb (Analyze_Iterator_Specification): Ensure that
the selector has an entity when checking for a component of a
mutable object.
2016-05-02 Arnaud Charlet <charlet@adacore.com>
Remove dead code.
* opt.ads (Latest_Ada_Only): New flag.
* sem_prag.adb, par-prag.adb: Ignore pragma Ada_xx under this flag.
* usage.adb, switch-c.adb: Disable support for -gnatxx under this flag.
* einfo.ads (Has_Predicates, Predicate_Function):
Clarify that Has_Predicates does not imply that Predicate_Function
will return a non-empty entity.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Qualified_Expression): Generate a predicate
check if type requires it.
* checks.adb (Apply_Predicate_Check): Disable checks in the
object declaration created for an expression with side-effects
that requires a predicate check to prevent infinite recursion
during expansion.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Process_Formals): Check properly the type of a
formal to determine whether a given convention applies to it.
2016-05-02 Doug Rupp <rupp@adacore.com>
* tracebak.c: Add incantations for arm-vxworks[67] traceback.
2016-05-02 Thomas Quinot <quinot@adacore.com>
* freeze.adb (Check_Component_Storage_Order): Make it a warning, not an
error, to have a component with implicit SSO within a composite type
that has explicit SSO.
2016-05-02 Bob Duff <duff@adacore.com>
* s-stposu.adb (Allocate_Any_Controlled): Don't lock/unlock twice.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* repinfo.adb (List_Entities): Make procedure recursive, to
provide representation information for subprograms declared
within subprogram bodies.
2016-05-02 Arnaud Charlet <charlet@adacore.com>
* exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
osint.adb: Remove dead code.
2016-05-02 Yannick Moy <moy@adacore.com>
* a-tigeli.adb (Get_Line): Fix bound for test to
decide when to compensate for character 0 added by call to fgets.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Allocator): If the expression does not
have a subtype indication and the type is an unconstrained tagged
type with defaulted discriminants, create an explicit constraint
for it during analysis to prevent out-of-order freezing actions
on generated classwide types.
2016-05-02 Javier Miranda <miranda@adacore.com>
* exp_ch5.adb (Expand_N_Assignment_Statement):
In the runtime check that ensures that the tags of source an
target match, add missing displacement of the pointer to the
objects if they cover interface types.
2016-05-02 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
base type for attribute when type is discrete: transformation
is not needed for such types, and leads to spurious errors if
the context is a case construct.
2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (elaborate_reference_1): Do not bother about
operand #2 for COMPONENT_REF.
* gcc-interface/utils2.c (gnat_save_expr): Likewise.
(gnat_protect_expr): Likewise.
(gnat_stabilize_reference_1): Likewise.
(gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
(get_inner_constant_reference): Likewise.
(gnat_invariant_expr): Likewise.
* gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.
2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Range_to_gnu): New static function.
(Raise_Error_to_gnu) <N_In>: Call it to translate the range.
(gnat_to_gnu) <N_In>: Likewise.
2016-04-30 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/Make-lang.in (ACATSCMD): New variable.
(check-acats): Use it.
(check_acats_targets): Likewise.
2016-04-28 Eric Botcazou <ebotcazou@adacore.com>
PR ada/70786
* a-textio.adb (Get_Immediate): Add missing 'not' in expression.
2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
* sem_aux.adb (Is_By_Reference_Type): Also return true for a tagged
incomplete type without full view.
* sem_ch6.adb (Exchange_Limited_Views): Change into a function and
return the list of changes.
(Restore_Limited_Views): New procedure to undo the transformation made
by Exchange_Limited_Views.
(Analyze_Subprogram_Body_Helper): Adjust call to Exchange_Limited_Views
and call Restore_Limited_Views at the end, if need be.
(Possible_Freeze): Do not delay freezing because of incomplete types.
(Process_Formals): Remove kludges for class-wide types.
* types.h (By_Copy_Return): Delete.
* gcc-interface/ada-tree.h (TYPE_MAX_ALIGN): Move around.
(TYPE_DUMMY_IN_PROFILE_P): New macro.
* gcc-interface/gigi.h (update_profiles_with): Declare.
(finish_subprog_decl): Likewise.
(get_minimal_subprog_decl): Delete.
(create_subprog_type): Likewise.
(create_param_decl): Adjust prototype.
(create_subprog_decl): Likewise.
* gcc-interface/decl.c (defer_limited_with): Rename into...
(defer_limited_with_list): ...this.
(gnat_to_gnu_entity): Adjust to above renaming.
(finalize_from_limited_with): Likewise.
(tree_entity_vec_map): New structure.
(gt_pch_nx): New helpers.
(dummy_to_subprog_map): New hash table.
(gnat_to_gnu_param): Set the SLOC here. Remove MECH parameter and
add FIRST parameter. Deal with the mechanism here instead of...
Do not make read-only variant of types. Simplify expressions.
In the by-ref case, test the mechanism before must_pass_by_ref
and also TYPE_IS_BY_REFERENCE_P before building the reference type.
(gnat_to_gnu_subprog_type): New static function extracted from...
Do not special-case the type_annotate_only mode. Call
gnat_to_gnu_profile_type instead of gnat_to_gnu_type on return type.
Deal with dummy return types. Likewise for parameter types. Deal
with by-reference types explicitly and add a kludge for null procedures
with untagged incomplete types. Remove assertion on the types and be
prepared for multiple elaboration of the declarations. Skip the whole
CICO processing if the profile is incomplete. Handle the completion of
a previously incomplete profile.
(gnat_to_gnu_entity) <E_Variable>: Rename local variable.
Adjust couple of calls to create_param_decl.
<E_Access_Subprogram_Type, E_Anonymous_Access_Subprogram_Type>:
Remove specific deferring code.
<E_Access_Type>: Also deal with E_Subprogram_Type designated type.
Simplify handling of dummy types and remove obsolete comment.
Constify a couple of variables. Do not set TYPE_UNIVERSAL_ALIASING_P
on dummy types.
<E_Access_Subtype>: Tweak comment and simplify condition.
<E_Subprogram_Type>: ...here. Call it and clean up handling. Remove
obsolete comment and adjust call to gnat_to_gnu_param. Adjust call to
create_subprog_decl.
<E_Incomplete_Type>: Add a couple of 'const' qualifiers and get rid of
inner break statements. Tidy up condition guarding direct use of the
full view.
(get_minimal_subprog_decl): Delete.
(finalize_from_limited_with): Call update_profiles_with on dummy types
with TYPE_DUMMY_IN_PROFILE_P set.
(is_from_limited_with_of_main): Delete.
(associate_subprog_with_dummy_type): New function.
(update_profile): Likewise.
(update_profiles_with): Likewise.
(gnat_to_gnu_profile_type): Likewise.
(init_gnat_decl): Initialize dummy_to_subprog_map.
(destroy_gnat_decl): Destroy dummy_to_subprog_map.
* gcc-interface/misc.c (gnat_get_alias_set): Add guard for accessing
TYPE_UNIVERSAL_ALIASING_P.
(gnat_get_array_descr_info): Minor tweak.
* gcc-interface/trans.c (gigi): Adjust calls to create_subprog_decl.
(build_raise_check): Likewise.
(Compilation_Unit_to_gnu): Likewise.
(Identifier_to_gnu): Accept mismatches coming from a limited context.
(Attribute_to_gnu): Remove kludge for dispatch table entities.
(process_freeze_entity): Do not retrieve old definition if there is an
address clause on the entity. Call update_profiles_with on dummy types
with TYPE_DUMMY_IN_PROFILE_P set.
* gcc-interface/utils.c (build_dummy_unc_pointer_types): Also set
TYPE_REFERENCE_TO to the fat pointer type.
(create_subprog_type): Delete.
(create_param_decl): Remove READONLY parameter.
(finish_subprog_decl): New function extracted from...
(create_subprog_decl): ...here. Call it. Remove CONST_FLAG and
VOLATILE_FLAG parameters and adjust.
(update_pointer_to): Also clear TYPE_REFERENCE_TO in the unconstrained
case.
2016-04-27 Arnaud Charlet <charlet@adacore.com>
* aa_util.adb, aa_util.ads: Removed, no longer used.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Pragma): An object
renaming declaration resulting from the expansion of an object
declaration is a suitable context for pragma Ghost.
2016-04-27 Doug Rupp <rupp@adacore.com>
* init.c: Refine last checkin so the only requirement is the
signaling compilation unit is compiled with the same mode as
the compilation unit containing the initial landing pad.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Valid_Default_Iterator): Better filter of illegal
specifications for Default_Iterator, including overloaded cases
where no interpretations are legal, and return types that are
not iterator types.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch5.adb (Expand_N_Assignment_Statement): Do not install
an accessibility check when the left hand side of the assignment
denotes a container cursor.
* exp_util.ads, exp_util.adb (Find_Primitive_Operations): Removed.
* sem_ch4.adb (Find_Indexing_Operations): New routine.
(Try_Container_Indexing): Code cleanup.
2016-04-27 Arnaud Charlet <charlet@adacore.com>
* sem_ch10.adb, sem_case.adb: Mark messages udner -gnatwr when needed.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* errout.adb, errutil.adb: Minor reformatting.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Specifications, case Pre/Post):
Check that the classwide version is illegal when the prefix is
an operation of an untagged synchronized type.
2016-04-27 Arnaud Charlet <charleT@adacore.com>
* sinput-l.ads, sem_ch13.adb: Minor editing.
2016-04-27 Doug Rupp <rupp@adacore.com>
* init.c (__gnat_adjust_context_for_raise) [arm-linux thumb]:
Bump the pc so the lower order bit is set.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_case.adb, sem_case.ads (NO_Op): If appropriate warning is
enabled, report an empty range in a case construct.
2016-04-27 Arnaud Charlet <charlet@adacore.com>
* sinput.ads, a-cfdlli.adb, a-crbtgo.adb, a-chtgop.adb, a-cbhama.adb,
a-rbtgbo.adb, a-crdlli.adb, a-chtgbo.adb: Minor editing.
2016-04-27 Bob Duff <duff@adacore.com>
* a-chtgop.adb (Adjust): Zero the tampering counts on assignment,
as is done for the other containers.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* ghost.adb (In_Subprogram_Body_Profile): New routine.
(Is_OK_Declaration): Treat an unanalyzed expression
function as an OK context. Treat a reference to a Ghost entity
as OK when it appears within the profile of a subprogram body.
2016-04-27 Bob Duff <duff@adacore.com>
* errout.ads: Document the fact that informational messages
don't have to be warnings.
* errout.adb (Error_Msg_Internal): In statistics counts, deal
correctly with informational messages that are not warnings.
(Error_Msg_NEL): Remove useless 'if' aroung Set_Posted, because
Set_Posted already checks for errors and ignores others.
* erroutc.adb (Prescan_Message): Set Is_Serious_Error to False
if Is_Info_Msg; the previous code was assuming that Is_Info_Msg
implies Is_Warning_Msg.
* errutil.adb (Error_Msg): In statistics counts, deal correctly
with informational messages that are not warnings.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_util.ads, sem_util.adb (Is_Null_Record_Type): New predicate
to determine whether a record type is a null record.
* sem_ch3.adb (Analyze_Object_Declaration): If the type is a
null record and there is no expression in the declaration,
no predicate check applies to the object.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch7.adb (Analyze_Package_Body_Helper): The body of an
instantiated package should not cause freezing of previous contracts.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_dim.adb (Analyze_Dimension): Handle subtype declarations
that do not come from source.
(Analyze_Dimension_Subtype_Declaration): Allow confirming
dimensions on subtype entity, either inherited from base type
or provided by aspect specification.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
Add scalar formal object Zero, to allow detection and report
when the matrix is singular.
* s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
Raise Constraint_Error if the Forward_Eliminate pass has
determined that determinant is Zero.o
* s-ngrear.adb (Solve): Add actual for Zero in corresponding
instantiations.
* s-ngcoar.adb (Solve): Ditto.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb: Minor reformatting.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_dim.adb (Analyze_Dimension, case N_Identifier): Check
that identifier has a usable type before analysis, to handle
properly identifiers introduced after some lexical/syntactic
recovery that created new identifiers.
2016-04-27 Bob Duff <duff@adacore.com>
* a-coinve.adb, a-comutr.adb, a-conhel.adb, a-convec.adb,
exp_util.adb: Remove assertions that can fail in obscure cases when
assertions are turned on but tampering checks are turned off.
2016-04-27 Javier Miranda <miranda@adacore.com>
* exp_ch6.adb (Add_Call_By_Copy_Code,
Add_Simple_Call_By_Copy_Code, Expand_Actuals): Handle formals
whose type comes from the limited view.
2016-04-27 Yannick Moy <moy@adacore.com>
* a-textio.adb: Complete previous patch.
2016-04-27 Yannick Moy <moy@adacore.com>
* inline.adb (Expand_Inlined_Call): Use Cannot_Inline instead of
Error_Msg_N to issue message about impossibility to inline call,
with slight change of message.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* exp_spark.adb (Expand_Potential_Renaming): Removed.
(Expand_SPARK): Update the call to expand a potential renaming.
(Expand_SPARK_Potential_Renaming): New routine.
* exp_spark.ads (Expand_SPARK_Potential_Renaming): New routine.
* sem.adb Add with and use clauses for Exp_SPARK.
(Analyze): Expand a non-overloaded potential renaming for SPARK.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Constrain_Discriminated_Type): In an instance,
check full view for the presence of defaulted discriminants,
even when the partial view of a private type has no visible and
no unknown discriminants.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* lib-xref.adb, exp_ch3.adb: Minor reformatting.
2016-04-27 Nicolas Roche <roche@adacore.com>
* rtinit.c: Add weak symbol __gnat_do_argv_expansion.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Process_Atomic_Independent_Shared_Volatile): Code
cleanup. Check the original node when trying to determine the node kind
of pragma Volatile's argument to account for untagged derivations
where the type is transformed into a constrained subtype.
2016-04-27 Olivier Hainque <hainque@adacore.com>
* mkdir.c (__gnat_mkdir): Rework the vxworks section to use a
consistent posix interface on the caller side.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_ch10.adb (Build_Limited_View, Decorate_Type): If this
is a limited view of a type, initialize the Limited_Dependents
field to catch misuses of the type in a client unit.
2016-04-27 Thomas Quinot <quinot@adacore.com>
* a-strunb-shared.adb (Finalize): add missing Reference call.
* s-strhas.adb: minor grammar fix and extension of comment
* sem_ch8.adb: minor whitespace fixes
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* lib-xref.adb (Get_Type_Reference): Handle properly the case
of an object declaration whose type definition is a class-wide
subtype and whose expression is a function call that returns a
classwide type.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.ads, sem_util.adb (Output_Entity): New routine.
(Output_Name): New routine.
2016-04-27 Bob Duff <duff@adacore.com>
* exp_ch3.adb (Rewrite_As_Renaming): Disable previous change for now.
2016-04-27 Vincent Celier <celier@adacore.com>
* gnatcmd.adb: For "gnat ls -V -P", recognize switch
--unchecked-shared-lib-imports and set the flag
Opt.Unchecked_Shared_Lib_Imports accordingly.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pre_Post_Condition_In_Decl_Part):
A generic subprogram is never a primitive operation, and thus
a classwide condition for it is not legal.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_aggr.adb, sem_dim.adb, sem_dim.ads, einfo.adb: Minor
reformatting.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Flag_Effectively_Volatile_Objects): New routine.
(Resolve_Actuals): Flag effectively volatile objects with enabled
property Async_Writers or Effective_Reads as illegal.
* sem_util.adb (Is_OK_Volatile_Context): Comment reformatting.
2016-04-27 Javier Miranda <miranda@adacore.com>
* exp_ch3.adb (Make_Predefined_Primitive_Specs):
Do not generate the profile of the equality operator if it has
been explicitly defined as abstract in the parent type. Required
to avoid reporting an spurious error.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* sem_dim.ads, sem_dim.adb (Check_Expression_Dimensions): New
procedure to compute the dimension vector of a scalar expression
and compare it with the dimensions if its expected subtype. Used
for the ultimate components of a multidimensional aggregate,
whose components typically are themselves aggregates that are
expanded separately. Previous to this patch, dimensionality
checking on such aggregates generated spurious errors.
* sem_aggr.adb (Resolve_Array_Aggregate): Use
Check_Expression_Dimensions when needed.
2016-04-27 Javier Miranda <miranda@adacore.com>
* einfo.ads, einfo.adb (Corresponding_Function): New attribute
(applicable to E_Procedure).
(Corresponding_Procedure): New attribute (applicable to E_Function).
* exp_util.adb (Build_Procedure_Form): Link the function with
its internally built proc and viceversa.
* sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
attribute Rewritten_For_C and Corresponding_Procedure to the body.
* exp_ch6.adb (Rewritten_For_C_Func_Id): Removed.
(Rewritten_For_C_Proc_Id): Removed.
* exp_unst.adb (Note_Uplevel_Ref): Use the new attribute to
locate the corresponding procedure.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Analyze_Aspect_Export_Import): Signal that there is no
corresponding pragma.
2016-04-27 Bob Duff <duff@adacore.com>
* exp_ch3.adb: Minor comment improvement.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): If the
return type is an untagged limited record with only access
discriminants and no controlled components, the return value does not
need to use the secondary stack.
2016-04-27 Javier Miranda <miranda@adacore.com>
* exp_util.adb (Remove_Side_Effects): When
generating C code handle object declarations that have
discriminants and are initialized by means of a call to a
function.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* a-textio.adb (Get_Line function): Handle properly the case of
a line that has the same length as the buffer (or a multiple
thereof) and there is no line terminator.
* a-tigeli.adb (Get_Line procedure): Do not store an end_of_file
in the string when there is no previous line terminator and we
need at most one additional character.
2016-04-27 Arnaud Charlet <charlet@adacore.com>
* s-rident.ads: Make No_Implicit_Loops non partition wide.
2016-04-27 Arnaud Charlet <charlet@adacore.com>
* sem_ch11.adb (Analyze_Handled_Statements): check useless
assignments also in entries and task bodies, not only in
procedures and declaration blocks.
* sem_ch5.adb (Analyze_Block_Statement): check useless
assignements in declaration blocks as part of processing their
handled statement sequence, just like it was done for procedures
and now is also done for entries and task bodies.
* sem_warn.adb (Warn_On_Useless_Assignment): detect boundries
of entries and task bodies just like of procedures.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb (Is_Volatile_Function): Recognize
a function declared within a protected type as well as the
protected/unprotected version of a function.
2016-04-27 Bob Duff <duff@adacore.com>
* exp_ch3.adb (Expand_N_Object_Declaration): Rewrite an object
declaration of the form "X : T := Func (...);", where T is
controlled, as a renaming.
* a-strunb-shared.adb (Finalize): Set the Unbounded_String Object
to be an empty string, instead of null-ing out the Reference.
* exp_util.adb (Needs_Finalization): Remove redundant code.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.ads Aspects Export and Import do not require delay. They
were classified as delayed aspects, but treated as non-delayed
by the analysis of aspects.
* freeze.adb (Copy_Import_Pragma): New routine.
(Wrap_Imported_Subprogram): Copy the import pragma by first
resetting all semantic fields to avoid an infinite loop when
performing the copy.
* sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add
comment on the processing of aspects Export and Import
at the freeze point.
(Analyze_Aspect_Convention: New routine.
(Analyze_Aspect_Export_Import): New routine.
(Analyze_Aspect_External_Link_Name): New routine.
(Analyze_Aspect_External_Or_Link_Name): Removed.
(Analyze_Aspect_Specifications): Factor out the analysis of
aspects Convention, Export, External_Name, Import, and Link_Name
in their respective routines. Aspects Export and Import should
not generate a Boolean pragma because their corresponding pragmas
have a very different syntax.
(Build_Export_Import_Pragma): New routine.
(Get_Interfacing_Aspects): New routine.
2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
* inline.adb (Add_Inlined_Body): Overhaul implementation,
robustify handling of -gnatn1, add special treatment for
expression functions.
2016-04-27 Doug Rupp <rupp@adacore.com>
* g-traceb.ads: Update comment.
* exp_ch2.adb: minor style fix in object declaration
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* sem_elab.adb (Check_Internal_Call): Do not
consider a call when it appears within pragma Initial_Condition
since the pragma is part of the elaboration statements of a
package body and may only call external subprograms or subprograms
whose body is already available.
(Within_Initial_Condition): New routine.
2016-04-27 Ed Schonberg <schonberg@adacore.com>
* exp_util.adb (Build_Procedure_Form): Prevent double generation
of the procedure form when dealing with an expression function
whose return type is an array.
* sem_ch3.adb: Fix out-of order Has_Predicates setting.
* exp_ch6.adb: Proper conversion for inherited operation in C.
* sem_ch6.adb: Code cleanup.
2016-04-27 Hristian Kirtchev <kirtchev@adacore.com>
* lib-xref.ads, sem_ch10.adb: minor style fix in comment
* g-socket.adb: Minor reformatting.
* sinfo.ads: Minor comment correction.
* sem_warn.ads: minor grammar fix in comment
2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (gnat_to_gnu_entity): Adjust prototype.
(maybe_pad_type): Adjust comment.
(finish_record_type): Likewise.
(rest_of_record_type_compilation): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity): Change DEFINITION type
parameter from integer to boolean. Adjust recursive calls.
<E_Subprogram_Type>: Use copy_type and remove redundant assignments.
<E_Signed_Integer_Subtype>: Adjust comment. Remove call to
rest_of_record_type_compilation. Set TYPE_PADDING_P flag earlier.
Pass false to finish_record_type. Set the debug type later.
<E_Record_Subtype>: Remove call to rest_of_record_type_compilation.
(gnat_to_gnu_component_type): Fix formatting.
(gnat_to_gnu_field_decl): Adjust call to gnat_to_gnu_entity.
(gnat_to_gnu_type): Likewise.
* gcc-interface/trans.c (Identifier_to_gnu): Likewise.
(Loop_Statement_to_gnu): Likewise.
(Subprogram_Body_to_gnu): Likewise.
(Exception_Handler_to_gnu_fe_sjlj): Likewise.
(Exception_Handler_to_gnu_gcc): Likewise.
(Compilation_Unit_to_gnu): Likewise.
(gnat_to_gnu): Likewise.
(push_exception_label_stack): Likewise.
(elaborate_all_entities_for_package): Likewise.
(process_freeze_entity): Likewise.
(process_decls): Likewise.
(process_type): Likewise.
* gcc-interface/utils.c (struct deferred_decl_context_node): Tweak.
(maybe_pad_type): Adjust comments. Set the debug type later. Remove
call to rest_of_record_type_compilation.
(rest_of_record_type_compilation): Use copy_type.
(copy_type): Use correctly typed constants.
(gnat_signed_or_unsigned_type_for): Use copy_type.
* gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
(build_goto_raise): Adjust call tognat_to_gnu_entity.
2016-04-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c (gnat_init): Do not call
internal_reference_types.
2016-04-27 Svante Signell <svante.signell@gmail.com>
* gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
* s-osinte-gnu.ads: Small tweaks.
* s-osinte-gnu.adb: New file.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Match_Constituent): Treat a constant as a legal
constituent even if it is not to prevent spurious errors.
2016-04-21 Gary Dismukes <dismukes@adacore.com>
* sem_ch4.adb: Minor typo fixes and reformatting.
2016-04-21 Dmitriy Anisimkov <anisimko@adacore.com>
* g-calend.ads (No_Time): The same value in any timezone.
* g-socket.adb (Raise_Host_Error): Remove ending
dot from original error message before append colon delimited
host name.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb: Code cleanup.
* sem_ch6.adb: Code cleanup.
(Is_Matching_Limited_View): New routine.
(Matches_Limited_With_View): Reimplemented.
* sem_ch10.adb (Decorate_Type): Code cleanup.
2016-04-21 Doug Rupp <rupp@adacore.com>
* tracebak.c (PPC ELF): Add macro defs for lynxos178e.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Try_Container_Indexing): If there are overloaded
indexing functions, collect all overloadings of the call firts,
and then transfer them to indexing node, to prevent interleaving
of the set of interpretations of the nodes involved.
* sem_res.adb (Resolve): Suppress cascaded errors that report
ambiguities when one of the actuals in an overloaded generatlized
indexing operation is illegal and has type Any_Type, as is done
for similar cascaded errors in subprogram calls.
(Valid_Tagged_Conversion): Cleanup conversion checks when one
of the types involved is a class-wide subtype.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch12.adb (Load_Parent_Of_Generic): When looking for the
subprogram declaration within a wrapper package, skip pragmas
that may have been generated by aspect specifications on the
generic instance.
2016-04-21 Javier Miranda <miranda@adacore.com>
* exp_aggr.adb (Component_Not_OK_For_Backend): Generating C
code return True for array identifiers since the backend needs
to initialize such component by means of memcpy().
2016-04-21 Arnaud Charlet <charlet@adacore.com>
* a-tasatt.adb, a-tasatt.ads (Fast_Path): Rewritten to avoid reading
potentially uninitialized memory.
* sem_ch3.adb: Minor style fix in comment.
2016-04-21 Arnaud Charlet <charlet@adacore.com>
* gnat_rm.texi, gnat_ugn.texi,
doc/gnat_ugn/gnat_project_manager.rst,
doc/gnat_ugn/building_executable_programs_with_gnat.rst,
doc/gnat_ugn/gnat_and_program_execution.rst,
doc/gnat_ugn/gnat_utility_programs.rst,
doc/gnat_ugn/the_gnat_compilation_model.rst,
doc/gnat_rm/implementation_defined_attributes.rst,
doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
doc/gnat_rm/implementation_defined_pragmas.rst,
doc/gnat_rm/the_gnat_library.rst,
doc/gnat_rm/implementation_defined_aspects.rst: Update doc.
* doc/Makefile: Cleanups.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* exp_pakd.adb, sem_ch13.adb: Minor reformatting.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* exp_dbug.adb, exp_dbug.ads (Qualify_Entity_Name): Add suffixes to
disambiguate local variables that may be hidden from inner visibility
by nested block declarations or loop variables.
2016-04-21 Jerome Lambourg <lambourg@adacore.com>
* s-soflin.adb: Initialize the Stack_Limit global variable.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* lib-writ.adb: Minor reformatting.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* exp_pakd.adb (Compute_Number_Components): New function to
build an expression that computes the number of a components of
an array that may be multidimensional.
(Expan_Packed_Eq): Use it.
2016-04-21 Arnaud Charlet <charlet@adacore.com>
* g-traceb.ads: Update list of supported platforms.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Add_Predicates): if the type is declared in
an inner package it may be frozen outside of the package, and
the generated pragma has not been analyzed yet, the expression
for the predicate must be captured and added to the predicate
function at this point.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Analyze_Package_Body_Contract): Do not check
for a missing package refinement because 1) packages do not have
"refinement" and 2) the check for proper state refinement is
performed in a different place.
* einfo.adb (Has_Non_Null_Visible_Refinement): Reimplemented.
(Has_Null_Visible_Refinement): Reimplemented.
* sem_ch3.adb (Analyze_Declarations): Determine whether all
abstract states have received a refinement and if not, emit
errors.
* sem_ch7.adb (Analyze_Package_Declaration): Code
cleanup. Determine whether all abstract states of the
package and any nested packages have received a refinement
and if not, emit errors.
(Requires_Completion_In_Body): Add new formal parameter
Do_Abstract_States. Update the comment on usage. Propagate the
Do_Abstract_States flag to all Unit_Requires_Body calls.
(Unit_Requires_Body): Remove formal
parameter Ignore_Abstract_States. Add new formal paramter
Do_Abstract_States. Propagate the Do_Abstract_States flag to
all Requires_Completion_In calls.
* sem_ch7.ads (Unit_Requires_Body): Remove formal
parameter Ignore_Abstract_States. Add new formal paramter
Do_Abstract_States. Update the comment on usage.
* sem_ch9.adb (Analyze_Single_Protected_Declaration): Do
not initialize the constituent list as this is now done on a
need-to-add-element basis.
(Analyze_Single_Task_Declaration):
Do not initialize the constituent list as this is now done on
a need-to-add-element basis.
* sem_ch10.adb (Decorate_State): Do not initialize the constituent
lists as this is now done on a need-to-add-element basis.
* sem_prag.adb (Analyze_Constituent): Set the
refinement constituents when adding a new element.
(Analyze_Part_Of_In_Decl_Part): Set the Part_Of constituents when
adding a new element.
(Analyze_Part_Of_Option): Set the Part_Of
constituents when adding a new element.
(Analyze_Pragma): Set the Part_Of constituents when adding a new
element.
(Check_Constituent_Usage (all versions)): Reimplemented.
(Collect_Constituent): Set the refinement constituents when adding
a new element.
(Create_Abstract_State): Do not initialize the
constituent lists as this is now done on a need-to-add-element basis.
(Propagate_Part_Of): Set the Part_Of constituents when
adding a new element.
* sem_util.adb (Check_State_Refinements): New routine.
(Has_Non_Null_Refinement): Reimplemented.
(Has_Null_Refinement): Reimplemented.
(Requires_State_Refinement): Removed.
* sem_util.ads (Check_State_Refinements): New routine.
(Requires_State_Refinement): Removed.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* lib-writ.adb, sem_ch6.adb: Minor reformatting and code cleanup.
* sem.adb: Fix comment.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Subtype_Declaration): A subtype
declaration with no aspects, whose subtype_mark is a subtype
with predicates, inherits the list of subprograms for the type.
2016-04-21 Arnaud Charlet <charlet@adacore.com>
* exp_aggr.adb (Has_Per_Object_Constraint): Refine previous
change.
2016-04-21 Thomas Quinot <quinot@adacore.com>
* g-socket.adb (Raise_Host_Error): Include additional Name parameter.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* lib-writ.adb (Write_ALI): Do not record in ali file units
that are present in the files table but not analyzed. These
units are present because they appear in the context of units
named in limited_with clauses, and the unit being compiled does
not depend semantically on them.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Simplify code to
create the procedure body for an function returning an array type,
when generating C code. Reuse the subprogram body rather than
creating a new one, both as an efficiency measure and because
in an instance the body may contain global references that must
be preserved.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb, exp_attr.adb, exp_ch6.adb, exp_aggr.adb: Minor
reformatting.
2016-04-21 Javier Miranda <miranda@adacore.com>
* exp_aggr.adb (Component_Check): Extend
the check that verifies that the aggregate has no function
calls to handle transformations performed by the frontend.
(Ultimate_Original_Expression): New subprogram.
2016-04-21 Philippe Gil <gil@adacore.com>
* krunch.adb (Krunch): Fix krunching of i-java.
2016-04-21 Arnaud Charlet <charlet@adacore.com>
* exp_ch8.adb (Evaluation_Required): Always return
True when Modify_Tree_For_C.
2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
* gnatlink.adb (Gnatlink): Robustify detection of Windows target.
* alloc.ads: Minor comment fixes.
* einfo.ads: Fix typo.
2016-04-21 Arnaud Charlet <charlet@adacore.com>
* exp_aggr.adb (Component_Not_OK_For_Backend): Redo previous
changes to handle all cases of components depending on the
discriminant, not just string literals.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Subtype_Declaration): If the subtype
declaration is the generated declaration for a generic actual,
inherit predicates from the actual if it is a predicated subtype.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Rewrite_Function_Call_For_C): If the function is
inherited and its result is controlling, introduce a conversion
on the actual for the corresponding procedure call, to avoid
spurious type errors.
2016-04-21 Jerome Lambourg <lambourg@adacore.com>
* krunch.adb (Krunch): Fix krunching of i-vxworks.
2016-04-21 Gary Dismukes <dismukes@adacore.com>
* exp_aggr.adb: Minor reformatting and code cleanup.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Resolve_Name): Omit quantified expressions from
resolution, because they introduce local names. Full resolution
will take place when predicate function is constructed.
2016-04-21 Arnaud Charlet <charlet@adacore.com>
* exp_aggr.adb (Component_Not_OK_For_Backend): Refine previous
change to take into account Per_Object_Constraint field rather
than special casing strings.
* exp_ch6.adb: Fix typo in Replace_Returns.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch5.adb: Minor reformatting.
2016-04-21 Arnaud Charlet <charlet@adacore.com>
* exp_aggr.adb (Backend_Processing_Possible): Return False
when generating C and aggregate contains function calls.
2016-04-21 Tristan Gingold <gingold@adacore.com>
* krunch.adb (Krunch): Only partially krunch children of
Interfaces that aren't known.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Make_Inline): Handle properly the instantiation
of a generic subpprogram that carries an Inline aspect. Place
inline info on the anonymous subprogram that is constructed in
the wrapper package.
(Analyze_Pragma, case Pure): Do not check placement if pragma
appears within an instantiation, which can be nested at any level.
* sem_ch12.adb (Analyze_Instance_And_Renamings): Do not copy Freeze
node from anonymous subprogram to its visible renaming. The
freeze node will be constructed if the subprogram carries
delayed aspects.
(Set_Global): Preserve dimension information if present (from
code reading).
2016-04-21 Vasiliy Fofanov <fofanov@adacore.com>
* gnatlink.adb: Change wording of the warning message on
problematic filenames to be more neutral. Add a new substring
"patch" introduced on Windows 10.
2016-04-21 Philippe Gil <gil@adacore.com>
* tracebak.c (__gnat_backtrace): handle bad RIP values (win64 only)
2016-04-21 Javier Miranda <miranda@adacore.com>
* exp_aggr.adb (Component_Not_OK_For_Backend): Return true for string
literals.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb (Has_Non_Null_Abstract_State): New routine.
* einfo.ads New synthesized attribute
Has_Non_Null_Abstract_State along with occurrences in entities.
(Has_Non_Null_Abstract_State): New routine.
* sem_ch7.adb (Unit_Requires_Body): Add local variable
Requires_Body. A package declaring an abstract state requires
a body only when the state is non-null and the package contains
at least one other construct that requires completion in a body.
* sem_util.adb (Mode_Is_Off): Removed.
(Requires_State_Refinement): Remove an obsolete check. Code
cleanup.
2016-04-21 Bob Duff <duff@adacore.com>
* sem_attr.adb (Analyze_Attribute): In processing
the 'Old attribute, a warning is given for infinite recursion. Fix
the code to not crash when the prefix of 'Old denotes a protected
function.
* sem_ch5.adb (Analyze_Iterator_Specification):
Avoid calling Is_Dependent_Component_Of_Mutable_Object in cases
where the parameter would not be an object.
2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
* sem_eval.adb (Compile_Time_Compare): Be prepared for an empty
Etype or Underlying_Type of the operands.
2016-04-21 Eric Botcazou <ebotcazou@adacore.com>
* atree.adb (Print_Statistics): Protect against overflows and
print the memory consumption in bytes.
* table.adb (Reallocate): Do the intermediate calculation of the new
size using the Memory.size_t type.
2016-04-21 Gary Dismukes <dismukes@adacore.com>
* exp_attr.adb (Is_Inline_Floating_Point_Attribute): Suppress
expansion of Attribute_Machine and Attribute_Model for AAMP.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* freeze.adb: Disable previous change for now.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Find_Selected_Component): If prefix has an
access type and designated type is a limited view, introduce
an explicit dereference before continuing the analysis, and
set its type to the non-limited view of the designated type,
if we are in context where it is available.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* freeze.adb: Freeze profile in ASIS mode.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* sem_aux.ads, sem_aux.adb (Has_Rep_Item): New variant.
* sem_util.adb (Inherit_Rep_Item_Chain): Reimplemented.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb: Minor reformatting.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb: Minor comment update.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* freeze.ads, freeze.adb (Freeze_Entity, Freeze_Before): Add
boolean parameter to determine whether freezing an overloadable
entity freezes its profile as well. This is required by
AI05-019. The call to Freeze_Profile within Freeze_Entity is
conditioned by the value of this flag, whose default is True.
* sem_attr.adb (Resolve_Attribute, case 'Access): The attribute
reference freezes the prefix, but it the prefix is a subprogram
it does not freeze its profile.
2016-04-21 Javier Miranda <miranda@adacore.com>
* exp_util.adb (Build_Procedure_Form): No action needed for
subprogram renamings since the backend can generate the call
using the renamed subprogram. This leaves the tree more clean
to the backend.
* exp_ch6.adb (Expand_Call): Extend previous patch for
rewritten-for-c entities to handle subprogram renamings.
(Rewrite_Function_Call_For_C): Handle subprogram renamings.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb: Code cleanup.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
created for SPARK_To_C, the entity must remain invisible so it
does not overload subsequent references to the original function.
* exp_ch6.adb (Build_Procedure_Body_Form, Replace_Returns):
Handle Extended_Return_Statements by replacing it with a block
with assignments and a simple return statement.
* exp_util.adb (Build_Procedure_Form): Make procedure entity
invisible after analyzing declaration, to prevent improper
overloading.
2016-04-21 Javier Miranda <miranda@adacore.com>
* sem_ch6.adb (Build_Subprogram_Declaration): Propagate the
attribute Rewritten_For_C to the body since since the expander
may generate calls using that entity.
* exp_ch6.adb (Expand_Call): For internally generated
calls ensure that they reference the entity of the spec
of the called function.
(Rewritten_For_C_Func_Id): New subprogram.
(Rewritten_For_C_Proc_Id): New subprogram.
(Rewrite_Function_Call_For_C): Invoke the new subprogram to
ensure that we skip freezing entities.
* exp_util.adb (Build_Procedure_Form): No action needed if the
procedure was already built.
2016-04-21 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb, exp_util.adb, sem_ch13.adb, exp_unst.adb: Minor
reformatting.
2016-04-21 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Denotes_Iterator): Use root type to determine
whether the ultimate ancestor is the predefined iterator
interface pakage.
* exp_ch5.adb (Expand_Iterator_Over_Container): simplify code
and avoid reuse of Pack local variable.
2016-04-21 Olivier Hainque <hainque@adacore.com>
* system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
system-vxworks-ppc.ads, system-vxworks-m68k.ads,
system-vxworks-mips.ads, system-vxworks-x86.ads: Define
Executable_Extension to ".out".
2016-04-21 Javier Miranda <miranda@adacore.com>
* frontend.adb: Update call to Unnest_Subprograms.
* exp_ch6.ads, exp_ch6.adb, exp_unst.ads, exp_unst.adb
(Unnest_Subprograms): Moved to package exp_unst.
* exp_unst.ads (Unnest_Subprogram): Moved to the body of the
package.
* exp_dbug.adb (Qualify_Entity_Name): Enable qualification of
enumeration literals when generating C code.
2016-04-21 Javier Miranda <miranda@adacore.com>
* frontend.adb: Remove call to initialize Exp_Ch6.
* exp_ch6.ads, exp_ch6.adb (Initialize): removed.
(Unest_Entry/Unest_Bodies): Removed.
(Unnest_Subprograms): Code cleanup.
2016-04-21 Arnaud Charlet <charlet@adacore.com>
* set_targ.adb (Read_Target_Dependent_Values):
close target description file once its contents is read.
* s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File
and Stderr_File): Close local file descriptors before spawning
child process.
* exp_util.adb (Containing_Package_With_Ext_Axioms): Limit scope of
local variables to make the code easier to understand and avoid
duplicated calls to Parent and Generic_Parent.
2016-04-20 Bob Duff <duff@adacore.com>
* s-os_lib.ads: Minor comment fix.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_N_Assignment_Statement): Do no generate
a discriminant check for a type whose partial view has unknown
discriminants when the full view has discriminants with defaults.
2016-04-20 Javier Miranda <miranda@adacore.com>
* exp_util.adb (Remove_Side_Effects): When generating C code
remove side effect of type conversion of access to unconstrained
array type.
(Side_Effect_Free): Return false for the type
conversion of access to unconstrained array type when generating
C code.
* sem_res.adb (Resolved_Type_Conversion): Remove side effects
of access to unconstrained array type conversion when generating
C code.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Build_Predicate_Function_Declaration): New
function, to construct the declaration of a predicate function
at the end of the current declarative part rather than at the
(possibly later) freeze point of the type. This also allows uses
of a type with predicates in instantiations elsewhere.
(Resolve_Aspect_Expression): New procedure to detect visiblity
errors in aspect expressions, at the end of the declarative part
that includes the type declaration.
* sem_ch3.adb (Complete_Private_Subtype): Propagate properly the
predicate function from private to full view.
* einfo.adb (Predicate_Function): Refine search for predicate
function when type has a full view and predicate function may
be defined on either view.
2016-04-20 Javier Miranda <miranda@adacore.com>
* frontend.adb: Passing the root of the tree to
Unnest_Subprograms().
* exp_ch6.adb (Expand_N_Subprogram_Body): Remove code that
took care of adding subprograms to the Unest_Bodies table since
performing such action too early disables the ability to process
generic instantiations.
(Unnest_Subprograms): Adding parameter.
(Search_Unnesting_Subprograms): New subprogram.
* exp_ch6.ads (Unnest_Subrograms): Update documentation.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb, freeze.adb, sem_util.adb: Minor reformatting.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* exp_unst.adb (Check_Static_Type): For a private type, check
full view.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Check_Type): Reject an attribute reference in
an aspect expression, when the prefix of the reference is the
current instance of the type to which the aspect applies.
2016-04-20 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about
hiding unless we're actually hiding something. The previous
code would (for example) warn about a "<" on a record type
because it incorrectly thought it was hiding the "<" on Boolean
in Standard. We need to check that the homonym S is in fact a
homograph of a predefined operator.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* exp_util.ads, exp_util.adb (Build_Procedure_Form): Moved here
from exp_ch6.adb, for use in SPARK_To_C mode when creating the
procedure equivalent to a function returning an array, when this
construction is deferred to the freeze point of the function.
* sem_util.adb (Is_Unchecked_Conversion_Instance): Include a
function that renames an instance of Unchecked_Conversion.
* freeze.adb (Freeze_Subprogram): Generate the proper procedure
declaration for a function returning an array.
* exp_ch6.adb (Build_Procedure_Form): Moved to exp_util.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
New predicate to determine that in a context with full run-time,
a function call is an expansion of a reference to attribute
Priority.
* sem_ch5.adb (Analyze_Function_Call): use it.
* exp_ch5.adb (Expand_N_Subprogram_Call): use it.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb Flag286 is now used as Is_Exception_Handler.
(Is_Exception_Handler): New routine.
(Set_Is_Exception_Handler): New routine.
(Write_Entity_Flags): Output the status of Is_Exception_Handler.
* einfo.ads New attribute Is_Exception_Handler along with
occurrences in entities.
(Is_Exception_Handler): New routine along with pragma Inline.
(Set_Is_Exception_Handler): New routine along with pragma Inline.
* exp_ch7.adb (Make_Transient_Block): Ignore blocks generated
for exception handlers with a choice parameter.
* sem_ch11.adb (Analyze_Exception_Handlers): Mark the scope
generated for a choice parameter as an exception handler.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Build_Derived_Access_Type): Remove dead code.
(Constrain_Discriminated_Type): In an instance, if the type has
unknown discriminants, use its full view.
(Process_Subtype): Check that the base type is private before
adding subtype to Private_Dependents list.
2016-04-20 Bob Duff <duff@adacore.com>
* sem_ch13.adb: Minor comment fix.
2016-04-20 Yannick Moy <moy@adacore.com>
* sem_ch4.adb: Fix typos in comments.
* sem_res.adb (Resolve_Case_Expression): Fix type of case alternatives.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component): A reference to the
current instance of a task type is legal if the prefix is an
expression of that task type and the selector is an entry or
entry family.
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* a-cfdlli.ads (List): Type is no longer tagged, not needed. Move
varsize field at the end for efficiency.
2016-04-20 Vincent Celier <celier@adacore.com>
* gnatcmd.adb: Do not invoke gprls when the invocation of "gnat
ls" includes the switch -V.
* clean.adb: "<target>-gnatclean -P" now calls "gprclean
--target=<target>"
* make.adb: "<target>-gnatmake -P" now calls "gprbuild
--target=<target>"
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb (Qualify_Type): Do not perform
partial qualification when the immediate scope is a generic unit.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* exp_unst.adb: Minor reformatting.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_Allocator_Expression): Ensure that the
tag assignment and adjustment preceed the accessibility check.
* exp_ch7.adb (Is_Subprogram_Call): Reimplemented.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* exp_prag.adb (Expand_Attributes): Ensure that
the temporary used to capture the value of attribute 'Old's
prefix is properly initialized.
2016-04-20 Javier Miranda <miranda@adacore.com>
* exp_unst.ads, exp_unst.adb (Get_Level, Subp_Index): Moved to library
level.
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* sem_ch9.adb (Analyze_Task_Type_Declaration): Shut down warning
in codepeer mode.
2016-04-20 Vincent Celier <celier@adacore.com>
* make.adb: Code cleanup.
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* exp_ch4.adb (Expand_Allocator_Expression): Help C code
generation.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb (Copy_Generic_Node): Handle the special
qualification installed for universal literals that act as
operands in binary or unary operators. (Qualify_Operand): Mark
the qualification to signal the instantiation mechanism how to
handle global reference propagation.
* sinfo.adb (Is_Qualified_Universal_Literal): New routine.
(Set_Is_Qualified_Universal_Literal): New routine.
* sinfo.ads New attribute Is_Qualified_Universal_Literal along
with occurrences in nodes.
(Is_Qualified_Universal_Literal):
New routine along with pragma Inline.
(Set_Is_Qualified_Universal_Literal): New routine along with
pragma Inline.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem.adb (Do_Analyze): Save and restore Style_Max_Line_Length
so that the corresponding checks are preserved across compilations
that include System.Constants in their context.
2016-04-20 Gary Dismukes <dismukes@adacore.com>
* sem_type.adb: Minor typo fix and reformatting.
* a-conhel.ads: Update comment.
2016-04-20 Bob Duff <duff@adacore.com>
* a-cihama.adb, a-cihase.adb, a-coinve.adb (Copy): Rewrite the
code so it doesn't trigger an "uninit var" warning.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_attr.ads Add new table Universal_Type_Attribute.
* sem_util.adb (Yields_Universal_Type): Use a table lookup when
checking attributes.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Init_Stored_Discriminants,
Init_Visible_Discriminants): New procedures, subsidiary of
Build_Record_Aggr_Code, to handle properly the construction
of aggregates for a derived type that constrains some parent
discriminants and renames others.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb (Qualify_Universal_Operands): New routine.
(Save_References_In_Operator): Add explicit qualifications in
the generic template for all operands of universal type.
* sem_type.adb (Disambiguate): Update the call to Matches.
(Matches): Reimplemented.
* sem_util.ads, sem_util.adb (Yields_Universal_Type): New routine.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Rep_Item_Too_Late): Better error message for
an illegal aspect that freezes the entity to which it applies.
2016-04-20 Bob Duff <duff@adacore.com>
* a-stwibo.ads, a-stzbou.ads
("="): Add overriding keyword before function to avoid crash when
compiler is called with -gnatyO (check overriding indicators).
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Check_Policy): If this
is a configuration pragma and it uses the ARG syntax, insert
the rewritten pragma after the current one rather than using
Insert_Actions.
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* exp_aggr.adb (Backend_Processing_Possible): Add handling of
C back-end.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* s-imgllu.adb, sem_util.adb, s-imgint.adb, s-imguns.adb,
s-imglli.adb: Minor reformatting.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Rewrite_Renamed_Operator): Do not rewrite the
renamed operator when the associated node appears within a
pre/postcondition.
* sem_util.ads, sem_util.adb (In_Pre_Post_Condition): New routine.
2016-04-20 Yannick Moy <moy@adacore.com>
* osint.adb (Relocate_Path): Fix test when Path is shorter than Prefix.
* einfo.adb (Set_Overridden_Operation): Add assertion.
* sem_util.adb (Unique_Entity): for renaming-as-body return the spec
entity.
2016-04-20 Javier Miranda <miranda@adacore.com>
* exp_unst.adb (Append_Unique_Call): New subprogram.
(Unnest_Subprogram): Replace the unique occurrence
of Call.Append() by Append_Unique_Call() which protects us from
adding to the Calls table duplicated entries.
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* exp_attr.adb (Is_GCC_Target): Fix for C backend.
* xref_lib.ads (Dependencies_Tables): instantiate
Table package with types that guarantee its safe use.
* s-imgllu.adb, s-imgint.adb, s-imguns.adb, s-imglli.adb: Avoid nested
procedures.
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]):
Disable expansion when generating C code.
* sinfo.ads, inline.ads: Minor editing.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_util.adb, contracts.adb, ghost.adb, exp_ch6.adb: Minor
reformatting.
2016-04-20 Javier Miranda <miranda@adacore.com>
* contracts.adb (Build_Postconditions_Procedure): Code cleanup.
* ghost.adb (Os_OK_Ghost_Context.Is_OK_Declaration): Handle the
declaration of the internally built _postcondition procedure.
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* snames.ads-tmpl (Internal_Attribute_Id, Attribute_Class_Array): Fix
indentation.
* sem_util.adb (Is_Unchecked_Conversion_Instance):
defense against library-level renamings of other functions,
which are never instances of Unchecked_Conversion.
* einfo.ads: minor fix of casing in comment
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_N_Subprogram_Stub): Do not expand a body
that has been analyzed and expanded already. Qualify the names
in the proper body for use in the generation of C code.
2016-04-20 Javier Miranda <miranda@adacore.com>
* contracts.adb (Build_Postconditions_Procedure): Force its
inlining when generating C code.
* sem_attr.adb (Analyze_Attribute_Old_Result): Handle inlined
_postconditions when generating C code.
* exp_ch6.adb (Inlined_Subprogram): Inline calls to
_postconditions when generating C code.
* sinfo.ads, sinfo.adb (Corresponding_Spec, Set_Corresponding_Spec):
types of return value and argument changed from Node_Id to
Entity_Id.
2016-04-20 Vincent Celier <celier@adacore.com>
* make.adb, clean.adb, gnatname.adb: Revert previous change for now.
2016-04-20 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch12.adb (Analyze_Instance_And_Renamings): Do not reset
the Has_Delayed_Freeze flag on the anonymous instance node.
2016-04-20 Javier Miranda <miranda@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): Remove transient
scope associated with the renaming object declaration.
* exp_util.adb (Insert_Actions): Remove handling of iterator
loop marked as requiring the secondary stack.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute, case 'Image): Implement
AI12-0124, which extends the functionality of the attribute so it
reflects the semantics of GNAT 'Img when applied to scalar types.
* lib-xref.adb: minor whitespace layout fix.
2016-04-20 Vincent Celier <celier@adacore.com>
* clean.adb (Gnatclean): Fail if project file specified and
gprclean is not available.
* gnatname.adb: Fail is -P is used and gprname is not available.
* make.adb (Initialize): Fail if project file specified and
gprbuild is not available.
2016-04-20 Bob Duff <duff@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): Do not use secondary
stack when possible.
2016-04-20 Gary Dismukes <dismukes@adacore.com>
* par_sco.adb, sem_util.adb, sem_ch13.adb: Minor typo corrections and
reformatting.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Default_Storage_Pool):
If the pragma comes from an aspect specification, verify that
the aspect applies to an entity with a declarative part.
* exp_ch5.adb: Code cleanup.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_If_Expression): If first expression is
universal, resolve subsequent ones with the corresponding class
type (Any_Integer or Any_Real).
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): If expansion is
disabled, complete the analysis of the iterator name to ensure
that reference for entities within are properly generated.
2016-04-20 Arnaud Charlet <charlet@adacore.com>
* a-dispat.ads (Yield): add Global contract.
* a-calend.ads, a-reatim.ads: Added Initializes => Clock_Time.
* a-taside.adb: Added Initializes => Tasking_State.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Build_Invariant_Procedure):
Reimplement the invariant procedure spec and body insertion.
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch13.adb (Add_Invariant): Do not replace
the saved expression of an invariatn aspect when inheriting
a class-wide type invariant as this clobbers the existing
expression. Do not use New_Copy_List as it is unnecessary
and leaves the parent pointers referencing the wrong part of
the tree. Do not replace the type references for ASIS when
inheriting a class-wide type invariant as this clobbers the
existing replacement.
2016-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Build_Explicit_Dereference): If the designated
expression is an entity name, generate reference to the entity
because it will not be resolved again.
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
gnat_rm.texi: Update documentation.
2016-04-19 Olivier Hainque <hainque@adacore.com>
* par_sco.adb (Traverse_One, case N_Case_Statement):
Skip pragmas before the first alternative.
(Traverse_Handled_Statement_Sequence, Exception_Handlers): Likewise.
2016-04-19 Tristan Gingold <gingold@adacore.com>
* adaint.c (__gnat_lwp_self): New function (for darwin).
* s-osinte-darwin.ads, s-osinte-darwin.adb (lwp_self): Import
of __gnat_lwp_self.
2016-04-19 Olivier Hainque <hainque@adacore.com>
* sem_util.adb (Build_Elaboration_Entity): Always request an
elab counter when preserving control-flow.
2016-04-19 Olivier Hainque <hainque@adacore.com>
* sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set
Needs_Debug_Info when producing SCOs.
* par_sco.adb (Traverse_Aspects): Fix categorization of
Type_Invariant to match actual processing as activated depending
on pragma Assertion_Policy.
* sem_prag.adb (Analyze_Pragma): Remove special case for
Name_Invariant regarding SCO generation, which completely disabled
the production of SCOs for Invariant pragmas and aspects.
2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
* checks.adb, sem_util.adb, sem_res.adb, sem_attr.adb: Minor
reformatting.
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* freeze.adb (Freeze_Profile): Refine predicate that checks
whether a function that returns a limited view is declared in
another unit and cannot be frozen at this point.
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* exp_aggr.adb (Component_Count): Handle properly superflat
arrays, i.e. empty arrays where Hi < Lo - 1, to ensure that the
return value of the function is Natural, rather than leaving
the handling of such arrays to the caller of this function.
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* sem_prag.adb, sem_attr.adb, par-prag.adb, exp_aggr.adb, sem_type.adb
sem_ch12.adb, sem_ch3.adb, exp_ch7.adb, exp_ch9.adb: Code cleanup.
* sem_res.adb, sem_util.ads, sem_util.adb (Is_OK_Volatile_Context):
Promoted from being a nested subprogram in Sem_Res.Resolve_Entity_Name
to publicly visible routine in Sem_Util.
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* checks.adb (Apply_Parameter_Aliasing_Checks): Do not apply
the check if the type of the actual is By_Reference.
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* sem_res.adb (Within_Subprogram_Call): Detect
also nodes that appear in entry calls.
(Resolve_Actuals, Insert_Default): Propagate
dimension information if any, from default expression to the
copy that appears in the list of actuals.
* uintp.ads: minor whitespace fix in comment.
* sem_prag.adb, stringt.adb, inline.adb, lib-xref-spark_specific.adb:
Minor code cleanup.
* set_targ.adb (Set_Targ): convert directly from
Natural to Pos, without intermediate conversion to Int.
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* sem_ch6.adb (Process_Formals): Mark suspicious reference to
SPARK RM in comment.
* sem_prag.adb (Analyze_Global_Item): Fix reference to SPARK RM
in comment.
* sem_res.adb (Property_Error, Resolve_Actuals): Fix reference
to SPARK RM in both comment and error message.
2016-04-19 Eric Botcazou <ebotcazou@adacore.com>
* sem_ch6.adb (Possible_Freeze): If the type is an incomplete
CW type, then the subprogram must have a delayed freeze. This
ensures that the backend can properly recover the full view when
elaborating the access subprogram declaration.
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Resolve_Attribute, case 'Access): Freeze
overloadable entity if originally overloaded.
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* exp_aggr.adb, exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_code.adb,
exp_fixd.adb, namet.adb, osint.adb, osint.ads, par-ch2.adb,
sem_ch10.adb, sem_ch12.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb
sem_util.adb, styleg.adb, styleg.ads, stylesw.ads: Minor code
clean up.
2016-04-19 Arnaud Charlet <charlet@adacore.com>
* sem_util.adb (Copy_Node_With_Replacement):
use Set_Comes_From_Source instead of directly manipulating
internals of the node table.
* sem_util.adb (Within_Scope): refactored to remove duplicated code.
* sem_aux.adb (Get_Rep_Pragma,
Subprogram_Body_Entity, Subprogram_Spec): declare variables that
do not change as constants and initialize them in the declaration.
(Get_Rep_Pragma, Subprogram_Body_Entity, Subprogram_Spec): declare
variables that do not change as constants and initialize them
in the declaration.
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Entry_Call): If the entry has
preconditions it is rewritten by means of a wrapper that
incorporates the original call. Before rewriting generate a
reference to the entry being called to prevent spurious warnings
and provide correct cross-reference information.
2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
* sem_disp.adb (Check_Dispatching_Context): Code cleanup. Add
local constant Scop. Ignore any internally generated loops when
performing the check concerning an abstract subprogram call
without a controlling argument.
* sem_util.ads, sem_util.adb (Current_Scope_No_Loops): New routine.
2016-04-19 Bob Duff <duff@adacore.com>
* sem_elab.adb (Check_A_Call): There are cases where we have No
(Ent) after the Alias loop, even when there was no previous error,
so we can't assert that there was an error.
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Access_Attribute, OK_Self_Reference):
Reject use of type name as a prefix to 'access within an aggregate
in a context that is not the declarative region of a type.
2016-04-19 Vincent Celier <celier@adacore.com>
* gnatcmd.adb: Make "gnat ls -P" invoke gprls Make "gnat bind
-P" invoke "gprbuild -b" Make "gnat link -P" invoke "gprbuild
-l" Fail if the invocation is "gnat find -P" or "gnat xref -P"
Remove anything related to project files
* g-mbdira.adb: minor whitespace cleanup
* g-spipat.adb: minor removal of extra spaces after closing paren
2016-04-19 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Actuals): If post-statements are present
and the enclosing context is a function call or indexing, build
an Expression_With_Actions for the call.
2016-04-19 Hristian Kirtchev <kirtchev@adacore.com>
* lib-writ.adb (Write_With_Lines): Code cleanup. Do not generate
a with line for an ignored Ghost unit.
* sem_ch7.adb (Analyze_Package_Declaration): Add local constant
Par. A child package is Ghost when its parent is Ghost.
* sem_prag.adb (Analyze_Pragma): Pragma Ghost can now apply to
a subprogram declaration that acts as a compilation unit.
2016-04-18 Michael Matz <matz@suse.de>
* gcc-interface/decl.c (gnat_to_gnu_entity): Use SET_TYPE_ALIGN.
(gnat_to_gnu_field): Ditto.
(components_to_record): Ditto.
(create_variant_part_from): Ditto.
(copy_and_substitute_in_size): Ditto.
(substitute_in_type): Ditto.
* gcc-interface/utils.c (make_aligning_type): Use SET_TYPE_ALIGN.
(make_packable_type): Ditto.
(maybe_pad_type): Ditto.
(finish_fat_pointer_type): Ditto.
(finish_record_type): Ditto and use SET_DECL_ALIGN.
(rest_of_record_type_compilation): Use SET_TYPE_ALIGN.
(create_field_decl): Use SET_DECL_ALIGN.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* einfo.adb (Overridden_Operation): assert that
function is called for valid arguments.
* sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_type.adb,
s-osinte-vxworks.ads, a-ngcefu.adb, sem_ch10.adb, einfo.ads,
sem_prag.adb, sem_ch12.adb, sem.adb, i-cobol.ads, freeze.adb,
sem_util.adb, a-chtgop.ads, s-rannum.adb, exp_ch6.adb, s-bignum.adb,
s-osinte-freebsd.ads, par-ch5.adb, a-chtgbo.ads, a-cofove.adb:
No space after closing parenthesis except where required for
layout.
* sem_res.adb: Minor reformatting.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* exp_ch4.adb (Expand_N_Case_Expression): Convert into a case
statement when relevant.
2016-04-18 Bob Duff <duff@adacore.com>
* a-cuprqu.adb (Enqueue): Properly handle the
case where the new element has a unique priority.
2016-04-18 Tristan Gingold <gingold@adacore.com>
* adaint.h: Define stat structures and functions for iOS
simulator.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* sem_res.adb (Resolve_Entry_Call): reset
Is_Overloaded flag after resolving calls to overloaded protected
operations.
* exp_spark.adb (Expand_SPARK): call
Qualify_Entity_Names for tasking nodes, i.e. protected types,
task types and entries.
* exp_ch4.adb (Expand_N_If_Expression): Refine previous change
in case of an unconstrained type.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_eval.adb, sem_eval.ads (Check_Non_Static_Context): Add
comment to document usage of subprogram in GNATprove.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Test_Case): Improve error
message for wrong placement of aspect Test_Case.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.ads: Update the documentation of attribute Renamed_Object.
* exp_spark.adb (Expand_Potential_Renaming): Reimplemented.
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* exp_ch4.adb (Optimize_Length_Comparison): Return immediately
in the case of AAMP (same as for use of the -gnatd.P switch) to
suppress this optimization, which avoids creating a dependence
on the 64-bit arithmetic package.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* exp_ch4.adb: Update comment.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch6.adb (Expand_Call): Make sure instantiations are
registered only once as pending here.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* exp_ch4.adb, gnat1drv.adb, opt.ads, sem_res.adb
(Minimize_Expression_With_Actions): New flag.
(Adjust_Global_Switches): Set Minimize_Expression_With_Actions
when generating C.
(Resolve_Short_Circuit): Redo previous change
using Minimize_Expression_With_Actions.
(Expand_N_If_Expression,
Expand_Short_Circuit_Operator): Restore old code to avoid
Expression_With_Actions when Minimize_Expression_With_Actions
is set.
2016-04-18 Vincent Celier <celier@adacore.com>
* s-os_lib.adb (Non_Blocking_Spawn, version with Stdout_File and
Stderr_File): Close local file descriptors when no longer needed.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): Remove SPARK
mode check that the type of the cursor in an iteration over
a formal container is not volatile. The proper check on the
element type is done elsewhere.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Process_Formals): Do not set a delay freeze on
a subprogram that returns a class-wide type, if the subprogram
is a compilation unit, because otherwise gigi will treat the
subprogram as external, leading to link errors.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* sem_res.adb (Resolve_Short_Circuit): Do not use
expression-with-actions when generating C.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_util.adb (Apply_Compile_Time_Constraint_Error): Do not generate
raise node in GNATprove mode.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* s-fileio.adb: Minor reformatting.
* sem_prag.adb (Analyze_Input_Item): Add local
variable Input_OK. Do not consider mappings of generic formal
parameters to actuals.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Get_Cursor_Type): If iterator type is a derived
type, the cursor is declared in the scope of the parent type.
(Analyze_Parameter_Specification): A qualified expression with an
iterator type indicates an iteration over a container (explicit
or implicit).
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* osint-c.ads, osint-c.adb (Delete_C_File, Delete_H_File): New.
* gnat1drv.adb (Gnat1drv): Delete old C files before regenerating them.
* debug.adb: Reserve -gnatd.4 to force generation of C files.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_eval.adb (Eval_Arithmetic_Op): Do not issue error on static
division by zero, instead possibly issue a warning.
* sem_res.adb (Resolve_Arithmetic_Op): Do not issue error on
static division by zero, instead add check flag on original
expression.
* sem_util.adb, sem_util.ads (Compile_Time_Constraint_Error):
Only issue error when both SPARK_Mode is On and Warn is False.
2016-04-18 Yannick Moy <moy@adacore.com>
* checks.adb (Apply_Scalar_Range_Check): Force
warning instead of error when SPARK_Mode is On, on index out of
bounds, and set check flag for GNATprove.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Check_In_Out_States.Check_Constituent_Usage):
Update the comment on usage. Reimplemented.
(Check_Input_States.Check_Constituent_Usage): Update the comment
on usage. A Proof_In constituent can now refine an Input state
as long as there is at least one Input constituent present.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Check_Inline_Pragma): Use the Sloc of the
body id as the sloc of the entity in the generated subprogram
declaration, to avoid spurious conformance errors when style
checks are enabled.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component, Has_Dereference):
Refine check on illegal calls to entities within a task body,
when the entity is declared in an object of the same type. In
a generic context there might be no explicit dereference but if
the prefix includes an access type the construct is legal.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* rtsfind.ads, rtsfind.adb (RE_Id, RE_Unit_Table): add
RE_Default_Priority.
2016-04-18 Bob Duff <duff@adacore.com>
* sem_prag.adb (Check_Arg_Is_Local_Name): Don't do the check
if the pragma came from an aspect specification.
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* gnat1drv.adb, contracts.adb: Minor reformatting and wording fixes.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): To suppress
superfluous conformance check on an inlined body with a previous
spec, use the fact that the generated declaration does not come
from source. We must treat the entity as coming from source to
enable some back-end inlining when pragma appears after the body.
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* lib-xref-spark_specific.adb, par-ch2.adb, errout.ads,
exp_intr.adb: Minor reformatting and typo corrections.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb: Code cleanup.
2016-04-18 Thomas Quinot <quinot@adacore.com>
* sem_ch13.adb: Minor reformatting and error message tweaking
(remove extraneous spaces).
2016-04-18 Johannes Kanig <kanig@adacore.com>
* gnat1drv.adb (Gnat1drv): Force loading of System unit for SPARK.
2016-04-18 Bob Duff <duff@adacore.com>
* s-fileio.adb (Fopen_Mode): If Mode = Out_File, and the file
exists, and it's a fifo, we use "w" as the open string instead of
"r+". This is necessary to make a write to the fifo block until
a reader is ready.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_attr.adb (Denote_Same_Function): Account
for a special case where a primitive of a tagged type inherits
a class-wide postcondition from a parent type.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* par-ch2.adb (P_Expression_Or_Reserved_Word): New routine.
(P_Pragma): Signal Scan_Pragma_Argument_Association when the use
of reserved words is OK.
(Scan_Pragma_Argument_Association):
Add new formal Reserved_Words_OK and update the comment on
usage. Code cleanup. Parse an expression or a reserved word in
identifier form for pragmas Restriction_Warnings and Restrictions
No_Use_Of_Attribute.
* restrict.adb (Check_Restriction_No_Use_Of_Attribute):
Reimplemented. (Check_Restriction_No_Use_Of_Pragma): Code cleanup.
(Set_Restriction_No_Specification_Of_Aspect): Properly set the warning
flag for an aspect.
(Set_Restriction_No_Use_Of_Attribute): Properly set the warning
flag for an attribute. (Set_Restriction_No_Use_Of_Entity):
Update the parameter profile.
(Set_Restriction_No_Use_Of_Pragma): Properly set the warning flag for
a pragma.
* restrict.ads (Check_Restriction_No_Use_Of_Attribute): Update
the comment on usage.
(Set_Restriction_No_Use_Of_Entity): Update the parameter profile.
* sem_attr.adb (Analyze_Attribute): Check restriction
No_Use_Of_Attribute.
* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Check
restriction No_Use_Of_Attribute before any rewritings have
taken place.
* sem_prag.adb (Analyze_Pragma): Check restriction
No_Use_Of_Pragma before any rewritings have taken place.
2016-04-18 Bob Duff <duff@adacore.com>
* sem_ch6.adb (Is_Inline_Pragma): The pragma
argument can be a selected component, which has no Chars field,
so we need to deal with that case (use the Selector_Name).
(Check_Inline_Pragma): We need to test Is_List_Member before
calling In_Same_List, because in case of a library unit, they're
not in lists, so In_Same_List fails an assertion.
2016-04-18 Bob Duff <duff@adacore.com>
* namet.ads, namet.adb: Add an Append that appends a
Bounded_String onto a Bounded_String. Probably a little more
efficient than "Append(X, +Y);". Also minor cleanup.
(Append_Decoded, Append_Decoded_With_Brackets, Append_Unqualified,
Append_Unqualified_Decoded): Make sure these work with non-empty
buffers.
* casing.ads, casing.adb (Set_Casing): Pass a Bounded_String
parameter, defaulting to Global_Name_Buffer.
* errout.ads, errout.adb (Adjust_Name_Case): Pass a
Bounded_String parameter, no default.
* exp_ch11.adb (Expand_N_Raise_Statement): Use local
Bounded_String instead of Global_Name_Buffer.
* exp_intr.ads, exp_intr.adb (Write_Entity_Name): Rename it
to Append_Entity_Name, and pass a Bounded_String parameter,
instead of using globals.
(Add_Source_Info): Pass a Bounded_String parameter, instead of
using globals.
(Expand_Source_Info): Use local instead of globals.
* stringt.ads, stringt.adb (Append): Add an Append procedure
for appending a String_Id onto a Bounded_String.
(String_To_Name_Buffer, Add_String_To_Name_Buffer): Rewrite in
terms of Append.
* sem_prag.adb (Set_Error_Msg_To_Profile_Name): Adjust for new
Adjust_Name_Case parameter.
* erroutc.adb, uname.adb: Don't pass D => Mixed_Case to
Set_Casing; that's the default.
* lib-xref-spark_specific.adb (Add_SPARK_Scope): Pretend that calls to
protected subprograms are entry calls; otherwise it is not possible to
distinguish them from regular subprogram calls.
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* sem_ch13.adb (Has_Good_Profile): Improvement
of error message. Now indicates subtype_mark of formal parameter
rather than the formal's name, plus minor rewording.
2016-04-18 Pascal Obry <obry@adacore.com>
* adaint.c, adaint.h, s-os_lib.ads: Add new routine Current_Process_Id.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* stringt.adb, exp_ch6.adb, sem_ch13.adb: Minor reformatting.
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* par-ch4.adb, sem_prag.adb: Minor reformatting.
2016-04-18 Bob Duff <duff@adacore.com>
* sinput.ads, sinput.adb (Build_Location_String): Take a
parameter instead of using a global variable. The function
version no longer destroys the Name_Buffer.
* stringt.ads, stringt.adb (String_From_Name_Buffer): Take a
parameter, which defaults to the Global_Name_Buffer, so some
calls can avoid the global.
* exp_ch11.adb, exp_intr.adb: Use new interfaces above
to avoid using globals. All but one call to Build_Location_String
avoids the global. Only one call to String_From_Name_Buffer
avoids it.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_eval.adb (Choice_Matches): Check the expression
against the predicate values when the choice denotes a
subtype with a static predicate.
(Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
tests for predicates.
(Is_OK_Static_Subtype): A subtype with a dynamic predicate
is not static. (Is_Static_Subtype): A subtype with a dynamic
predicate is not static.
* sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
(Is_Static_Subtype): Update the comment on usage.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Input_Item): Allow
generic formals to appear as initialization items.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Stream_TSS_Definition,
Has_Good_Profile): Additional error message to indicate that
the second parameter of the subprogram must be a first subtype.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
Use the pragma lookahead that determines whether a subprogram
is to be inlined, when some level of backend optimization is
required.
* sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
code used to create an instance body when needed for inlining.
* exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
call appears within an instantiation that is not a compilation
unit, add a pending instantiation for the enclosing instance,
so the backend can inline in turn the calls contained in the
inlined body.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Build_Pragma_Check_Equivalent): The mapping
that relates operations of the parent type to the operations of
the derived type has three distinct sources:
a) explicit operations of the derived type carry an
Overridden_Operation that designates the operation in the
ancestor.
b) Implicit operations that are inherited by the derived type
carry an alias that may be an explicit subprogram (in which case
it may have an Overridden_ Operation indicator) or may also be
inherited and carry its own alias.
c) If the parent type is an interface, the operation of the
derived type does not override, but the interface operation
indicates the operation that implements it.
* sem_prag.adb: Minor reformatting.
* sem_prag.adb (Check_External_Property): Update
the comment on usage. Reimplement.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_Assignment_Statement): In restricted
profiles such as ZFP, ceiling priority is not available.
2016-04-18 Bob Duff <duff@adacore.com>
* namet-sp.ads: Minor typo fix, ironically in 'Spelling_Checker'.
2016-04-18 Bob Duff <duff@adacore.com>
* sem_elab.adb (Output_Calls): Use
Get_Name_String, to clearly indicate that the global Name_Buffer
is being used. The previous code used Is_Internal_Name, which
returns a Boolean, but also has a side effect of setting the
Name_Buffer. Then it called the other Is_Internal_Name, which uses
the Name_Buffer for its input. And then it called Error_Msg_N,
again using the Name_Buffer. We haven't eliminated the global
usage here, but we've made it a bit clearer.
This also allows us to have a side-effect-free version of
Is_Internal_Name.
* namet.ads, namet.adb: Provide a type Bounded_String, along with
routines that can be used without using global variables. Provide
Global_Name_Buffer so existing code can continue to use the
global. Mark the routines that use globals as obsolete. New code
shouldn't call the obsolete ones, and we should clean up existing
code from time to time.
Name_Find_Str is renamed as Name_Find.
* namet.h: Changed as necessary to interface to the new version
of Namet.
* bindgen.adb, exp_unst.adb: Name_Find_Str is renamed as
Name_Find.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_util.adb, sem_util.ads (Has_Full_Default_Initialization): used
outside of GNATprove, hence it should not be removed.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Refinement_Clause):
The refinement of an external abstract state can now mention
non-external constituents.
(Check_External_Property): Update all SPARK RM references.
2016-04-18 Bob Duff <duff@adacore.com>
* exp_intr.adb: Remove some duplicated code.
2016-04-18 Yannick Moy <moy@adacore.com>
* a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads: Mark
package spec and body out of SPARK.
2016-04-18 Johannes Kanig <kanig@adacore.com>
* spark_xrefs.ads: Minor comment update.
2016-04-18 Johannes Kanig <kanig@adacore.com>
* gnat1drv.adb (Gnat1drv): Force loading of System
unit for SPARK.
2016-04-18 Bob Duff <duff@adacore.com>
* a-cuprqu.adb: Correction to previous change. If a new node
is inserted at the front of the queue (because it is higher
priority than the previous front node), we need to update
Header.Next_Unequal -- not just in the case where the queue was
previously empty.
2016-04-18 Bob Duff <duff@adacore.com>
* a-cuprqu.ads: Change the representation of List_Type from a
singly-linked list to a doubly-linked list. In addition, add a
pointer Next_Unequal, which points past a possibly-long chain
of equal-priority items. This increases efficiency, especially
in the case of many equal-priority items.
* a-cuprqu.adb (Dequeue, Enqueue): Rewrite algorithms to take
advantage of new data structure.
(Finalize): Rewrite in terms of Dequeue, for simplicity.
2016-04-18 Yannick Moy <moy@adacore.com>
* contracts.adb (Analyze_Object_Contract,
Analyze_Protected_Contract): Remove tests performed in GNATprove.
* sem_util.adb, sem_util.ads (Has_Full_Default_Initialization):
Remove query for tests performed in GNATprove.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Record_Aggregate): If
Warn_On_Redundant_Constructs is enabled, report a redundant box
association that does not cover any components, as it done for
redundant others associations in case statements.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Collect_Inherited_Class_Wide_Conditions):
Analyze the generated Check pragma for an inherited condition so
that it does not freeze the dispatching type of the primitive
operation, because it is pre-analyzed at the point of the
subprogram declaration (and not in the subprogram body, as is
done during regular expansion).
2016-04-18 Vincent Celier <celier@adacore.com>
* ali.ads: Increase the range of all _Id types to 100 millions.
2016-04-18 Gary Dismukes <dismukes@adacore.com>
* sem_warn.adb (Check_References): Change warning to suggest
using pragma Export rather than saying "volatile has no effect".
2016-04-18 Bob Duff <duff@adacore.com>
* g-souinf.ads (Compilation_ISO_Date): New function to return
the current date in ISO form.
* exp_intr.adb (Expand_Source_Info, Add_Source_Info): Expand
a call to Compilation_ISO_Date into a string literal containing
the current date in ISO form.
* exp_intr.ads (Add_Source_Info): Improve documentation.
* sem_intr.adb (Check_Intrinsic_Subprogram): Recognize
Compilation_ISO_Date.
* snames.ads-tmpl (Name_Compilation_ISO_Date): New Name_Id.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* layout.adb (Set_Elem_Alignment): Extend setting of alignment
to subtypes that are not first subtypes.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_prag.ads (Collect_Inherited_Class_Wide_Conditions):
Simplify interface.
* sem_prag.adb (Collect_Inherited_Class_Wide_Conditions): Insert
generated pragmas after subprogram declaration, rather than in
the corresponding subprogram body.
* sem_ch6.adb (New_Overloaded_Entity): In GNATProve
mode, if the operation is overridding, call
Collect_Inherited_Class_Wide_Conditions to generate the
corresponding pragmas immediately after the corresponding
subprogram declaration.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* spark_xrefs.ads (Xref_Index, Scope_Index, File_Index): restrict
type to natural numbers.
(Stype): document code characters for concurrent entities.
2016-04-18 Olivier Hainque <hainque@adacore.com>
* targparm.ads: Update the Frontend_Exceptions default internal
value.
(Frontend_Exceptions_On_Target): Change default value to True.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component): Refine error
detection when a selected component in the body of a synchronized
type is a reference to an object of the same type declared
elsewhere. The construct is legal if the prefix of the selected
component includes an explicit dereference at any point.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Do not consider
internally generated expressions when trying to determine whether
a formal parameter of a tagged type subject to Extensions_Visible
False is used to initialize an object.
* sem_ch4.adb (Analyze_Type_Conversion): Do not consider
internally generated expressions when trying to determine whether
a formal parameter of a tagged type subject to Extensions_Visible
False is used in a type conversion.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_res.adb (Is_Protected_Operation_Call):
Add guards to account for a non-decorated selected component.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Improve
implementation of Body_Has_SPARK_Mode_On.
* sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_From_Annotation):
New function replacing previous Get_SPARK_Mode_From_Pragma, that
deals also with aspects.
(Get_SPARK_Mode_Type): Make function internal again.
* inline.adb, sem_ch7.adb, sem_util.adb: Use new
Get_SPARK_Mode_From_Annotation.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* contracts.adb (Analyze_Object_Contract): Update references to
SPARK RM.
* freeze.adb (Freeze_Entity): Update references to SPARK RM.
* ghost.adb Add with and use clauses for Sem_Disp.
(Check_Ghost_Derivation): Removed.
(Check_Ghost_Overriding):
Reimplemented. (Check_Ghost_Policy): Update references to SPARK RM.
(Check_Ghost_Primitive): New routine.
(Check_Ghost_Refinement): New routine. (Is_OK_Ghost_Context):
Update references to SPARK RM. (Is_OK_Pragma): Update references
to SPARK RM. Predicates are now a valid context for references
to Ghost entities.
* ghost.ads (Check_Ghost_Derivation): Removed.
(Check_Ghost_Overriding): Update the comment on usage.
(Check_Ghost_Primitive): New routine.
(Check_Ghost_Refinement): New routine.
(Remove_Ignored_Ghost_Code): Update references to SPARK RM.
* sem_ch3.adb (Process_Full_View): Remove the now obsolete check
related to Ghost derivations
* sem_ch6.adb (Check_Conformance): Remove now obsolete check
related to the convention-like behavior of pragma Ghost.
(Check_For_Primitive_Subprogram): Verify that the Ghost policy
of a tagged type and its primitive agree.
* sem_prag.adb (Analyze_Pragma): Update references to SPARK
RM. Move the verification of pragma Assertion_Policy Ghost
to the proper place. Remove the now obsolete check related
to Ghost derivations.
(Collect_Constituent): Add a call to Check_Ghost_Refinement.
* sem_res.adb (Resolve_Actuals): Update references to SPARK RM.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* layout.adb: Fix more minor typos in comments.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* a-calend.ads, sem_prag.adb, sem_ch6.adb: Minor reformatting.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): In GNATprove
mode, collect inherited class-wide conditions to generate the
corresponding pragmas.
* sem_prag.ads (Build_Pragma_Check_Equivalent): Moved from contracts
* contracts.adb (Collect_Inherited_Class_Wide_Conditions): New
procedure for overriding subprograms, used to generate the pragmas
corresponding to an inherited class- wide pre- or postcondition.
* sem_prag.adb (Build_Pragma_Check_Equivalent): moved here
from contracts.adb (Replace_Condition_Entities): Subsidiary
Build_Pragma_Check_Equivalent, to implement the proper semantics
of inherited class-wide conditions, as given in AI12-0113.
(Process_Class_Wide_Condition): Removed.
(Collect_Inherited_Class_Wide_Conditions): Iterate over pragmas
in contract of subprogram, to collect inherited class-wide
conditions.
(Build_Pragma_Check_Equivalent): Moved to sem_prag.adb
2016-04-18 Yannick Moy <moy@adacore.com>
* a-calend.adb (Ada.Calendar): Mark package body as SPARK_Mode Off.
* a-calend.ads (Ada.Calendar): Mark package spec as
SPARK_Mode and add synchronous external abstract state Clock_Time.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_res.adb (Resolve_Call): Prevent inlining of
calls inside expression functions. Factor previous code issuing
errors to call Cannot_Inline instead, which does appropriate
processing of message for GNATprove.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* einfo.ads, sem_ch3.adb, sem_ch8.adb, osint-l.adb, rtsfind.adb,
osint-b.adb: Cleanups.
2016-04-18 Yannick Moy <moy@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Only create
body to inline in GNATprove mode when SPARK_Mode On applies to
subprogram body.
* sem_prag.adb, sem_prag.ads (Get_SPARK_Mode_Type): Make function
public.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* layout.adb: Fix minor typo in comment.
* inline.adb: Fix minor pasto.
* sem_ch12.ads: Fix minor typos in comments.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_disp.adb (Check_Dispatching_Call): Major rewriting to
handle some complex cases of tag indeterminate calls that are
actuals in other dispatching calls that are themselves tag
indeterminate.
(Check_Dispatching_Context): Add parameter to support recursive
check for an enclosing construct that may provide a tag for a
tag-indeterminate call.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Depends_In_Decl_Part):
Add global variables Task_Input_Seen and Task_Output_Seen.
(Analyze_Global_Item): Detect an illegal use of the current
instance of a single protected/task type in a global annotation.
(Analyze_Input_Output): Inputs and output related to the current
instance of a task unit are now tracked.
(Check_Usage): Require
the presence of the current instance of a task unit only when
one input/output is available. (Current_Task_Instance_Seen):
New routine.
(Is_CCT_Instance): New parameter profile. Update
the comment on usage. The routine now properly recognizes several
cases related to single protected/task types.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Freeze_Entity): Use New_Freeze_Node
to create a brand new freeze node. This handles a case where an
ignored Ghost context is freezing something which is not ignored
Ghost and whose freeze node should not be removed from the tree.
(New_Freeze_Node): New routine.
2016-04-18 Jerome Lambourg <lambourg@adacore.com>
* sigtramp.h (__gnat_set_is_vxsim) New function to
tell sigtramp-vxworks to handle vxsim signal contexts. *
sigtramp-vxworks.c (__gnat_sigtramp) Take into account the
differences in the sigcontext structure between the expected
regular x86 or x86_64 ones and the ones received in case of
exexution on the vxworks simulator.
* init.c: also compute is_vxsim in case of x86_64-vx7 target. Provide
this information to sigtramp-vxworks.c. Remove the old mechanism for
vxsim.
* init-vxsim.c, sigtramp-vxworks-vxsim.c: remove, now obsolete.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch3.adb (Inline_Init_Proc): New function returning
whether the initialization procedure of a type should be
inlined. Return again True for controlled type themselves.
(Build_Array_Init_Proc): Call it to set Set_Is_Inlined on Init_Proc.
(Build_Record_Init_Proc): Likewise.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* gnatvsn.ads (Library_Version): Bump to 7.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Set Inlined flag
on the entity of a subprogram declaration that is completed by
an expression function.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Is_Current_Instance): A entity given by a subtype
declaration can appear in an aspect specification for a dynamic
predicate, and a pragma for aspect Predicate_Failure.
* exp_util.adb (Replace_Subtype_References): Replace current
occurrences of the subtype to which a dynamic predicate applies,
byt the expression that triggers a predicate check. Needed to
implement new aspect Predicate_Failure.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* a-intsig.ads, a-intsig.adb: Removed, no longer used.
* Makefile.rtl: update accordingly.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* sem_type.adb (Disambiguate): Call Covers only when necessary
for standard operators.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* atree.ads (Num_Extension_Nodes): Add couple of figures
to comment.
* atree.adb: Add GNAT.Heap_Sort_G dependency.
(Print_Statistics): New exported procedure to print statistics.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch3.adb (Build_Record_Init_Proc): Do not mark the procedure
as to be inlined if the type needs finalization.
2016-04-18 Jerome Lambourg <lambourg@adacore.com>
* sigtramp-vxworks-target.inc: sigtramp-vxworks: force the stack
alignment for x86_64.
* init.c: Better fix for guard page reset on x86_64-vx7.
Do not try to retrieve the page that actually raised
the signal as the probing mechanism used on x86_64 do not allow
such retrieval. We thus just test if the guard page is active,
and re-activate it if not.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* a-sytaco.adb (Suspension_Object): Aspect Default_Initial_Condition
added.
2016-04-18 Jerome Lambourg <lambourg@adacore.com>
* affinity.c: Use the proper type for task id.
* init.c (__gnat_inum_to_ivec): ivec is a pointer.
2016-04-18 Arnaud Charlet <charlet@adacore.com>
* sem_prag.adb (Process_Convention): Relax rule on exporting
Intrinsic types if Relaxed_RM_Semantics is True.
2016-04-18 Vincent Celier <celier@adacore.com>
* sem_ch3.adb, lib.ads, sinfo.ads, sem_ch10.adb, einfo.adb, einfo.ads,
checks.ads, sem_ch12.adb, sem.adb, sem_util.adb, sem_util.ads,
sem_res.adb, sem_attr.adb, par.adb, exp_ch4.adb, errout.ads,
sem_ch4.adb, atree.adb, atree.ads, sem_warn.adb, treepr.adb,
exp_ch3.ads, exp_unst.adb: Change "descendent" to
"descendant" in comments, error messages and identifiers.
* gcc-interface/decl.c: Ditto.
2016-04-18 Eric Botcazou <ebotcazou@adacore.com>
* sem_type.adb (Operator_Matches_Spec): Call First_Formal on
New_S only once at the beginning of the function.
2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (components_to_record): Restrict the previous
change to fields with variable size.
2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (components_to_record): Add special case for
single field with representation clause at offset 0.
2016-03-16 Svante Signell <svante.signell@gmail.com>
* gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
* s-osinte-gnu.ads: New file.
2016-03-13 Eric Botcazou <ebotcazou@adacore.com>
* system-vxworks-m68k.ads (Stack_Check_Probes): Set to True.
(Stack_Check_Limits): Set to False.
* system-vxworks-mips.ads (Stack_Check_Probes): Set to True.
(Stack_Check_Limits): Set to False.
* system-vxworks-ppc.ads (Stack_Check_Probes): Set to True.
(Stack_Check_Limits): Set to False.
* system-vxworks-sparcv9.ads (Stack_Check_Probes): Set to True.
(Stack_Check_Limits): Set to False.
* system-vxworks-x86.ads (Stack_Check_Probes): Set to True.
(Stack_Check_Limits): Set to False.
2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (statement_node_p): New predicate.
(gnat_to_gnu): Invoke it to detect statement nodes. In ASIS mode, do
not return dummy results for expressions attached to packed array
implementation types.
2016-03-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Always mark
the expression of a renaming manually in case #3.
2016-03-02 Dominik Vogt <vogt@linux.vnet.ibm.com>
* system-linux-s390.ads: Enable Stack_Check_Probes.
* system-linux-s390.ads: Likewise.
2016-02-29 Martin Liska <mliska@suse.cz>
* gcc-interface/utils.c (set_reverse_storage_order_on_pad_type):
Replace ENABLE_CHECKING macro with flag_checking.
2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Retrofit
handling of unconstrained array types as designated types into common
processing. Also handle array types as incomplete designated types.
2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
ASIS mode, fully lay out the minimal record type.
2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (finalize_nrv_r): Remove obsolete code.
(build_return_expr): Likewise.
(Call_to_gnu): If this is a function call and there is no target,
create a temporary for the return value for all aggregate types,
but never create it for a return statement. Push a binding level
around the call in more cases. Remove obsolete code.
2016-02-29 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/ada-tree.h (DECL_RETURN_VALUE_P): New macro.
* gcc-interface/gigi.h (gigi): Remove useless attribute.
(gnat_gimplify_expr): Likewise.
(gnat_to_gnu_external): Declare.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Factor out
code dealing with the expression of external constants into...
Invoke gnat_to_gnu_external instead.
<E_Variable>: Invoke gnat_to_gnu_external to translate renamed objects
when not for a definition. Deal with COMPOUND_EXPR and variables with
DECL_RETURN_VALUE_P set for renamings and with the case of a dangling
'reference to a function call in a renaming. Remove obsolete test and
adjust associated comment.
* gcc-interface/trans.c (Call_to_gnu): Set DECL_RETURN_VALUE_P on the
temporaries created to hold the return value, if any.
(gnat_to_gnu_external): ...this. New function.
* gcc-interface/utils.c (create_var_decl): Detect a constant created
to hold 'reference to function call.
* gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Add folding
for COMPOUND_EXPR in the DECL_RETURN_VALUE_P case.
2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch4.adb (Expand_N_Indexed_Component): Activate synchronization if
the prefix denotes an entity which Has_Atomic_Components.
* gcc-interface/trans.c (node_is_atomic): Return true if the prefix
denotes an entity which Has_Atomic_Components.
2016-02-17 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
for fat pointer or scalar types.
2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (maybe_debug_type): New inline function.
* gcc-interface/misc.c (gnat_get_array_descr_info): Use it.
Call maybe_character_value on the array bounds. Get to the base type
of the index type and call maybe_debug_type on it.
* gcc-interface/utils.c (finish_character_type): Add special treatment
for char_type_node.
2016-02-16 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.
(LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above.
2016-02-12 Jakub Jelinek <jakub@redhat.com>
* prj-tree.ads: Spelling fixes - behaviour -> behavior and
neighbour -> neighbor.
* prep.adb: Likewise.
* prj.ads: Likewise.
* prepcomp.adb: Likewise.
* g-socket.ads: Likewise.
* s-imgrea.adb: Likewise.
* a-calend.adb: Likewise.
* exp_disp.adb: Likewise.
* doc/gnat_ugn/gnat_utility_programs.rst: Likewise.
* g-socket.adb: Likewise.
* sem_ch12.adb: Likewise.
* terminals.c: Likewise.
2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
* gcc-interface/misc.c (gnat_init): Remove second argument in call to
build_common_tree_nodes.
2016-02-08 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (create_var_decl): Set again DECL_COMMON and
DECL_IGNORED_P last.
2016-01-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (enum attr_type): Rename into...
(enum attrib_type): ...this.
(struct attrib): Adjust.
* gcc-interface/decl.c (prepend_one_attribute): Likewise.
2016-01-20 Eric Botcazou <ebotcazou@adacore.com>
* exp_ch2.adb (Expand_Current_Value): Make an appropriate character
literal if the entity is of a character type.
* gcc-interface/lang.opt (fsigned-char): New option.
* gcc-interface/misc.c (gnat_handle_option): Accept it.
(gnat_init): Adjust comment.
* gcc-interface/gigi.h (finish_character_type): New prototype.
(maybe_character_type): New inline function.
(maybe_character_value): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
<E_Enumeration_Subtype>: For a subtype of character with RM_Size and
Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
Copy TYPE_STRING_FLAG from type to subtype.
<E_Array_Type>: Deal with character index types.
<E_Array_Subtype>: Likewise.
* gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
char_type_node throughout.
(build_raise_check): Likewise.
(get_type_length): Deal with character types.
(Attribute_to_gnu) <Attr_Pos>: Likewise. Remove obsolete range check
code. Minor tweak.
<Attr_Pred>: Likewise.
(Loop_Statement_to_gnu): Likewise.
(Raise_Error_to_gnu): Likewise.
<N_Indexed_Component>: Deal with character index types. Remove
obsolete code.
<N_Slice>: Likewise.
<N_Type_Conversion>: Deal with character types. Minor tweak.
<N_Unchecked_Type_Conversion>: Likewise.
<N_In>: Likewise.
<N_Op_Eq>: Likewise.
(emit_index_check): Delete.
* gcc-interface/utils.c (finish_character_type): New function.
(gnat_signed_or_unsigned_type_for): Deal with built-in character types.
* gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
with char_type_node.
(build_call_raise): Likewise.
(build_call_raise_column): Likewise.
(build_call_raise_range): Likewise.
2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/gigi.h (build_call_raise_column): Adjust prototype.
(build_call_raise_range): Likewise.
(gnat_unsigned_type): Delete.
(gnat_signed_type): Likewise.
(gnat_signed_or_unsigned_type_for): New prototype.
(gnat_unsigned_type_for): New inline function.
(gnat_signed_type_for): Likewise.
* gcc-interface/cuintp.c (build_cst_from_int): Call build_int_cst.
* gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
(gnat_to_gnu_entity) <E_Array_Type>: Always translate the index types
and compute their base type from that.
<E_Array_Subtype>: Remove duplicate declaration.
* gcc-interface/misc.c (get_array_bit_stride): Call build_int_cst.
* gcc-interface/trans.c (get_type_length): Likewise.
(Attribute_to_gnu): Likewise.
(Loop_Statement_to_gnu): Likewise.
(Call_to_gnu): Likewise.
(gnat_to_gnu): Call build_real, build_int_cst, gnat_unsigned_type_for
and gnat_signed_type_for. Minor tweaks.
(build_binary_op_trapv): Likewise.
(emit_check): Likewise.
(convert_with_check): Likewise.
(Raise_Error_to_gnu): Adjust calls to the build_call_raise family of
functions. Minor tweaks.
(Case_Statement_to_gnu): Remove dead code.
(gnat_to_gnu): Call gnat_unsigned_type_for and gnat_signed_type_for.
(init_code_table): Minor reordering.
* gcc-interface/utils.c (gnat_unsigned_type): Delete.
(gnat_signed_type): Likewise.
(gnat_signed_or_unsigned_type_for): New function.
(unchecked_convert): Use directly the size in the test for precision
vs size adjustments.
(install_builtin_elementary_types): Call gnat_signed_type_for.
* gcc-interface/utils2.c (nonbinary_modular_operation): Call
build_int_cst.
(build_goto_raise): New function taken from...
(build_call_raise): ...here. Call it.
(build_call_raise_column): Add KIND parameter and call it.
(build_call_raise_range): Likewise.
2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/ada-tree.h (TYPE_IMPLEMENTS_PACKED_ARRAY_P): Rename to
(TYPE_IMPL_PACKED_ARRAY_P): ...this.
(TYPE_CAN_HAVE_DEBUG_TYPE_P): Do not test TYPE_DEBUG_TYPE.
* gcc-interface/decl.c (gnat_to_gnu_entity): Simplify NULL_TREE tests
and tweak gnat_encodings tests throughout.
(initial_value_needs_conversion): Likewise.
(intrin_arglists_compatible_p): Likewise.
* gcc-interface/misc.c (gnat_print_type): Likewise.
(gnat_get_debug_type): Likewise.
(gnat_get_fixed_point_type_info): Likewise.
(gnat_get_array_descr_info): Likewise.
(get_array_bit_stride): Likewise.
(gnat_get_type_bias): Fix formatting.
(enumerate_modes): Likewise.
* gcc-interface/trans.c (gnat_to_gnu): Likewise.
(add_decl_expr): Simplify NULL_TREE test.
(end_stmt_group): Likewise.
(build_binary_op_trapv): Fix formatting.
(get_exception_label): Use switch statement.
(init_code_table): Move around.
* gcc-interface/utils.c (global_bindings_p): Simplify NULL_TREE test.
(gnat_poplevel): Likewise.
(gnat_set_type_context): Likewise.
(defer_or_set_type_context): Fix formatting.
(gnat_pushdecl): Simplify NULL_TREE test.
(maybe_pad_type): Likewise.
(add_parallel_type): Likewise.
(create_range_type): Likewise.
(process_deferred_decl_context): Likewise.
(convert): Likewise.
(def_builtin_1): Likewise.
* gcc-interface/utils2.c (find_common_type): Likewise.
(build_binary_op): Likewise.
(gnat_rewrite_reference): Likewise.
(get_inner_constant_reference): Likewise.
2016-01-18 Eric Botcazou <ebotcazou@adacore.com>
PR ada/69219
* gcc-interface/trans.c (check_inlining_for_nested_subprog): Consider
the parent function instead of the current function in order to issue
the warning or the error. Add guard for ignored functions.
2016-01-17 Jakub Jelinek <jakub@redhat.com>
* adaint.c (__gnat_killprocesstree): Avoid -Wparentheses warning.
2016-01-15 Jakub Jelinek <jakub@redhat.com>
* adaint.c (__gnat_locate_exec_on_path): Use const char * instead
of char * for path_val to avoid warnings.
2016-01-06 Pierre-Marie de Rodat <derodat@adacore.com>
* gcc-interface/utils.c: Bump copyright year.
(rest_of_record_type_compilation): Add XVE/XVU parallel types to
the current lexical scope.
2016-01-04 Jakub Jelinek <jakub@redhat.com>
* gnat_ugn.texi: Bump @copying's copyright year.
* gnat_rm.texi: Likewise.
2016-01-02 Eric Botcazou <ebotcazou@adacore.com>
* gnatvsn.ads: Bump copyright year.
Copyright (C) 2016 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.
|