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
|
# DP: updates from the 4.8 branch upto 20140717 (r212756).
last_updated()
{
cat > ${dir}LAST_UPDATED <<EOF
Thu Jul 17 16:06:36 CEST 2014
Thu Jul 17 14:06:36 UTC 2014 (revision 212756)
EOF
}
LANG=C svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_4_8_3_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch \
| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'
Index: libstdc++-v3/scripts/run_doxygen
===================================================================
--- a/src/libstdc++-v3/scripts/run_doxygen (.../tags/gcc_4_8_3_release)
+++ b/src/libstdc++-v3/scripts/run_doxygen (.../branches/gcc-4_8-branch)
@@ -193,8 +193,15 @@
if $do_latex; then
cd ${outdir}/${mode}
- # Also drop in the header file and style sheet
- doxygen -w latex header.tex doxygen.sty
+ # Grrr, Doxygen 1.8.x changed the -w latex options.
+ need_footer=`doxygen -h | sed -n -e '/-w latex/s=.*footer.*=true=p'`
+
+ # Also drop in the header file (maybe footer file) and style sheet
+ if $need_footer; then
+ doxygen -w latex header.tex footer.tex doxygen.sty
+ else
+ doxygen -w latex header.tex doxygen.sty
+ fi
echo ::
echo :: LaTeX pages begin with
Index: libstdc++-v3/include/std/future
===================================================================
--- a/src/libstdc++-v3/include/std/future (.../tags/gcc_4_8_3_release)
+++ b/src/libstdc++-v3/include/std/future (.../branches/gcc-4_8-branch)
@@ -351,12 +351,14 @@
void
_M_set_result(function<_Ptr_type()> __res, bool __ignore_failure = false)
{
- bool __set = __ignore_failure;
+ bool __set = false;
// all calls to this function are serialized,
// side-effects of invoking __res only happen once
call_once(_M_once, &_State_base::_M_do_set, this, ref(__res),
ref(__set));
- if (!__set)
+ if (__set)
+ _M_cond.notify_all();
+ else if (!__ignore_failure)
__throw_future_error(int(future_errc::promise_already_satisfied));
}
@@ -471,7 +473,6 @@
lock_guard<mutex> __lock(_M_mutex);
_M_result.swap(__res);
}
- _M_cond.notify_all();
__set = true;
}
@@ -983,22 +984,25 @@
void
set_value(const _Res& __r)
{
+ auto __future = _M_future;
auto __setter = _State::__setter(this, __r);
- _M_future->_M_set_result(std::move(__setter));
+ __future->_M_set_result(std::move(__setter));
}
void
set_value(_Res&& __r)
{
+ auto __future = _M_future;
auto __setter = _State::__setter(this, std::move(__r));
- _M_future->_M_set_result(std::move(__setter));
+ __future->_M_set_result(std::move(__setter));
}
void
set_exception(exception_ptr __p)
{
+ auto __future = _M_future;
auto __setter = _State::__setter(__p, this);
- _M_future->_M_set_result(std::move(__setter));
+ __future->_M_set_result(std::move(__setter));
}
};
@@ -1081,15 +1085,17 @@
void
set_value(_Res& __r)
{
+ auto __future = _M_future;
auto __setter = _State::__setter(this, __r);
- _M_future->_M_set_result(std::move(__setter));
+ __future->_M_set_result(std::move(__setter));
}
void
set_exception(exception_ptr __p)
{
+ auto __future = _M_future;
auto __setter = _State::__setter(__p, this);
- _M_future->_M_set_result(std::move(__setter));
+ __future->_M_set_result(std::move(__setter));
}
};
@@ -1166,8 +1172,9 @@
void
set_exception(exception_ptr __p)
{
+ auto __future = _M_future;
auto __setter = _State::__setter(__p, this);
- _M_future->_M_set_result(std::move(__setter));
+ __future->_M_set_result(std::move(__setter));
}
};
@@ -1193,8 +1200,9 @@
inline void
promise<void>::set_value()
{
+ auto __future = _M_future;
auto __setter = _State::__setter(this);
- _M_future->_M_set_result(std::move(__setter));
+ __future->_M_set_result(std::move(__setter));
}
Index: libstdc++-v3/include/bits/stl_tree.h
===================================================================
--- a/src/libstdc++-v3/include/bits/stl_tree.h (.../tags/gcc_4_8_3_release)
+++ b/src/libstdc++-v3/include/bits/stl_tree.h (.../branches/gcc-4_8-branch)
@@ -510,11 +510,11 @@
_Link_type
_M_end()
- { return static_cast<_Link_type>(&this->_M_impl._M_header); }
+ { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
_Const_Link_type
_M_end() const
- { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
+ { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
static const_reference
_S_value(_Const_Link_type __x)
Index: libstdc++-v3/include/tr2/bool_set
===================================================================
--- a/src/libstdc++-v3/include/tr2/bool_set (.../tags/gcc_4_8_3_release)
+++ b/src/libstdc++-v3/include/tr2/bool_set (.../branches/gcc-4_8-branch)
@@ -44,7 +44,7 @@
* bool_set
*
* See N2136, Bool_set: multi-valued logic
- * by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
+ * by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
*
* The implicit conversion to bool is slippery! I may use the new
* explicit conversion. This has been specialized in the language
Index: libstdc++-v3/ChangeLog
===================================================================
--- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_4_8_3_release)
+++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,27 @@
+2014-06-03 Jonathan Wakely <jwakely@redhat.com>
+
+ Backport from mainline
+ 2014-04-15 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/60734
+ * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
+
+ Backport from mainline
+ 2014-05-16 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/60966
+ * include/std/future (__future_base::_State_baseV2::_M_set_result):
+ Signal condition variable after call_once returns.
+ (__future_base::_State_baseV2::_M_do_set): Do not signal here.
+ (promise::set_value, promise::set_exception): Increment the reference
+ count on the shared state until the function returns.
+ * testsuite/30_threads/promise/60966.cc: New.
+
+2014-05-29 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/tr2/bool_set: Use UTF-8 for accented characters.
+ * scripts/run_doxygen: Handle Doxygen 1.8.x change.
+
2014-05-22 Release Manager
* GCC 4.8.3 released.
Index: libstdc++-v3/testsuite/30_threads/promise/60966.cc
===================================================================
--- a/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../tags/gcc_4_8_3_release)
+++ b/src/libstdc++-v3/testsuite/30_threads/promise/60966.cc (.../branches/gcc-4_8-branch)
@@ -0,0 +1,67 @@
+// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
+// { dg-options " -std=gnu++11 -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-gnu* powerpc-ibm-aix* } }
+// { dg-options " -std=gnu++11 -pthreads" { target *-*-solaris* } }
+// { dg-options " -std=gnu++11 " { target *-*-cygwin *-*-darwin* } }
+// { dg-require-cstdint "" }
+// { dg-require-gthreads "" }
+// { dg-require-atomic-builtins "" }
+
+// Copyright (C) 2014 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// libstdc++/60966
+// This test hangs if std::promise::~promise() destroys the
+// shared state before std::promise::set_value() finishes using it.
+
+#include <future>
+#include <thread>
+#include <vector>
+
+const int THREADS = 10;
+
+void run_task(std::promise<void>* pr)
+{
+ std::this_thread::sleep_for(std::chrono::milliseconds(100));
+ pr->set_value();
+}
+
+int main()
+{
+ std::vector<std::promise<void>*> tasks(THREADS);
+ std::vector<std::thread> threads(THREADS);
+ std::vector<std::future<void>> futures(THREADS);
+
+ for (int i = 0; i < THREADS; ++i)
+ {
+ std::promise<void>* task = new std::promise<void>;
+ tasks[i] = task;
+ futures[i] = task->get_future();
+ threads[i] = std::thread(run_task, task);
+ }
+
+ for (int i = 0; i < THREADS; ++i)
+ {
+ // the temporary future releases the state as soon as wait() returns
+ std::future<void>(std::move(futures[i])).wait();
+ // state is ready, should now be safe to delete promise, so it
+ // releases the shared state too
+ delete tasks[i];
+ }
+
+ for (auto& t : threads)
+ t.join();
+}
Index: contrib/ChangeLog
===================================================================
--- a/src/contrib/ChangeLog (.../tags/gcc_4_8_3_release)
+++ b/src/contrib/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,7 @@
+2014-07-07 Richard Biener <rguenther@suse.de>
+
+ * gennews: Use gcc-3.0/index.html.
+
2014-05-22 Release Manager
* GCC 4.8.3 released.
Index: contrib/gennews
===================================================================
--- a/src/contrib/gennews (.../tags/gcc_4_8_3_release)
+++ b/src/contrib/gennews (.../branches/gcc-4_8-branch)
@@ -37,7 +37,7 @@
gcc-3.3/index.html gcc-3.3/changes.html
gcc-3.2/index.html gcc-3.2/changes.html
gcc-3.1/index.html gcc-3.1/changes.html
- gcc-3.0/gcc-3.0.html gcc-3.0/features.html gcc-3.0/caveats.html
+ gcc-3.0/index.html gcc-3.0/features.html gcc-3.0/caveats.html
gcc-2.95/index.html gcc-2.95/features.html gcc-2.95/caveats.html
egcs-1.1/index.html egcs-1.1/features.html egcs-1.1/caveats.html
egcs-1.0/index.html egcs-1.0/features.html egcs-1.0/caveats.html"
Index: libjava/classpath
===================================================================
--- a/src/libjava/classpath (.../tags/gcc_4_8_3_release)
+++ b/src/libjava/classpath (.../branches/gcc-4_8-branch)
Property changes on: libjava/classpath
___________________________________________________________________
Modified: svn:mergeinfo
Merged /trunk/libjava/classpath:r211733
Index: gcc/DATESTAMP
===================================================================
--- a/src/gcc/DATESTAMP (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/DATESTAMP (.../branches/gcc-4_8-branch)
@@ -1 +1 @@
-20140522
+20140717
Index: gcc/ipa-cp.c
===================================================================
--- a/src/gcc/ipa-cp.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/ipa-cp.c (.../branches/gcc-4_8-branch)
@@ -447,6 +447,8 @@
else if (!opt_for_fn (node->symbol.decl, optimize)
|| !opt_for_fn (node->symbol.decl, flag_ipa_cp))
reason = "non-optimized function";
+ else if (node->tm_clone)
+ reason = "transactional memory clone";
if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
Index: gcc/omp-low.c
===================================================================
--- a/src/gcc/omp-low.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/omp-low.c (.../branches/gcc-4_8-branch)
@@ -1586,7 +1586,6 @@
TREE_STATIC (decl) = 1;
TREE_USED (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
- DECL_NAMELESS (decl) = 1;
DECL_IGNORED_P (decl) = 0;
TREE_PUBLIC (decl) = 0;
DECL_UNINLINABLE (decl) = 1;
Index: gcc/ChangeLog
===================================================================
--- a/src/gcc/ChangeLog (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,283 @@
+2014-07-17 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
+ ASM_INPUT don't set reg_pending_barrier if it appears in a
+ debug-insn.
+
+2014-07-16 Jakub Jelinek <jakub@redhat.com>
+
+ * omp-low.c (create_omp_child_function): Don't set DECL_NAMELESS
+ on the FUNCTION_DECL.
+
+2014-07-10 Tom G. Christensen <tgc@jupiterrise.com>
+
+ * doc/install.texi: Remove links to defunct package providers for
+ Solaris.
+
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR middle-end/53590
+ * function.c (allocate_struct_function): Revert r188667 change.
+
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/61684
+ * tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
+ rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
+
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from Mainline
+ 2014-06-20 Jakub Jelinek <jakub@redhat.com>
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ PR tree-optimization/61306
+ * tree-ssa-math-opts.c (struct symbolic_number): Store type of
+ expression instead of its size.
+ (do_shift_rotate): Adapt to change in struct symbolic_number. Return
+ false to prevent optimization when the result is unpredictable due to
+ arithmetic right shift of signed type with highest byte is set.
+ (verify_symbolic_number_p): Adapt to change in struct symbolic_number.
+ (find_bswap_1): Likewise. Return NULL to prevent optimization when the
+ result is unpredictable due to sign extension.
+ (find_bswap): Adapt to change in struct symbolic_number.
+
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61586
+ * config/alpha/alpha.c (alpha_handle_trap_shadows): Handle BARRIER RTX.
+
+2014-06-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/61542
+ * config/rs6000/vsx.md (vsx_extract_v4sf): Fix bug with element
+ extraction other than index 3.
+
+2014-06-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/61570
+ * config/i386/driver-i386.c (host_detect_local_cpu): For unknown
+ model family 6 CPU with has_longmode never use a CPU without
+ 64-bit support.
+
+2014-06-20 Chung-Lin Tang <cltang@codesourcery.com>
+
+ Backport from mainline
+
+ 2014-06-20 Julian Brown <julian@codesourcery.com>
+ Chung-Lin Tang <cltang@codesourcery.com>
+
+ * config/arm/arm.c (arm_output_mi_thunk): Fix offset for
+ TARGET_THUMB1_ONLY. Add comments.
+
+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61423
+ * config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
+ define_insn_and_split pattern, merged from *floatunssi<mode>2_1
+ and corresponding splitters. Zero extend general register
+ or memory input operand to XMM temporary. Enable for
+ TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
+ (floatunssi<mode>2): Update expander predicate.
+
+2014-06-18 Richard Henderson <rth@redhat.com>
+
+ PR target/61545
+ * config/aarch64/aarch64.md (tlsdesc_small): Clobber CC_REGNUM.
+
+2014-06-17 Nagaraju Mekala <nagaraju.mekala@xilinx.com>
+
+ Revert on gcc-4_8-branch.
+ * config/microblaze/microblaze.md: Add movsi4_rev insn pattern.
+ * config/microblaze/predicates.md: Add reg_or_mem_operand predicate.
+
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ Backport from mainline
+
+ PR target/61483
+ * config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
+ variable 'size'; calculate 'size' right in the front; use
+ 'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
+ pcum->aapcs_stack_words.
+
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
+ PR target/61415
+ * config/rs6000/rs6000-builtin.def (BU_MISC_1): Delete.
+ (BU_MISC_2): Rename to ...
+ (BU_LDBL128_2): ... this.
+ * config/rs6000/rs6000.h (RS6000_BTM_LDBL128): New define.
+ (RS6000_BTM_COMMON): Add RS6000_BTM_LDBL128.
+ * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Handle
+ RS6000_BTM_LDBL128.
+ (rs6000_invalid_builtin): Add long double 128-bit builtin support.
+ (rs6000_builtin_mask_names): Add RS6000_BTM_LDBL128.
+ * config/rs6000/rs6000.md (unpacktf_0): Remove define)expand.
+ (unpacktf_1): Likewise.
+ * doc/extend.texi (__builtin_longdouble_dw0): Remove documentation.
+ (__builtin_longdouble_dw1): Likewise.
+ * doc/sourcebuild.texi (longdouble128): Document.
+
+2014-06-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/60731
+ * common.opt (-fno-gnu-unique): Add.
+ * config/elfos.h (USE_GNU_UNIQUE_OBJECT): Check it.
+
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from 2014-05-09 trunk r210272
+
+ * config/avr/avr-fixed.md (round<mode>3): Use -1U instead of -1 in
+ unsigned int initializers for regno_in, regno_out.
+
+ Backport from 2014-05-14 trunk r210418
+ * config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
+ shifted values to avoid build warning.
+
+ Backport from 2014-06-12 trunk r211491
+
+ PR target/61443
+ * config/avr/avr.md (push<mode>1): Avoid (subreg(mem)) when
+ loading from address spaces.
+
+2014-06-12 Alan Modra <amodra@gmail.com>
+
+ PR target/61300
+ * doc/tm.texi.in (INCOMING_REG_PARM_STACK_SPACE): Document.
+ * doc/tm.texi: Regenerate.
+ * function.c (INCOMING_REG_PARM_STACK_SPACE): Provide default.
+ Use throughout in place of REG_PARM_STACK_SPACE.
+ * config/rs6000/rs6000.c (rs6000_reg_parm_stack_space): Add
+ "incoming" param. Pass to rs6000_function_parms_need_stack.
+ (rs6000_function_parms_need_stack): Add "incoming" param, ignore
+ prototype_p when incoming. Use function decl when incoming
+ to handle K&R style functions.
+ * config/rs6000/rs6000.h (REG_PARM_STACK_SPACE): Adjust.
+ (INCOMING_REG_PARM_STACK_SPACE): Define.
+
+2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ Back port from trunk
+ 2014-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/61431
+ * config/rs6000/vsx.md (VSX_LE): Split VSX_D into 2 separate
+ iterators, VSX_D that handles 64-bit types, and VSX_LE that
+ handles swapping the two 64-bit double words on little endian
+ systems. Include V1TImode and optionally TImode in VSX_LE so that
+ these types are properly swapped. Change all of the insns and
+ splits that do the 64-bit swaps to use VSX_LE.
+ (vsx_le_perm_load_<mode>): Likewise.
+ (vsx_le_perm_store_<mode>): Likewise.
+ (splitters for little endian memory operations): Likewise.
+ (vsx_xxpermdi2_le_<mode>): Likewise.
+ (vsx_lxvd2x2_le_<mode>): Likewise.
+ (vsx_stxvd2x2_le_<mode>): Likewise.
+
+2014-06-05 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/61393
+ * ipa-cp.c (determine_versionability): Pretend that tm_clones are
+ not versionable.
+
+2014-06-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/61383
+ * tree-ssa-ifcombine.c (bb_no_side_effects_p): Make sure
+ stmts can't trap.
+
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
+
+ Backport from mainline
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/60866
+ * sel-sched-ir (sel_init_new_insn): New parameter old_seqno.
+ Default it to -1. Pass it down to init_simplejump_data.
+ (init_simplejump_data): New parameter old_seqno. Pass it down
+ to get_seqno_for_a_jump.
+ (get_seqno_for_a_jump): New parameter old_seqno. Use it for
+ initializing new jump seqno as a last resort. Add comment.
+ (sel_redirect_edge_and_branch): Save old seqno of the conditional
+ jump and pass it down to sel_init_new_insn.
+ (sel_redirect_edge_and_branch_force): Likewise.
+
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
+
+ Backport from mainline
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/60901
+ * config/i386/i386.c (ix86_dependencies_evaluation_hook): Check that
+ bb predecessor belongs to the same scheduling region. Adjust comment.
+
+2014-06-03 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-06-02 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61239
+ * config/i386/i386.c (ix86_expand_vec_perm) [case V32QImode]: Use
+ GEN_INT (-128) instead of GEN_INT (128) to set MSB of QImode constant.
+
+2014-05-28 Guozhi Wei <carrot@google.com>
+
+ PR target/61202
+ * config/aarch64/arm_neon.h (vqdmulh_n_s16): Change the last operand's
+ constraint.
+ (vqdmulhq_n_s16): Likewise.
+
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ Backport from mainline
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * double-int.c (div_and_round_double) <ROUND_DIV_EXPR>: Use the proper
+ predicate to detect a negative quotient.
+
+2014-05-28 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/61044
+ * doc/extend.texi (Local Labels): Note that label differences are
+ not supported for AVR.
+
+2014-05-26 Michael Tautschnig <mt@debian.org>
+
+ PR target/61249
+ * doc/extend.texi (X86 Built-in Functions): Fix parameter lists of
+ __builtin_ia32_vfrczs[sd] and __builtin_ia32_mpsadbw256.
+
+2014-05-23 Alan Modra <amodra@gmail.com>
+
+ PR target/61231
+ * config/rs6000/rs6000.c (mem_operand_gpr): Handle SImode.
+ * config/rs6000/rs6000.md (extendsidi2_lfiwax, extendsidi2_nocell):
+ Use "Y" constraint rather than "m".
+
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
+
+ * config/rs6000/htm.md (ttest): Use correct shift value to get CR0.
+
+2014-05-22 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/61208
+ * arm.md (arm_cmpdi_unsigned): Fix length calculation for Thumb2.
+
2014-05-22 Release Manager
* GCC 4.8.3 released.
Index: gcc/testsuite/gcc.target/powerpc/tfmode_off.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/tfmode_off.c (.../branches/gcc-4_8-branch)
@@ -1,6 +1,7 @@
/* { dg-do assemble } */
/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
/* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
+/* { dg-require-effective-target longdouble128 } */
/* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
typedef float TFmode __attribute__ ((mode (TF)));
Index: gcc/testsuite/gcc.target/powerpc/pack02.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/pack02.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/pack02.c (.../branches/gcc-4_8-branch)
@@ -2,6 +2,7 @@
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_fprs } */
+/* { dg-require-effective-target longdouble128 } */
/* { dg-options "-O2 -mhard-float" } */
#include <stddef.h>
Index: gcc/testsuite/gcc.target/powerpc/htm-ttest.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.target/powerpc/htm-ttest.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_htm_ok } */
+/* { dg-options "-O2 -mhtm" } */
+
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
+
+#include <htmintrin.h>
+long
+ttest (void)
+{
+ return _HTM_STATE(__builtin_ttest());
+}
Index: gcc/testsuite/gcc.target/alpha/pr61586.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/alpha/pr61586.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.target/alpha/pr61586.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mieee" } */
+
+void foo (int *dimensions, double **params, int hh)
+{
+ if (params[hh])
+ ;
+ else if (dimensions[hh] > 0)
+ params[hh][0] = 1.0f;
+}
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,35 @@
+/* Test AAPCS64 layout and __builtin_va_start.
+
+ Pass named HFA/HVA argument on stack. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-14.c"
+#include "type-def.h"
+
+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
+
+#include "abitest.h"
+#else
+ ARG (float, 1.0f, S0, 0)
+ ARG (float, 2.0f, S1, 1)
+ ARG (float, 3.0f, S2, 2)
+ ARG (float, 4.0f, S3, 3)
+ ARG (float, 5.0f, S4, 4)
+ ARG (float, 6.0f, S5, 5)
+ ARG (float, 7.0f, S6, 6)
+ ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
+ /* Previous argument size has been rounded up to the nearest multiple of
+ 8 bytes. */
+ ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
+ /* NSAA is rounded up to the nearest natural alignment of float32x4. */
+ ARG (vf4_t, float32x4, STACK + 32, 9)
+ ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
+ DOTS
+ LAST_ANON (double, 123456789.987, STACK + 64, 11)
+#endif
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
===================================================================
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h (.../branches/gcc-4_8-branch)
@@ -34,6 +34,13 @@
float b;
};
+struct hfa_fx3_t
+{
+ float a;
+ float b;
+ float c;
+};
+
struct hfa_dx2_t
{
double a;
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,59 @@
+/* Test AAPCS64 layout and __builtin_va_start.
+
+ Pass named HFA/HVA argument on stack. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-13.c"
+
+struct float_float_t
+{
+ float a;
+ float b;
+} float_float;
+
+union float_int_t
+{
+ float b8;
+ int b5;
+} float_int;
+
+#define HAS_DATA_INIT_FUNC
+void
+init_data ()
+{
+ float_float.a = 1.2f;
+ float_float.b = 2.2f;
+
+ float_int.b8 = 4983.80f;
+}
+
+#include "abitest.h"
+#else
+ ARG (float, 1.0f, S0, 0)
+ ARG (float, 2.0f, S1, 1)
+ ARG (float, 3.0f, S2, 2)
+ ARG (float, 4.0f, S3, 3)
+ ARG (float, 5.0f, S4, 4)
+ ARG (float, 6.0f, S5, 5)
+ ARG (float, 7.0f, S6, 6)
+ ARG (struct float_float_t, float_float, STACK, 7)
+ ARG (int, 9, W0, 8)
+ ARG (int, 10, W1, 9)
+ ARG (int, 11, W2, 10)
+ ARG (int, 12, W3, 11)
+ ARG (int, 13, W4, 12)
+ ARG (int, 14, W5, 13)
+ ARG (int, 15, W6, LAST_NAMED_ARG_ID)
+ DOTS
+ /* Note on the reason of using 'X7' instead of 'W7' here:
+ Using 'X7' makes sure the test works in the big-endian mode.
+ According to PCS rules B.4 and C.10, the size of float_int is rounded
+ to 8 bytes and prepared in the register X7 as if loaded via LDR from
+ the memory, with the content of the other 4 bytes unspecified. The
+ test framework will only compare the 4 relavent bytes. */
+ ANON (union float_int_t, float_int, X7, 15)
+ LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
+#endif
Index: gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,39 @@
+/* Test AAPCS64 layout and __builtin_va_start.
+
+ Pass named __128int argument on stack. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-15.c"
+#include "type-def.h"
+
+union int128_t qword;
+
+#define HAS_DATA_INIT_FUNC
+void
+init_data ()
+{
+ /* Init signed quad-word integer. */
+ qword.l64 = 0xfdb9753102468aceLL;
+ qword.h64 = 0xeca8642013579bdfLL;
+}
+
+#include "abitest.h"
+#else
+ ARG (int, 1, W0, 0)
+ ARG (int, 2, W1, 1)
+ ARG (int, 3, W2, 2)
+ ARG (int, 4, W3, 3)
+ ARG (int, 5, W4, 4)
+ ARG (int, 6, W5, 5)
+ ARG (int, 7, W6, 6)
+ ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
+ DOTS
+#ifndef __AAPCS64_BIG_ENDIAN__
+ LAST_ANON (int, 8, STACK + 16, 8)
+#else
+ LAST_ANON (int, 8, STACK + 20, 8)
+#endif
+#endif
Index: gcc/testsuite/gcc.target/avr/torture/pr61443.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.target/avr/torture/pr61443.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,134 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99" } */
+
+#include <stdlib.h>
+#include <stdarg.h>
+
+#define NC __attribute__((noinline,noclone))
+
+void NC vfun (char n, ...)
+{
+ va_list ap;
+
+ va_start (ap, n);
+
+ switch (n)
+ {
+ default:
+ abort();
+ case 1:
+ if (11 != va_arg (ap, int))
+ abort();
+ break;
+ case 2:
+ if (2222 != va_arg (ap, int))
+ abort();
+ break;
+ case 3:
+ if (333333 != va_arg (ap, __int24))
+ abort();
+ break;
+ case 4:
+ if (44444444 != va_arg (ap, long))
+ abort();
+ break;
+ case 8:
+ if (8888888888888888 != va_arg (ap, long long))
+ abort();
+ break;
+ }
+
+ va_end (ap);
+}
+
+
+void NC boo_qi (const __flash char *p)
+{
+ vfun (1, *p);
+}
+
+void NC boox_qi (const __memx char *p)
+{
+ vfun (1, *p);
+}
+
+void NC boo_hi (const __flash int *p)
+{
+ vfun (2, *p);
+}
+
+void NC boox_hi (const __memx int *p)
+{
+ vfun (2, *p);
+}
+
+void NC boo_psi (const __flash __int24 *p)
+{
+ vfun (3, *p);
+}
+
+void NC boox_psi (const __memx __int24 *p)
+{
+ vfun (3, *p);
+}
+
+void NC boo_si (const __flash long *p)
+{
+ vfun (4, *p);
+}
+
+void NC boox_si (const __memx long *p)
+{
+ vfun (4, *p);
+}
+
+void NC boo_di (const __flash long long *p)
+{
+ vfun (8, *p);
+}
+
+void NC boox_di (const __memx long long *p)
+{
+ vfun (8, *p);
+}
+
+const __flash char f_qi = 11;
+const __flash int f_hi = 2222;
+const __flash __int24 f_psi = 333333;
+const __flash long f_si = 44444444;
+const __flash long long f_di = 8888888888888888;
+
+const __memx char x_qi = 11;
+const __memx int x_hi = 2222;
+const __memx __int24 x_psi = 333333;
+const __memx long x_si = 44444444;
+const __memx long long x_di = 8888888888888888;
+
+char r_qi = 11;
+int r_hi = 2222;
+__int24 r_psi = 333333;
+long r_si = 44444444;
+long long r_di = 8888888888888888;
+
+int main (void)
+{
+ boo_qi (&f_qi);
+ boo_hi (&f_hi);
+ boo_psi (&f_psi);
+ boo_si (&f_si);
+ boo_di (&f_di);
+
+ boox_qi (&x_qi);
+ boox_hi (&x_hi);
+ boox_psi (&x_psi);
+ boox_si (&x_si);
+ boox_di (&x_di);
+
+ boox_qi (&r_qi);
+ boox_hi (&r_hi);
+ boox_psi (&r_psi);
+ boox_si (&r_si);
+ boox_di (&r_di);
+
+ exit (0);
+}
Index: gcc/testsuite/gcc.target/i386/pr61423.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr61423.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.target/i386/pr61423.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,38 @@
+/* PR target/61423 */
+/* { dg-do run { target ia32 } } */
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
+
+#define N 1024
+static unsigned int A[N];
+
+double
+__attribute__((noinline))
+func (void)
+{
+ unsigned int sum = 0;
+ unsigned i;
+ double t;
+
+ for (i = 0; i < N; i++)
+ sum += A[i];
+
+ t = sum;
+ return t;
+}
+
+int
+main ()
+{
+ unsigned i;
+ double d;
+
+ for(i = 0; i < N; i++)
+ A[i] = 1;
+
+ d = func();
+
+ if (d != 1024.0)
+ __builtin_abort ();
+
+ return 0;
+}
Index: gcc/testsuite/gcc.target/i386/pr60901.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.target/i386/pr60901.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,17 @@
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts" } */
+
+extern int n;
+extern void bar (void);
+extern int baz (int);
+
+void
+foo (void)
+{
+ int i, j;
+ for (j = 0; j < n; j++)
+ {
+ for (i = 1; i < j; i++)
+ bar ();
+ baz (0);
+ }
+}
Index: gcc/testsuite/gcc.target/i386/pr61446.c
===================================================================
--- a/src/gcc/testsuite/gcc.target/i386/pr61446.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.target/i386/pr61446.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,14 @@
+/* PR rtl-optimization/61446 */
+
+/* { dg-do compile { target { ia32 } } } */
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
+
+unsigned long long
+foo (float a)
+{
+ const double dfa = a;
+ const unsigned int hi = dfa / 0x1p32f;
+ const unsigned int lo = dfa - (double) hi * 0x1p32f;
+
+ return ((unsigned long long) hi << (4 * (8))) | lo;
+}
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-4_8-branch)
@@ -1790,6 +1790,15 @@
}]
}
+# Return 1 if the target supports long double of 128 bits,
+# 0 otherwise.
+
+proc check_effective_target_longdouble128 { } {
+ return [check_no_compiler_messages longdouble128 object {
+ int dummy[sizeof(long double) == 16 ? 1 : -1];
+ }]
+}
+
# Return 1 if the target supports double of 64 bits,
# 0 otherwise.
Index: gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 (.../branches/gcc-4_8-branch)
@@ -1,6 +1,6 @@
! { dg-require-effective-target fortran_large_real }
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
-! Test XFAILed on these platforms because the system's printf() lacks
+! { dg-do run { xfail powerpc*-apple-darwin* } }
+! Test XFAILed on this platform because the system's printf() lacks
! proper support for denormalized long doubles. See PR24685
!
! This tests that the default formats for formatted I/O of reals are
Index: gcc/testsuite/gfortran.dg/cray_pointers_10.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 (.../branches/gcc-4_8-branch)
@@ -0,0 +1,18 @@
+! { dg-do run }
+! { dg-options "-fcray-pointer" }
+!
+! PR fortran/45187
+!
+module foo
+ implicit none
+ real :: a
+ pointer(c_a, a)
+end module foo
+
+program test
+ use foo
+ real :: z
+ c_a = loc(z)
+ a = 42
+ if (z /= 42) call abort
+end program test
Index: gcc/testsuite/gfortran.dg/oldstyle_5.f
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/oldstyle_5.f (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gfortran.dg/oldstyle_5.f (.../branches/gcc-4_8-branch)
@@ -0,0 +1,8 @@
+C { dg-do compile }
+ TYPE T
+ INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
+ END TYPE
+ TYPE S
+ INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
+ END TYPE
+ END
Index: gcc/testsuite/gfortran.dg/nint_2.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/nint_2.f90 (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gfortran.dg/nint_2.f90 (.../branches/gcc-4_8-branch)
@@ -4,7 +4,8 @@
! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
!
! { dg-do run }
-! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
+! Note that this doesn't fail on powerpc64le-*-linux*.
real(kind=8) :: a
integer(kind=8) :: i1, i2
real :: b
Index: gcc/testsuite/gfortran.dg/allocatable_function_8.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 (.../branches/gcc-4_8-branch)
@@ -0,0 +1,47 @@
+! { dg-do run }
+! Test the fix for PR61459.
+!
+! Contributed by John Wingate <johnww@tds.net>
+!
+module a
+
+ implicit none
+ private
+ public :: f_segfault, f_segfault_plus, f_workaround
+ integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
+
+contains
+
+ function f_segfault(x)
+ real, dimension(:), allocatable :: f_segfault
+ real, dimension(:), intent(in) :: x
+ allocate(f_segfault(2))
+ f_segfault = matmul(b,x)
+ end function f_segfault
+
+! Sefaulted without the ALLOCATE as well.
+ function f_segfault_plus(x)
+ real, dimension(:), allocatable :: f_segfault_plus
+ real, dimension(:), intent(in) :: x
+ f_segfault_plus = matmul(b,x)
+ end function f_segfault_plus
+
+ function f_workaround(x)
+ real, dimension(:), allocatable :: f_workaround
+ real, dimension(:), intent(in) :: x
+ real, dimension(:), allocatable :: tmp
+ allocate(f_workaround(2),tmp(2))
+ tmp = matmul(b,x)
+ f_workaround = tmp
+ end function f_workaround
+
+end module a
+
+program main
+ use a
+ implicit none
+ real, dimension(2) :: x = 1.0, y
+ y = f_workaround (x)
+ if (any (f_segfault (x) .ne. y)) call abort
+ if (any (f_segfault_plus (x) .ne. y)) call abort
+end program main
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,39 @@
+#ifdef __INT32_TYPE__
+typedef __INT32_TYPE__ int32_t;
+#else
+typedef int int32_t;
+#endif
+
+#ifdef __UINT32_TYPE__
+typedef __UINT32_TYPE__ uint32_t;
+#else
+typedef unsigned uint32_t;
+#endif
+
+#define __fake_const_swab32(x) ((uint32_t)( \
+ (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
+ (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
+ (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
+ (( (int32_t)(x) & (int32_t)0xff000000UL) >> 24)))
+
+/* Previous version of bswap optimization failed to consider sign extension
+ and as a result would replace an expression *not* doing a bswap by a
+ bswap. */
+
+__attribute__ ((noinline, noclone)) uint32_t
+fake_bswap32 (uint32_t in)
+{
+ return __fake_const_swab32 (in);
+}
+
+int
+main(void)
+{
+ if (sizeof (int32_t) * __CHAR_BIT__ != 32)
+ return 0;
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
+ return 0;
+ if (fake_bswap32 (0x87654321) != 0xffffff87)
+ __builtin_abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
===================================================================
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,13 @@
+short a = -1;
+int b;
+char c;
+
+int
+main ()
+{
+ c = a;
+ b = a | c;
+ if (b != -1)
+ __builtin_abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
===================================================================
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,40 @@
+#ifdef __INT16_TYPE__
+typedef __INT16_TYPE__ int16_t;
+#else
+typedef short int16_t;
+#endif
+
+#ifdef __UINT32_TYPE__
+typedef __UINT32_TYPE__ uint32_t;
+#else
+typedef unsigned uint32_t;
+#endif
+
+#define __fake_const_swab32(x) ((uint32_t)( \
+ (((uint32_t) (x) & (uint32_t)0x000000ffUL) << 24) | \
+ (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) << 8) | \
+ (((uint32_t) (x) & (uint32_t)0x00ff0000UL) >> 8) | \
+ (((uint32_t) (x) & (uint32_t)0xff000000UL) >> 24)))
+
+
+/* Previous version of bswap optimization failed to consider sign extension
+ and as a result would replace an expression *not* doing a bswap by a
+ bswap. */
+
+__attribute__ ((noinline, noclone)) uint32_t
+fake_bswap32 (uint32_t in)
+{
+ return __fake_const_swab32 (in);
+}
+
+int
+main(void)
+{
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
+ return 0;
+ if (sizeof (int16_t) * __CHAR_BIT__ != 16)
+ return 0;
+ if (fake_bswap32 (0x81828384) != 0xff838281)
+ __builtin_abort ();
+ return 0;
+}
Index: gcc/testsuite/gcc.c-torture/compile/pr61684.c
===================================================================
--- a/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.c-torture/compile/pr61684.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,15 @@
+/* PR tree-optimization/61684 */
+
+int a, c;
+static int *b = 0;
+short d;
+static short **e = 0;
+
+void
+foo ()
+{
+ for (; c < 1; c++)
+ ;
+ *e = &d;
+ a = d && (c && 1) & *b;
+}
Index: gcc/testsuite/gnat.dg/opt39.adb
===================================================================
--- a/src/gcc/testsuite/gnat.dg/opt39.adb (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gnat.dg/opt39.adb (.../branches/gcc-4_8-branch)
@@ -0,0 +1,31 @@
+-- { dg-do compile }
+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
+
+procedure Opt39 (I : Integer) is
+
+ type Rec is record
+ I1 : Integer;
+ I2 : Integer;
+ I3 : Integer;
+ I4 : Integer;
+ I5 : Integer;
+ end record;
+
+ procedure Set (A : access Rec; I : Integer) is
+ Tmp : Rec := A.all;
+ begin
+ Tmp.I1 := I;
+ A.all := Tmp;
+ end;
+
+ R : aliased Rec;
+
+begin
+ Set (R'Access, I);
+ if R.I1 /= I then
+ raise Program_Error;
+ end if;
+end;
+
+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
+-- { dg-final { cleanup-tree-dump "optimized" } }
Index: gcc/testsuite/gnat.dg/overflow_fixed.adb
===================================================================
--- a/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gnat.dg/overflow_fixed.adb (.../branches/gcc-4_8-branch)
@@ -0,0 +1,19 @@
+-- { dg-do run }
+-- { dg-options "-gnato -O" }
+
+procedure Overflow_Fixed is
+
+ type Unsigned_8_Bit is mod 2**8;
+
+ procedure Fixed_To_Eight (Value : Duration) is
+ Item : Unsigned_8_Bit;
+ begin
+ Item := Unsigned_8_Bit(Value);
+ raise Program_Error;
+ exception
+ when Constraint_Error => null; -- expected case
+ end;
+
+begin
+ Fixed_To_Eight (-0.5);
+end;
Index: gcc/testsuite/gnat.dg/aliasing1.adb
===================================================================
--- a/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gnat.dg/aliasing1.adb (.../branches/gcc-4_8-branch)
@@ -18,5 +18,5 @@
end Aliasing1;
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
-- { dg-final { cleanup-tree-dump "optimized" } }
Index: gcc/testsuite/gcc.dg/pr60866.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/pr60866.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.dg/pr60866.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,18 @@
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns" } */
+
+int n;
+
+void
+foo (int w, int **dnroot, int **dn)
+{
+ int *child;
+ int *xchild = xchild;
+ for (; w < n; w++)
+ if (!dnroot)
+ {
+ dnroot = dn;
+ for (child = *dn; child; child = xchild)
+ ;
+ }
+}
Index: gcc/testsuite/gcc.dg/torture/pr61383-1.c
===================================================================
--- a/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/gcc.dg/torture/pr61383-1.c (.../branches/gcc-4_8-branch)
@@ -0,0 +1,35 @@
+/* { dg-do run } */
+
+int a, b = 1, c, d, e, f, g;
+
+int
+fn1 ()
+{
+ int h;
+ for (;;)
+ {
+ g = b;
+ g = g ? 0 : 1 % g;
+ e = a + 1;
+ for (; d < 1; d = e)
+ {
+ if (f == 0)
+ h = 0;
+ else
+ h = 1 % f;
+ if (f < 1)
+ c = 0;
+ else if (h)
+ break;
+ }
+ if (b)
+ return 0;
+ }
+}
+
+int
+main ()
+{
+ fn1 ();
+ return 0;
+}
Index: gcc/testsuite/ChangeLog
===================================================================
--- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,137 @@
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt39.adb: New test.
+
+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/61459
+ PR fortran/58883
+ * gfortran.dg/allocatable_function_8.f90 : New test
+
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/61684
+ * gcc.c-torture/compile/pr61684.c: New test.
+
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
+ Fritz Reese <Reese-Fritz@zai.com>
+
+ * gfortran.dg/oldstyle_5.f: New test.
+
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ Backport from mainline
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ PR tree-optimization/61306
+ * gcc.c-torture/execute/pr61306-1.c: New test.
+ * gcc.c-torture/execute/pr61306-2.c: Likewise.
+ * gcc.c-torture/execute/pr61306-3.c: Likewise.
+
+2014-06-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
+
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61586
+ * gcc.target/alpha/pr61586.c: New test.
+
+2014-06-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gfortran.dg/default_format_denormal_2.f90: Remove xfail for
+ powerpc*-*-linux*.
+
+2014-06-18 Uros Bizjak <ubizjak@gmail.com>
+
+ Backport from mainline
+ 2014-06-13 Ilya Enkovich <ilya.enkovich@intel.com>
+
+ PR rtl-optimization/61094
+ PR rtl-optimization/61446
+ * gcc.target/i386/pr61446.c : New.
+
+ Backport from mainline
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61423
+ * gcc.target/i386/pr61423.c: New test.
+
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ Backport from mainline
+
+ PR target/61483
+ * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
+ * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
+ * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
+ * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
+
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ Backport from trunk.
+ PR fortran/45187
+ * gfortran.dg/cray_pointers_10.f90: New file.
+
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
+ PR target/61415
+ * lib/target-supports.exp (check_effective_target_longdouble128): New.
+ * gcc.target/powerpc/pack02.c: Use it.
+ * gcc.target/powerpc/tfmode_off.c: Likewise.
+
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
+
+ Backport from 2014-06-12 trunk r211491
+
+ PR target/61443
+ * gcc.target/avr/torture/pr61443.c: New test.
+
+2014-06-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/61383
+ * gcc.dg/torture/pr61383-1.c: New testcase.
+
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
+
+ Backport from mainline
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/60866
+ * gcc.dg/pr60866.c: New test.
+
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
+
+ Backport from mainline
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/60901
+ * gcc.target/i386/pr60901.c: New test.
+
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ Backport from mainline
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/overflow_fixed.adb: New test.
+
+2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
+
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
+
+ Backport from mainline
+ 2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
+
+ * gcc.target/powerpc/htm-ttest.c: New test.
+
2014-05-22 Release Manager
* GCC 4.8.3 released.
Index: gcc/testsuite/g++.dg/cpp0x/variadic158.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic158.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,24 @@
+// PR c++/61134
+// { dg-do compile { target c++11 } }
+
+struct Base { };
+
+template <typename>
+struct Fixed {
+ typedef const char* name;
+};
+
+template <typename VT, typename... Fields>
+void New(const char* name,
+ typename Fixed<Fields>::name... field_names);
+
+template <typename VT, typename... Fields>
+void CreateMetric(const char* name,
+ typename Fixed<Fields>::name... field_names,
+ const Base&) { }
+
+
+void Fn()
+{
+ CreateMetric<int, const char*>("abcd", "def", Base());
+}
Index: gcc/testsuite/g++.dg/cpp0x/variadic160.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/g++.dg/cpp0x/variadic160.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,49 @@
+// PR c++/61539
+// { dg-do compile { target c++11 } }
+
+template <typename _CharT> class A;
+template <typename> class B;
+template <class charT> class C;
+template <> class C<char>
+{
+ virtual void xparse (int &, const B<A<char> > &) const;
+};
+template <class T, class charT = char> class G : C<charT>
+{
+public:
+ G (void *) {}
+ void default_value (const T &);
+ void xparse (int &, const B<A<charT> > &) const;
+};
+template <class T, class charT>
+void validate (int &, const B<A<charT> > &, T *, int);
+template <class T, class charT>
+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
+{
+ validate (p1, p2, (T *)0, 0);
+}
+template <class T> G<T> *value (T *) { return new G<T>(0); }
+namespace Eigen
+{
+template <typename T> struct D;
+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
+ int _MaxCols>
+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
+{
+ typedef _Scalar Scalar;
+};
+template <typename, int, int, int, int, int _MaxCols> class F
+{
+public:
+ typedef typename Eigen::D<F>::Scalar Scalar;
+ F (const Scalar &, const Scalar &, const Scalar &);
+};
+template <class... T>
+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
+}
+int main (int, char *[])
+{
+ Eigen::F<double, 3, 1> a (0, 0, 0);
+ value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
+}
Index: gcc/testsuite/g++.dg/template/local-fn1.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/template/local-fn1.C (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/g++.dg/template/local-fn1.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,8 @@
+// PR c++/60605
+
+template <typename T = int>
+struct Foo {
+ void bar() {
+ void bug();
+ }
+};
Index: gcc/testsuite/g++.dg/template/conv14.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/template/conv14.C (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/g++.dg/template/conv14.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,30 @@
+// PR c++/61647
+
+class XX;
+
+template<typename Container, typename Key>
+struct Accessor;
+
+template<typename Container, typename Key, typename KeyStore = Key>
+class Variant {
+protected:
+ KeyStore index;
+ Container state;
+public:
+ Variant(Container st, const Key& i) : index(i), state(st) {}
+
+ template<typename T>
+ operator T() const {
+ return Accessor<Container, KeyStore>::template get<T>(state, index);
+ }
+};
+
+class AutoCleanVariant : public Variant<XX*, int> {
+public:
+ AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
+
+ template<typename T>
+ operator T() const {
+ return Variant<XX*, int>::operator T();
+ }
+};
Index: gcc/testsuite/g++.dg/template/ptrmem27.C
===================================================================
--- a/src/gcc/testsuite/g++.dg/template/ptrmem27.C (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/testsuite/g++.dg/template/ptrmem27.C (.../branches/gcc-4_8-branch)
@@ -0,0 +1,22 @@
+// PR c++/61500
+
+struct X {
+ int i;
+ int j;
+
+ int foo(int X::* ptr);
+
+ template <int X::* ptr>
+ int bar();
+};
+
+int X::foo(int X::* ptr) {
+ int* p = &(this->*ptr); // OK.
+ return *p;
+}
+
+template <int X::* ptr>
+int X::bar() {
+ int* p = &(this->*ptr); // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
+ return *p;
+}
Index: gcc/cp/tree.c
===================================================================
--- a/src/gcc/cp/tree.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/cp/tree.c (.../branches/gcc-4_8-branch)
@@ -97,6 +97,16 @@
case IMAGPART_EXPR:
return lvalue_kind (TREE_OPERAND (ref, 0));
+ case MEMBER_REF:
+ case DOTSTAR_EXPR:
+ if (TREE_CODE (ref) == MEMBER_REF)
+ op1_lvalue_kind = clk_ordinary;
+ else
+ op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
+ if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1))))
+ op1_lvalue_kind = clk_none;
+ return op1_lvalue_kind;
+
case COMPONENT_REF:
op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0));
/* Look at the member designator. */
Index: gcc/cp/ChangeLog
===================================================================
--- a/src/gcc/cp/ChangeLog (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/cp/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,25 @@
+2014-06-30 Jason Merrill <jason@redhat.com>
+
+ PR c++/61647
+ * pt.c (type_dependent_expression_p): Check BASELINK_OPTYPE.
+
+ PR c++/61539
+ * pt.c (unify_one_argument): Type/expression mismatch just causes
+ deduction failure.
+
+ PR c++/61500
+ * tree.c (lvalue_kind): Handle MEMBER_REF and DOTSTAR_EXPR.
+
+2014-06-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/60605
+ * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
+
+2014-06-02 Jason Merrill <jason@redhat.com>
+
+ PR c++/61134
+ * pt.c (pack_deducible_p): Handle canonicalization.
+
2014-05-22 Release Manager
* GCC 4.8.3 released.
Index: gcc/cp/pt.c
===================================================================
--- a/src/gcc/cp/pt.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/cp/pt.c (.../branches/gcc-4_8-branch)
@@ -4308,7 +4308,8 @@
in the template-parameter-list of the definition of a member of a
class template. */
- if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
+ if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
+ || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
/* You can't have a function template declaration in a local
scope, nor you can you define a member of a class template in a
local scope. */
@@ -14934,7 +14935,7 @@
continue;
for (packs = PACK_EXPANSION_PARAMETER_PACKS (type);
packs; packs = TREE_CHAIN (packs))
- if (TREE_VALUE (packs) == parm)
+ if (template_args_equal (TREE_VALUE (packs), parm))
{
/* The template parameter pack is used in a function parameter
pack. If this is the end of the parameter list, the
@@ -15502,8 +15503,9 @@
maybe_adjust_types_for_deduction (strict, &parm, &arg, arg_expr);
}
else
- gcc_assert ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
- == (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL));
+ if ((TYPE_P (parm) || TREE_CODE (parm) == TEMPLATE_DECL)
+ != (TYPE_P (arg) || TREE_CODE (arg) == TEMPLATE_DECL))
+ return unify_template_argument_mismatch (explain_p, parm, arg);
/* For deduction from an init-list we need the actual list. */
if (arg_expr && BRACE_ENCLOSED_INITIALIZER_P (arg_expr))
@@ -20009,7 +20011,12 @@
return true;
if (BASELINK_P (expression))
- expression = BASELINK_FUNCTIONS (expression);
+ {
+ if (BASELINK_OPTYPE (expression)
+ && dependent_type_p (BASELINK_OPTYPE (expression)))
+ return true;
+ expression = BASELINK_FUNCTIONS (expression);
+ }
if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
{
Index: gcc/double-int.c
===================================================================
--- a/src/gcc/double-int.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/double-int.c (.../branches/gcc-4_8-branch)
@@ -616,7 +616,7 @@
== (unsigned HOST_WIDE_INT) htwice)
&& (labs_den <= ltwice)))
{
- if (*hquo < 0)
+ if (quo_neg)
/* quo = quo - 1; */
add_double (*lquo, *hquo,
(HOST_WIDE_INT) -1, (HOST_WIDE_INT) -1, lquo, hquo);
Index: gcc/tree-ssa-math-opts.c
===================================================================
--- a/src/gcc/tree-ssa-math-opts.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/tree-ssa-math-opts.c (.../branches/gcc-4_8-branch)
@@ -1537,7 +1537,7 @@
struct symbolic_number {
unsigned HOST_WIDEST_INT n;
- int size;
+ tree type;
};
/* Perform a SHIFT or ROTATE operation by COUNT bits on symbolic
@@ -1549,13 +1549,15 @@
struct symbolic_number *n,
int count)
{
+ int bitsize = TYPE_PRECISION (n->type);
+
if (count % 8 != 0)
return false;
/* Zero out the extra bits of N in order to avoid them being shifted
into the significant bits. */
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
switch (code)
{
@@ -1563,20 +1565,24 @@
n->n <<= count;
break;
case RSHIFT_EXPR:
+ /* Arithmetic shift of signed type: result is dependent on the value. */
+ if (!TYPE_UNSIGNED (n->type)
+ && (n->n & ((unsigned HOST_WIDEST_INT) 0xff << (bitsize - 8))))
+ return false;
n->n >>= count;
break;
case LROTATE_EXPR:
- n->n = (n->n << count) | (n->n >> ((n->size * BITS_PER_UNIT) - count));
+ n->n = (n->n << count) | (n->n >> (bitsize - count));
break;
case RROTATE_EXPR:
- n->n = (n->n >> count) | (n->n << ((n->size * BITS_PER_UNIT) - count));
+ n->n = (n->n >> count) | (n->n << (bitsize - count));
break;
default:
return false;
}
/* Zero unused bits for size. */
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
- n->n &= ((unsigned HOST_WIDEST_INT)1 << (n->size * BITS_PER_UNIT)) - 1;
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
+ n->n &= ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
return true;
}
@@ -1593,7 +1599,7 @@
if (TREE_CODE (lhs_type) != INTEGER_TYPE)
return false;
- if (TYPE_PRECISION (lhs_type) != n->size * BITS_PER_UNIT)
+ if (TYPE_PRECISION (lhs_type) != TYPE_PRECISION (n->type))
return false;
return true;
@@ -1650,20 +1656,23 @@
to initialize the symbolic number. */
if (!source_expr1)
{
+ int size;
+
/* Set up the symbolic number N by setting each byte to a
value between 1 and the byte size of rhs1. The highest
order byte is set to n->size and the lowest order
byte to 1. */
- n->size = TYPE_PRECISION (TREE_TYPE (rhs1));
- if (n->size % BITS_PER_UNIT != 0)
+ n->type = TREE_TYPE (rhs1);
+ size = TYPE_PRECISION (n->type);
+ if (size % BITS_PER_UNIT != 0)
return NULL_TREE;
- n->size /= BITS_PER_UNIT;
+ size /= BITS_PER_UNIT;
n->n = (sizeof (HOST_WIDEST_INT) < 8 ? 0 :
(unsigned HOST_WIDEST_INT)0x08070605 << 32 | 0x04030201);
- if (n->size < (int)sizeof (HOST_WIDEST_INT))
+ if (size < (int)sizeof (HOST_WIDEST_INT))
n->n &= ((unsigned HOST_WIDEST_INT)1 <<
- (n->size * BITS_PER_UNIT)) - 1;
+ (size * BITS_PER_UNIT)) - 1;
source_expr1 = rhs1;
}
@@ -1672,12 +1681,12 @@
{
case BIT_AND_EXPR:
{
- int i;
+ int i, size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
unsigned HOST_WIDEST_INT val = widest_int_cst_value (rhs2);
unsigned HOST_WIDEST_INT tmp = val;
/* Only constants masking full bytes are allowed. */
- for (i = 0; i < n->size; i++, tmp >>= BITS_PER_UNIT)
+ for (i = 0; i < size; i++, tmp >>= BITS_PER_UNIT)
if ((tmp & 0xff) != 0 && (tmp & 0xff) != 0xff)
return NULL_TREE;
@@ -1693,12 +1702,22 @@
break;
CASE_CONVERT:
{
- int type_size;
+ int type_size, old_type_size;
+ tree type;
- type_size = TYPE_PRECISION (gimple_expr_type (stmt));
+ type = gimple_expr_type (stmt);
+ type_size = TYPE_PRECISION (type);
if (type_size % BITS_PER_UNIT != 0)
return NULL_TREE;
+ /* Sign extension: result is dependent on the value. */
+ old_type_size = TYPE_PRECISION (n->type);
+ if (!TYPE_UNSIGNED (n->type)
+ && type_size > old_type_size
+ && n->n &
+ ((unsigned HOST_WIDEST_INT) 0xff << (old_type_size - 8)))
+ return NULL_TREE;
+
if (type_size / BITS_PER_UNIT < (int)(sizeof (HOST_WIDEST_INT)))
{
/* If STMT casts to a smaller type mask out the bits not
@@ -1705,7 +1724,7 @@
belonging to the target type. */
n->n &= ((unsigned HOST_WIDEST_INT)1 << type_size) - 1;
}
- n->size = type_size / BITS_PER_UNIT;
+ n->type = type;
}
break;
default:
@@ -1718,7 +1737,7 @@
if (rhs_class == GIMPLE_BINARY_RHS)
{
- int i;
+ int i, size;
struct symbolic_number n1, n2;
unsigned HOST_WIDEST_INT mask;
tree source_expr2;
@@ -1742,11 +1761,12 @@
source_expr2 = find_bswap_1 (rhs2_stmt, &n2, limit - 1);
if (source_expr1 != source_expr2
- || n1.size != n2.size)
+ || TYPE_PRECISION (n1.type) != TYPE_PRECISION (n2.type))
return NULL_TREE;
- n->size = n1.size;
- for (i = 0, mask = 0xff; i < n->size; i++, mask <<= BITS_PER_UNIT)
+ n->type = n1.type;
+ size = TYPE_PRECISION (n->type) / BITS_PER_UNIT;
+ for (i = 0, mask = 0xff; i < size; i++, mask <<= BITS_PER_UNIT)
{
unsigned HOST_WIDEST_INT masked1, masked2;
@@ -1785,7 +1805,7 @@
struct symbolic_number n;
tree source_expr;
- int limit;
+ int limit, bitsize;
/* The last parameter determines the depth search limit. It usually
correlates directly to the number of bytes to be touched. We
@@ -1800,13 +1820,14 @@
return NULL_TREE;
/* Zero out the extra bits of N and CMP. */
- if (n.size < (int)sizeof (HOST_WIDEST_INT))
+ bitsize = TYPE_PRECISION (n.type);
+ if (bitsize < 8 * (int)sizeof (HOST_WIDEST_INT))
{
unsigned HOST_WIDEST_INT mask =
- ((unsigned HOST_WIDEST_INT)1 << (n.size * BITS_PER_UNIT)) - 1;
+ ((unsigned HOST_WIDEST_INT)1 << bitsize) - 1;
n.n &= mask;
- cmp >>= (sizeof (HOST_WIDEST_INT) - n.size) * BITS_PER_UNIT;
+ cmp >>= sizeof (HOST_WIDEST_INT) * BITS_PER_UNIT - bitsize;
}
/* A complete byte swap should make the symbolic number to start
Index: gcc/tree-ssa-ifcombine.c
===================================================================
--- a/src/gcc/tree-ssa-ifcombine.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/tree-ssa-ifcombine.c (.../branches/gcc-4_8-branch)
@@ -105,7 +105,11 @@
{
gimple stmt = gsi_stmt (gsi);
+ if (is_gimple_debug (stmt))
+ continue;
+
if (gimple_has_side_effects (stmt)
+ || gimple_could_trap_p (stmt)
|| gimple_vuse (stmt))
return false;
}
@@ -197,7 +201,8 @@
while (is_gimple_assign (stmt)
&& ((CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (stmt))
&& (TYPE_PRECISION (TREE_TYPE (gimple_assign_lhs (stmt)))
- <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt)))))
+ <= TYPE_PRECISION (TREE_TYPE (gimple_assign_rhs1 (stmt))))
+ && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME)
|| gimple_assign_ssa_name_copy_p (stmt)))
stmt = SSA_NAME_DEF_STMT (gimple_assign_rhs1 (stmt));
Index: gcc/sel-sched-ir.c
===================================================================
--- a/src/gcc/sel-sched-ir.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/sel-sched-ir.c (.../branches/gcc-4_8-branch)
@@ -162,7 +162,7 @@
static void free_av_set (basic_block);
static void invalidate_av_set (basic_block);
static void extend_insn_data (void);
-static void sel_init_new_insn (insn_t, int);
+static void sel_init_new_insn (insn_t, int, int = -1);
static void finish_insns (void);
/* Various list functions. */
@@ -4011,9 +4011,10 @@
return seqno;
}
-/* Compute seqno for INSN by its preds or succs. */
+/* Compute seqno for INSN by its preds or succs. Use OLD_SEQNO to compute
+ seqno in corner cases. */
static int
-get_seqno_for_a_jump (insn_t insn)
+get_seqno_for_a_jump (insn_t insn, int old_seqno)
{
int seqno;
@@ -4069,8 +4070,16 @@
if (seqno < 0)
seqno = get_seqno_by_succs (insn);
+ if (seqno < 0)
+ {
+ /* The only case where this could be here legally is that the only
+ unscheduled insn was a conditional jump that got removed and turned
+ into this unconditional one. Initialize from the old seqno
+ of that jump passed down to here. */
+ seqno = old_seqno;
+ }
+
gcc_assert (seqno >= 0);
-
return seqno;
}
@@ -4250,22 +4259,24 @@
}
/* This is used to initialize spurious jumps generated by
- sel_redirect_edge (). */
+ sel_redirect_edge (). OLD_SEQNO is used for initializing seqnos
+ in corner cases within get_seqno_for_a_jump. */
static void
-init_simplejump_data (insn_t insn)
+init_simplejump_data (insn_t insn, int old_seqno)
{
init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
vNULL, true, false, false,
false, true);
- INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
+ INSN_SEQNO (insn) = get_seqno_for_a_jump (insn, old_seqno);
init_first_time_insn_data (insn);
}
/* Perform deferred initialization of insns. This is used to process
- a new jump that may be created by redirect_edge. */
-void
-sel_init_new_insn (insn_t insn, int flags)
+ a new jump that may be created by redirect_edge. OLD_SEQNO is used
+ for initializing simplejumps in init_simplejump_data. */
+static void
+sel_init_new_insn (insn_t insn, int flags, int old_seqno)
{
/* We create data structures for bb when the first insn is emitted in it. */
if (INSN_P (insn)
@@ -4292,7 +4303,7 @@
if (flags & INSN_INIT_TODO_SIMPLEJUMP)
{
extend_insn_data ();
- init_simplejump_data (insn);
+ init_simplejump_data (insn, old_seqno);
}
gcc_assert (CONTAINING_RGN (BLOCK_NUM (insn))
@@ -5578,8 +5589,7 @@
}
/* A wrapper for redirect_edge_and_branch_force, which also initializes
- data structures for possibly created bb and insns. Returns the newly
- added bb or NULL, when a bb was not needed. */
+ data structures for possibly created bb and insns. */
void
sel_redirect_edge_and_branch_force (edge e, basic_block to)
{
@@ -5586,6 +5596,7 @@
basic_block jump_bb, src, orig_dest = e->dest;
int prev_max_uid;
rtx jump;
+ int old_seqno = -1;
/* This function is now used only for bookkeeping code creation, where
we'll never get the single pred of orig_dest block and thus will not
@@ -5594,8 +5605,13 @@
&& !single_pred_p (orig_dest));
src = e->src;
prev_max_uid = get_max_uid ();
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
+ when the conditional jump being redirected may become unconditional. */
+ if (any_condjump_p (BB_END (src))
+ && INSN_SEQNO (BB_END (src)) >= 0)
+ old_seqno = INSN_SEQNO (BB_END (src));
+
jump_bb = redirect_edge_and_branch_force (e, to);
-
if (jump_bb != NULL)
sel_add_bb (jump_bb);
@@ -5607,7 +5623,8 @@
jump = find_new_jump (src, jump_bb, prev_max_uid);
if (jump)
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP,
+ old_seqno);
set_immediate_dominator (CDI_DOMINATORS, to,
recompute_dominator (CDI_DOMINATORS, to));
set_immediate_dominator (CDI_DOMINATORS, orig_dest,
@@ -5626,6 +5643,7 @@
edge redirected;
bool recompute_toporder_p = false;
bool maybe_unreachable = single_pred_p (orig_dest);
+ int old_seqno = -1;
latch_edge_p = (pipelining_p
&& current_loop_nest
@@ -5634,6 +5652,12 @@
src = e->src;
prev_max_uid = get_max_uid ();
+ /* Compute and pass old_seqno down to sel_init_new_insn only for the case
+ when the conditional jump being redirected may become unconditional. */
+ if (any_condjump_p (BB_END (src))
+ && INSN_SEQNO (BB_END (src)) >= 0)
+ old_seqno = INSN_SEQNO (BB_END (src));
+
redirected = redirect_edge_and_branch (e, to);
gcc_assert (redirected && !last_added_blocks.exists ());
@@ -5654,7 +5678,7 @@
jump = find_new_jump (src, NULL, prev_max_uid);
if (jump)
- sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP);
+ sel_init_new_insn (jump, INSN_INIT_TODO_LUID | INSN_INIT_TODO_SIMPLEJUMP, old_seqno);
/* Only update dominator info when we don't have unreachable blocks.
Otherwise we'll update in maybe_tidy_empty_bb. */
Index: gcc/fortran/trans-expr.c
===================================================================
--- a/src/gcc/fortran/trans-expr.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/fortran/trans-expr.c (.../branches/gcc-4_8-branch)
@@ -7096,7 +7096,7 @@
res_desc = gfc_evaluate_now (desc, &se->pre);
gfc_conv_descriptor_data_set (&se->pre, res_desc, null_pointer_node);
- se->expr = gfc_build_addr_expr (TREE_TYPE (se->expr), res_desc);
+ se->expr = gfc_build_addr_expr (NULL_TREE, res_desc);
/* Free the lhs after the function call and copy the result data to
the lhs descriptor. */
Index: gcc/fortran/decl.c
===================================================================
--- a/src/gcc/fortran/decl.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/fortran/decl.c (.../branches/gcc-4_8-branch)
@@ -1996,6 +1996,13 @@
if (gfc_notify_std (GFC_STD_GNU, "Old-style "
"initialization at %C") == FAILURE)
return MATCH_ERROR;
+ else if (gfc_current_state () == COMP_DERIVED)
+ {
+ gfc_error ("Invalid old style initialization for derived type "
+ "component at %C");
+ m = MATCH_ERROR;
+ goto cleanup;
+ }
return match_old_style_init (name);
}
Index: gcc/fortran/ChangeLog
===================================================================
--- a/src/gcc/fortran/ChangeLog (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,30 @@
+2014-07-08 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/61459
+ PR fortran/58883
+ * trans-expr.c (fcncall_realloc_result): Use the natural type
+ for the address expression of 'res_desc'.
+
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
+ Fritz Reese <Reese-Fritz@zai.com>
+
+ * decl.c (variable_decl): Reject old style initialization
+ for derived type components.
+
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ Backport from trunk.
+ PR fortran/45187
+ * trans-decl.c (gfc_create_module_variable): Don't create
+ Cray-pointee decls twice.
+
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
+
+ Backport from mainline
+ PR libfortran/61310
+ * intrinsics.texi (CTIME): Remove mention of locale-dependent
+ behavior.
+
2014-05-22 Release Manager
* GCC 4.8.3 released.
Index: gcc/fortran/trans-decl.c
===================================================================
--- a/src/gcc/fortran/trans-decl.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/fortran/trans-decl.c (.../branches/gcc-4_8-branch)
@@ -4084,8 +4084,8 @@
}
/* Don't generate variables from other modules. Variables from
- COMMONs will already have been generated. */
- if (sym->attr.use_assoc || sym->attr.in_common)
+ COMMONs and Cray pointees will already have been generated. */
+ if (sym->attr.use_assoc || sym->attr.in_common || sym->attr.cray_pointee)
return;
/* Equivalenced variables arrive here after creation. */
Index: gcc/function.c
===================================================================
--- a/src/gcc/function.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/function.c (.../branches/gcc-4_8-branch)
@@ -1354,9 +1354,13 @@
#define STACK_POINTER_OFFSET 0
#endif
+#if defined (REG_PARM_STACK_SPACE) && !defined (INCOMING_REG_PARM_STACK_SPACE)
+#define INCOMING_REG_PARM_STACK_SPACE REG_PARM_STACK_SPACE
+#endif
+
/* If not defined, pick an appropriate default for the offset of dynamically
allocated memory depending on the value of ACCUMULATE_OUTGOING_ARGS,
- REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
+ INCOMING_REG_PARM_STACK_SPACE, and OUTGOING_REG_PARM_STACK_SPACE. */
#ifndef STACK_DYNAMIC_OFFSET
@@ -1368,12 +1372,12 @@
`crtl->outgoing_args_size'. Nevertheless, we must allow
for it when allocating stack dynamic objects. */
-#if defined(REG_PARM_STACK_SPACE)
+#ifdef INCOMING_REG_PARM_STACK_SPACE
#define STACK_DYNAMIC_OFFSET(FNDECL) \
((ACCUMULATE_OUTGOING_ARGS \
? (crtl->outgoing_args_size \
+ (OUTGOING_REG_PARM_STACK_SPACE ((!(FNDECL) ? NULL_TREE : TREE_TYPE (FNDECL))) ? 0 \
- : REG_PARM_STACK_SPACE (FNDECL))) \
+ : INCOMING_REG_PARM_STACK_SPACE (FNDECL))) \
: 0) + (STACK_POINTER_OFFSET))
#else
#define STACK_DYNAMIC_OFFSET(FNDECL) \
@@ -2211,8 +2215,9 @@
#endif
all->args_so_far = pack_cumulative_args (&all->args_so_far_v);
-#ifdef REG_PARM_STACK_SPACE
- all->reg_parm_stack_space = REG_PARM_STACK_SPACE (current_function_decl);
+#ifdef INCOMING_REG_PARM_STACK_SPACE
+ all->reg_parm_stack_space
+ = INCOMING_REG_PARM_STACK_SPACE (current_function_decl);
#endif
}
@@ -4518,6 +4523,7 @@
/* ??? This could be set on a per-function basis by the front-end
but is this worth the hassle? */
cfun->can_throw_non_call_exceptions = flag_non_call_exceptions;
+ cfun->can_delete_dead_exceptions = flag_delete_dead_exceptions;
}
}
Index: gcc/common.opt
===================================================================
--- a/src/gcc/common.opt (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/common.opt (.../branches/gcc-4_8-branch)
@@ -1226,6 +1226,10 @@
Common Report Var(flag_tm)
Enable support for GNU transactional memory
+fgnu-unique
+Common Report Var(flag_gnu_unique) Init(1)
+Use STB_GNU_UNIQUE if supported by the assembler
+
floop-flatten
Common Ignore
Does nothing. Preserved for backward compatibility.
Index: gcc/sched-deps.c
===================================================================
--- a/src/gcc/sched-deps.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/sched-deps.c (.../branches/gcc-4_8-branch)
@@ -2744,7 +2744,8 @@
Consider for instance a volatile asm that changes the fpu rounding
mode. An insn should not be moved across this even if it only uses
pseudo-regs because it might give an incorrectly rounded result. */
- if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
+ if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
+ && !DEBUG_INSN_P (insn))
reg_pending_barrier = TRUE_BARRIER;
/* For all ASM_OPERANDS, we must traverse the vector of input operands.
Index: gcc/config/alpha/alpha.c
===================================================================
--- a/src/gcc/config/alpha/alpha.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/alpha/alpha.c (.../branches/gcc-4_8-branch)
@@ -8658,6 +8658,11 @@
}
break;
+ case BARRIER:
+ /* __builtin_unreachable can expand to no code at all,
+ leaving (barrier) RTXes in the instruction stream. */
+ goto close_shadow_notrapb;
+
case JUMP_INSN:
case CALL_INSN:
case CODE_LABEL:
@@ -8673,6 +8678,7 @@
n = emit_insn_before (gen_trapb (), i);
PUT_MODE (n, TImode);
PUT_MODE (i, TImode);
+ close_shadow_notrapb:
trap_pending = 0;
shadow.used.i = 0;
shadow.used.fp = 0;
Index: gcc/config/elfos.h
===================================================================
--- a/src/gcc/config/elfos.h (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/elfos.h (.../branches/gcc-4_8-branch)
@@ -287,7 +287,7 @@
/* Write the extra assembler code needed to declare an object properly. */
#ifdef HAVE_GAS_GNU_UNIQUE_OBJECT
-#define USE_GNU_UNIQUE_OBJECT 1
+#define USE_GNU_UNIQUE_OBJECT flag_gnu_unique
#else
#define USE_GNU_UNIQUE_OBJECT 0
#endif
Index: gcc/config/i386/i386.md
===================================================================
--- a/src/gcc/config/i386/i386.md (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/i386/i386.md (.../branches/gcc-4_8-branch)
@@ -5339,66 +5339,37 @@
;; Avoid store forwarding (partial memory) stall penalty by extending
;; SImode value to DImode through XMM register instead of pushing two
-;; SImode values to stack. Note that even !TARGET_INTER_UNIT_MOVES
-;; targets benefit from this optimization. Also note that fild
-;; loads from memory only.
+;; SImode values to stack. Also note that fild loads from memory only.
-(define_insn "*floatunssi<mode>2_1"
- [(set (match_operand:X87MODEF 0 "register_operand" "=f,f")
+(define_insn_and_split "*floatunssi<mode>2_i387_with_xmm"
+ [(set (match_operand:X87MODEF 0 "register_operand" "=f")
(unsigned_float:X87MODEF
- (match_operand:SI 1 "nonimmediate_operand" "x,m")))
- (clobber (match_operand:DI 2 "memory_operand" "=m,m"))
- (clobber (match_scratch:SI 3 "=X,x"))]
+ (match_operand:SI 1 "nonimmediate_operand" "rm")))
+ (clobber (match_scratch:DI 3 "=x"))
+ (clobber (match_operand:DI 2 "memory_operand" "=m"))]
"!TARGET_64BIT
&& TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
- && TARGET_SSE"
+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES"
"#"
+ "&& reload_completed"
+ [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
+ (set (match_dup 2) (match_dup 3))
+ (set (match_dup 0)
+ (float:X87MODEF (match_dup 2)))]
+ ""
[(set_attr "type" "multi")
(set_attr "mode" "<MODE>")])
-(define_split
- [(set (match_operand:X87MODEF 0 "register_operand")
- (unsigned_float:X87MODEF
- (match_operand:SI 1 "register_operand")))
- (clobber (match_operand:DI 2 "memory_operand"))
- (clobber (match_scratch:SI 3))]
- "!TARGET_64BIT
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
- && TARGET_SSE
- && reload_completed"
- [(set (match_dup 2) (match_dup 1))
- (set (match_dup 0)
- (float:X87MODEF (match_dup 2)))]
- "operands[1] = simplify_gen_subreg (DImode, operands[1], SImode, 0);")
-
-(define_split
- [(set (match_operand:X87MODEF 0 "register_operand")
- (unsigned_float:X87MODEF
- (match_operand:SI 1 "memory_operand")))
- (clobber (match_operand:DI 2 "memory_operand"))
- (clobber (match_scratch:SI 3))]
- "!TARGET_64BIT
- && TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
- && TARGET_SSE
- && reload_completed"
- [(set (match_dup 2) (match_dup 3))
- (set (match_dup 0)
- (float:X87MODEF (match_dup 2)))]
-{
- emit_move_insn (operands[3], operands[1]);
- operands[3] = simplify_gen_subreg (DImode, operands[3], SImode, 0);
-})
-
(define_expand "floatunssi<mode>2"
[(parallel
[(set (match_operand:X87MODEF 0 "register_operand")
(unsigned_float:X87MODEF
(match_operand:SI 1 "nonimmediate_operand")))
- (clobber (match_dup 2))
- (clobber (match_scratch:SI 3))])]
+ (clobber (match_scratch:DI 3))
+ (clobber (match_dup 2))])]
"!TARGET_64BIT
&& ((TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode)
- && TARGET_SSE)
+ && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES)
|| (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH))"
{
if (SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)
Index: gcc/config/i386/driver-i386.c
===================================================================
--- a/src/gcc/config/i386/driver-i386.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/i386/driver-i386.c (.../branches/gcc-4_8-branch)
@@ -713,6 +713,11 @@
/* Assume Core 2. */
cpu = "core2";
}
+ else if (has_longmode)
+ /* Perhaps some emulator? Assume x86-64, otherwise gcc
+ -march=native would be unusable for 64-bit compilations,
+ as all the CPUs below are 32-bit only. */
+ cpu = "x86-64";
else if (has_sse3)
/* It is Core Duo. */
cpu = "pentium-m";
Index: gcc/config/i386/i386.c
===================================================================
--- a/src/gcc/config/i386/i386.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/i386/i386.c (.../branches/gcc-4_8-branch)
@@ -20505,7 +20505,7 @@
t1 = gen_reg_rtx (V32QImode);
t2 = gen_reg_rtx (V32QImode);
t3 = gen_reg_rtx (V32QImode);
- vt2 = GEN_INT (128);
+ vt2 = GEN_INT (-128);
for (i = 0; i < 32; i++)
vec[i] = vt2;
vt = gen_rtx_CONST_VECTOR (V32QImode, gen_rtvec_v (32, vec));
@@ -24640,13 +24640,17 @@
{
edge e;
edge_iterator ei;
- /* Assume that region is SCC, i.e. all immediate predecessors
- of non-head block are in the same region. */
+
+ /* Regions are SCCs with the exception of selective
+ scheduling with pipelining of outer blocks enabled.
+ So also check that immediate predecessors of a non-head
+ block are in the same region. */
FOR_EACH_EDGE (e, ei, bb->preds)
{
/* Avoid creating of loop-carried dependencies through
- using topological odering in region. */
- if (BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
+ using topological ordering in the region. */
+ if (rgn == CONTAINING_RGN (e->src->index)
+ && BLOCK_TO_BB (bb->index) > BLOCK_TO_BB (e->src->index))
add_dependee_for_func_arg (first_arg, e->src);
}
}
Index: gcc/config/microblaze/predicates.md
===================================================================
--- a/src/gcc/config/microblaze/predicates.md (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/microblaze/predicates.md (.../branches/gcc-4_8-branch)
@@ -85,10 +85,6 @@
(ior (match_operand 0 "const_0_operand")
(match_operand 0 "register_operand")))
-(define_predicate "reg_or_mem_operand"
- (ior (match_operand 0 "memory_operand")
- (match_operand 0 "register_operand")))
-
;; Return if the operand is either the PC or a label_ref.
(define_special_predicate "pc_or_label_operand"
(ior (match_code "pc,label_ref")
Index: gcc/config/microblaze/microblaze.md
===================================================================
--- a/src/gcc/config/microblaze/microblaze.md (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/microblaze/microblaze.md (.../branches/gcc-4_8-branch)
@@ -1119,18 +1119,6 @@
}
)
-;;Load and store reverse
-(define_insn "movsi4_rev"
- [(set (match_operand:SI 0 "reg_or_mem_operand" "=r,Q")
- (bswap:SI (match_operand:SF 1 "reg_or_mem_operand" "Q,r")))]
- "TARGET_REORDER"
- "@
- lwr\t%0,%y1,r0
- swr\t%1,%y0,r0"
- [(set_attr "type" "load,store")
- (set_attr "mode" "SI")
- (set_attr "length" "4,4")])
-
;; 32-bit floating point moves
(define_expand "movsf"
Index: gcc/config/avr/avr-fixed.md
===================================================================
--- a/src/gcc/config/avr/avr-fixed.md (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/avr/avr-fixed.md (.../branches/gcc-4_8-branch)
@@ -430,8 +430,8 @@
}
// Input and output of the libgcc function
- const unsigned int regno_in[] = { -1, 22, 22, -1, 18 };
- const unsigned int regno_out[] = { -1, 24, 24, -1, 22 };
+ const unsigned int regno_in[] = { -1U, 22, 22, -1U, 18 };
+ const unsigned int regno_out[] = { -1U, 24, 24, -1U, 22 };
operands[3] = gen_rtx_REG (<MODE>mode, regno_out[(size_t) GET_MODE_SIZE (<MODE>mode)]);
operands[4] = gen_rtx_REG (<MODE>mode, regno_in[(size_t) GET_MODE_SIZE (<MODE>mode)]);
Index: gcc/config/avr/avr.md
===================================================================
--- a/src/gcc/config/avr/avr.md (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/avr/avr.md (.../branches/gcc-4_8-branch)
@@ -367,6 +367,15 @@
""
{
int i;
+
+ // Avoid (subreg (mem)) for non-generic address spaces below. Because
+ // of the poor addressing capabilities of these spaces it's better to
+ // load them in one chunk. And it avoids PR61443.
+
+ if (MEM_P (operands[0])
+ && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[0])))
+ operands[0] = copy_to_mode_reg (<MODE>mode, operands[0]);
+
for (i = GET_MODE_SIZE (<MODE>mode) - 1; i >= 0; --i)
{
rtx part = simplify_gen_subreg (QImode, operands[0], <MODE>mode, i);
Index: gcc/config/avr/avr.h
===================================================================
--- a/src/gcc/config/avr/avr.h (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/avr/avr.h (.../branches/gcc-4_8-branch)
@@ -250,18 +250,18 @@
#define REG_CLASS_CONTENTS { \
{0x00000000,0x00000000}, /* NO_REGS */ \
{0x00000001,0x00000000}, /* R0_REG */ \
- {3 << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
- {3 << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
- {3 << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
+ {3u << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
+ {3u << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
+ {3u << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
{0x00000000,0x00000003}, /* STACK_REG, STACK */ \
- {(3 << REG_Y) | (3 << REG_Z), \
+ {(3u << REG_Y) | (3u << REG_Z), \
0x00000000}, /* BASE_POINTER_REGS, r28 - r31 */ \
- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z), \
+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z), \
0x00000000}, /* POINTER_REGS, r26 - r31 */ \
- {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W), \
+ {(3u << REG_X) | (3u << REG_Y) | (3u << REG_Z) | (3u << REG_W), \
0x00000000}, /* ADDW_REGS, r24 - r31 */ \
{0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \
- {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16), \
+ {(3u << REG_X)|(3u << REG_Y)|(3u << REG_Z)|(3u << REG_W)|(0xffu << 16),\
0x00000000}, /* LD_REGS, r16 - r31 */ \
{0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \
{0xffffffff,0x00000000}, /* GENERAL_REGS, r0 - r31 */ \
Index: gcc/config/aarch64/arm_neon.h
===================================================================
--- a/src/gcc/config/aarch64/arm_neon.h (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/aarch64/arm_neon.h (.../branches/gcc-4_8-branch)
@@ -13815,7 +13815,7 @@
int16x4_t result;
__asm__ ("sqdmulh %0.4h,%1.4h,%2.h[0]"
: "=w"(result)
- : "w"(a), "w"(b)
+ : "w"(a), "x"(b)
: /* No clobbers */);
return result;
}
@@ -13837,7 +13837,7 @@
int16x8_t result;
__asm__ ("sqdmulh %0.8h,%1.8h,%2.h[0]"
: "=w"(result)
- : "w"(a), "w"(b)
+ : "w"(a), "x"(b)
: /* No clobbers */);
return result;
}
Index: gcc/config/aarch64/aarch64.md
===================================================================
--- a/src/gcc/config/aarch64/aarch64.md (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/aarch64/aarch64.md (.../branches/gcc-4_8-branch)
@@ -3292,6 +3292,7 @@
(unspec:DI [(match_operand:DI 0 "aarch64_valid_symref" "S")]
UNSPEC_TLSDESC))
(clobber (reg:DI LR_REGNUM))
+ (clobber (reg:CC CC_REGNUM))
(clobber (match_scratch:DI 1 "=r"))]
"TARGET_TLS_DESC"
"adrp\\tx0, %A0\;ldr\\t%1, [x0, #%L0]\;add\\tx0, x0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
Index: gcc/config/aarch64/aarch64.c
===================================================================
--- a/src/gcc/config/aarch64/aarch64.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/aarch64/aarch64.c (.../branches/gcc-4_8-branch)
@@ -1201,6 +1201,7 @@
CUMULATIVE_ARGS *pcum = get_cumulative_args (pcum_v);
int ncrn, nvrn, nregs;
bool allocate_ncrn, allocate_nvrn;
+ HOST_WIDE_INT size;
/* We need to do this once per argument. */
if (pcum->aapcs_arg_processed)
@@ -1208,6 +1209,11 @@
pcum->aapcs_arg_processed = true;
+ /* Size in bytes, rounded to the nearest multiple of 8 bytes. */
+ size
+ = AARCH64_ROUND_UP (type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode),
+ UNITS_PER_WORD);
+
allocate_ncrn = (type) ? !(FLOAT_TYPE_P (type)) : !FLOAT_MODE_P (mode);
allocate_nvrn = aarch64_vfp_is_call_candidate (pcum_v,
mode,
@@ -1258,10 +1264,8 @@
}
ncrn = pcum->aapcs_ncrn;
- nregs = ((type ? int_size_in_bytes (type) : GET_MODE_SIZE (mode))
- + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
+ nregs = size / UNITS_PER_WORD;
-
/* C6 - C9. though the sign and zero extension semantics are
handled elsewhere. This is the case where the argument fits
entirely general registers. */
@@ -1309,13 +1313,12 @@
pcum->aapcs_nextncrn = NUM_ARG_REGS;
/* The argument is passed on stack; record the needed number of words for
- this argument (we can re-use NREGS) and align the total size if
- necessary. */
+ this argument and align the total size if necessary. */
on_stack:
- pcum->aapcs_stack_words = nregs;
+ pcum->aapcs_stack_words = size / UNITS_PER_WORD;
if (aarch64_function_arg_alignment (mode, type) == 16 * BITS_PER_UNIT)
pcum->aapcs_stack_size = AARCH64_ROUND_UP (pcum->aapcs_stack_size,
- 16 / UNITS_PER_WORD) + 1;
+ 16 / UNITS_PER_WORD);
return;
}
Index: gcc/config/rs6000/htm.md
===================================================================
--- a/src/gcc/config/rs6000/htm.md (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/rs6000/htm.md (.../branches/gcc-4_8-branch)
@@ -179,7 +179,7 @@
(const_int 0)]
UNSPECV_HTM_TABORTWCI))
(set (subreg:CC (match_dup 2) 0) (match_dup 1))
- (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 24)))
+ (set (match_dup 3) (lshiftrt:SI (match_dup 2) (const_int 28)))
(parallel [(set (match_operand:SI 0 "int_reg_operand" "")
(and:SI (match_dup 3) (const_int 15)))
(clobber (scratch:CC))])]
Index: gcc/config/rs6000/rs6000-protos.h
===================================================================
--- a/src/gcc/config/rs6000/rs6000-protos.h (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/rs6000/rs6000-protos.h (.../branches/gcc-4_8-branch)
@@ -161,7 +161,7 @@
extern rtx rs6000_libcall_value (enum machine_mode);
extern rtx rs6000_va_arg (tree, tree);
extern int function_ok_for_sibcall (tree);
-extern int rs6000_reg_parm_stack_space (tree);
+extern int rs6000_reg_parm_stack_space (tree, bool);
extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
extern bool rs6000_elf_in_small_data_p (const_tree);
#ifdef ARGS_SIZE_RTX
Index: gcc/config/rs6000/rs6000-builtin.def
===================================================================
--- a/src/gcc/config/rs6000/rs6000-builtin.def (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/rs6000/rs6000-builtin.def (.../branches/gcc-4_8-branch)
@@ -622,20 +622,13 @@
| RS6000_BTC_TERNARY), \
CODE_FOR_ ## ICODE) /* ICODE */
-/* Miscellaneous builtins. */
-#define BU_MISC_1(ENUM, NAME, ATTR, ICODE) \
+/* 128-bit long double floating point builtins. */
+#define BU_LDBL128_2(ENUM, NAME, ATTR, ICODE) \
RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
"__builtin_" NAME, /* NAME */ \
- RS6000_BTM_HARD_FLOAT, /* MASK */ \
+ (RS6000_BTM_HARD_FLOAT /* MASK */ \
+ | RS6000_BTM_LDBL128), \
(RS6000_BTC_ ## ATTR /* ATTR */ \
- | RS6000_BTC_UNARY), \
- CODE_FOR_ ## ICODE) /* ICODE */
-
-#define BU_MISC_2(ENUM, NAME, ATTR, ICODE) \
- RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
- "__builtin_" NAME, /* NAME */ \
- RS6000_BTM_HARD_FLOAT, /* MASK */ \
- (RS6000_BTC_ ## ATTR /* ATTR */ \
| RS6000_BTC_BINARY), \
CODE_FOR_ ## ICODE) /* ICODE */
@@ -1593,10 +1586,8 @@
BU_DFP_MISC_2 (PACK_TD, "pack_dec128", CONST, packtd)
BU_DFP_MISC_2 (UNPACK_TD, "unpack_dec128", CONST, unpacktd)
-BU_MISC_2 (PACK_TF, "pack_longdouble", CONST, packtf)
-BU_MISC_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
-BU_MISC_1 (UNPACK_TF_0, "longdouble_dw0", CONST, unpacktf_0)
-BU_MISC_1 (UNPACK_TF_1, "longdouble_dw1", CONST, unpacktf_1)
+BU_LDBL128_2 (PACK_TF, "pack_longdouble", CONST, packtf)
+BU_LDBL128_2 (UNPACK_TF, "unpack_longdouble", CONST, unpacktf)
BU_P7_MISC_2 (PACK_V1TI, "pack_vector_int128", CONST, packv1ti)
BU_P7_MISC_2 (UNPACK_V1TI, "unpack_vector_int128", CONST, unpackv1ti)
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- a/src/gcc/config/rs6000/rs6000.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/rs6000/rs6000.c (.../branches/gcc-4_8-branch)
@@ -3014,7 +3014,8 @@
| ((TARGET_CRYPTO) ? RS6000_BTM_CRYPTO : 0)
| ((TARGET_HTM) ? RS6000_BTM_HTM : 0)
| ((TARGET_DFP) ? RS6000_BTM_DFP : 0)
- | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0));
+ | ((TARGET_HARD_FLOAT) ? RS6000_BTM_HARD_FLOAT : 0)
+ | ((TARGET_LONG_DOUBLE_128) ? RS6000_BTM_LDBL128 : 0));
}
/* Override command line options. Mostly we process the processor type and
@@ -6109,7 +6110,8 @@
return false;
extra = GET_MODE_SIZE (mode) - UNITS_PER_WORD;
- gcc_assert (extra >= 0);
+ if (extra < 0)
+ extra = 0;
if (GET_CODE (addr) == LO_SUM)
/* For lo_sum addresses, we must allow any offset except one that
@@ -10497,10 +10499,9 @@
list, or passes any parameter in memory. */
static bool
-rs6000_function_parms_need_stack (tree fun)
+rs6000_function_parms_need_stack (tree fun, bool incoming)
{
- function_args_iterator args_iter;
- tree arg_type;
+ tree fntype, result;
CUMULATIVE_ARGS args_so_far_v;
cumulative_args_t args_so_far;
@@ -10507,26 +10508,57 @@
if (!fun)
/* Must be a libcall, all of which only use reg parms. */
return false;
+
+ fntype = fun;
if (!TYPE_P (fun))
- fun = TREE_TYPE (fun);
+ fntype = TREE_TYPE (fun);
/* Varargs functions need the parameter save area. */
- if (!prototype_p (fun) || stdarg_p (fun))
+ if ((!incoming && !prototype_p (fntype)) || stdarg_p (fntype))
return true;
- INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fun, NULL_RTX);
+ INIT_CUMULATIVE_INCOMING_ARGS (args_so_far_v, fntype, NULL_RTX);
args_so_far = pack_cumulative_args (&args_so_far_v);
- if (aggregate_value_p (TREE_TYPE (fun), fun))
+ /* When incoming, we will have been passed the function decl.
+ It is necessary to use the decl to handle K&R style functions,
+ where TYPE_ARG_TYPES may not be available. */
+ if (incoming)
{
- tree type = build_pointer_type (TREE_TYPE (fun));
- rs6000_parm_needs_stack (args_so_far, type);
+ gcc_assert (DECL_P (fun));
+ result = DECL_RESULT (fun);
}
+ else
+ result = TREE_TYPE (fntype);
- FOREACH_FUNCTION_ARGS (fun, arg_type, args_iter)
- if (rs6000_parm_needs_stack (args_so_far, arg_type))
- return true;
+ if (result && aggregate_value_p (result, fntype))
+ {
+ if (!TYPE_P (result))
+ result = TREE_TYPE (result);
+ result = build_pointer_type (result);
+ rs6000_parm_needs_stack (args_so_far, result);
+ }
+ if (incoming)
+ {
+ tree parm;
+
+ for (parm = DECL_ARGUMENTS (fun);
+ parm && parm != void_list_node;
+ parm = TREE_CHAIN (parm))
+ if (rs6000_parm_needs_stack (args_so_far, TREE_TYPE (parm)))
+ return true;
+ }
+ else
+ {
+ function_args_iterator args_iter;
+ tree arg_type;
+
+ FOREACH_FUNCTION_ARGS (fntype, arg_type, args_iter)
+ if (rs6000_parm_needs_stack (args_so_far, arg_type))
+ return true;
+ }
+
return false;
}
@@ -10537,7 +10569,7 @@
all parameters in registers. */
int
-rs6000_reg_parm_stack_space (tree fun)
+rs6000_reg_parm_stack_space (tree fun, bool incoming)
{
int reg_parm_stack_space;
@@ -10555,7 +10587,7 @@
case ABI_ELFv2:
/* ??? Recomputing this every time is a bit expensive. Is there
a place to cache this information? */
- if (rs6000_function_parms_need_stack (fun))
+ if (rs6000_function_parms_need_stack (fun, incoming))
reg_parm_stack_space = TARGET_64BIT ? 64 : 32;
else
reg_parm_stack_space = 0;
@@ -13544,11 +13576,15 @@
else if ((fnmask & (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
== (RS6000_BTM_DFP | RS6000_BTM_P8_VECTOR))
error ("Builtin function %s requires the -mhard-dfp and"
- "-mpower8-vector options", name);
+ " -mpower8-vector options", name);
else if ((fnmask & RS6000_BTM_DFP) != 0)
error ("Builtin function %s requires the -mhard-dfp option", name);
else if ((fnmask & RS6000_BTM_P8_VECTOR) != 0)
error ("Builtin function %s requires the -mpower8-vector option", name);
+ else if ((fnmask & (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
+ == (RS6000_BTM_HARD_FLOAT | RS6000_BTM_LDBL128))
+ error ("Builtin function %s requires the -mhard-float and"
+ " -mlong-double-128 options", name);
else if ((fnmask & RS6000_BTM_HARD_FLOAT) != 0)
error ("Builtin function %s requires the -mhard-float option", name);
else
@@ -31413,6 +31449,7 @@
{ "htm", RS6000_BTM_HTM, false, false },
{ "hard-dfp", RS6000_BTM_DFP, false, false },
{ "hard-float", RS6000_BTM_HARD_FLOAT, false, false },
+ { "long-double-128", RS6000_BTM_LDBL128, false, false },
};
/* Option variables that we want to support inside attribute((target)) and
Index: gcc/config/rs6000/vsx.md
===================================================================
--- a/src/gcc/config/rs6000/vsx.md (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/rs6000/vsx.md (.../branches/gcc-4_8-branch)
@@ -24,6 +24,13 @@
;; Iterator for the 2 64-bit vector types
(define_mode_iterator VSX_D [V2DF V2DI])
+;; Iterator for the 2 64-bit vector types + 128-bit types that are loaded with
+;; lxvd2x to properly handle swapping words on little endian
+(define_mode_iterator VSX_LE [V2DF
+ V2DI
+ V1TI
+ (TI "VECTOR_MEM_VSX_P (TImode)")])
+
;; Iterator for the 2 32-bit vector types
(define_mode_iterator VSX_W [V4SF V4SI])
@@ -228,8 +235,8 @@
;; The patterns for LE permuted loads and stores come before the general
;; VSX moves so they match first.
(define_insn_and_split "*vsx_le_perm_load_<mode>"
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
- (match_operand:VSX_D 1 "memory_operand" "Z"))]
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=wa")
+ (match_operand:VSX_LE 1 "memory_operand" "Z"))]
"!BYTES_BIG_ENDIAN && TARGET_VSX"
"#"
"!BYTES_BIG_ENDIAN && TARGET_VSX"
@@ -342,8 +349,8 @@
(set_attr "length" "8")])
(define_insn "*vsx_le_perm_store_<mode>"
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
- (match_operand:VSX_D 1 "vsx_register_operand" "+wa"))]
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
+ (match_operand:VSX_LE 1 "vsx_register_operand" "+wa"))]
"!BYTES_BIG_ENDIAN && TARGET_VSX"
"#"
[(set_attr "type" "vecstore")
@@ -350,8 +357,8 @@
(set_attr "length" "12")])
(define_split
- [(set (match_operand:VSX_D 0 "memory_operand" "")
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && !reload_completed"
[(set (match_dup 2)
(vec_select:<MODE>
@@ -369,8 +376,8 @@
;; The post-reload split requires that we re-permute the source
;; register in case it is still live.
(define_split
- [(set (match_operand:VSX_D 0 "memory_operand" "")
- (match_operand:VSX_D 1 "vsx_register_operand" ""))]
+ [(set (match_operand:VSX_LE 0 "memory_operand" "")
+ (match_operand:VSX_LE 1 "vsx_register_operand" ""))]
"!BYTES_BIG_ENDIAN && TARGET_VSX && reload_completed"
[(set (match_dup 1)
(vec_select:<MODE>
@@ -1352,9 +1359,9 @@
;; xxpermdi for little endian loads and stores. We need several of
;; these since the form of the PARALLEL differs by mode.
(define_insn "*vsx_xxpermdi2_le_<mode>"
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
- (vec_select:VSX_D
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=wa")
+ (vec_select:VSX_LE
+ (match_operand:VSX_LE 1 "vsx_register_operand" "wa")
(parallel [(const_int 1) (const_int 0)])))]
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
"xxpermdi %x0,%x1,%x1,2"
@@ -1401,9 +1408,9 @@
;; lxvd2x for little endian loads. We need several of
;; these since the form of the PARALLEL differs by mode.
(define_insn "*vsx_lxvd2x2_le_<mode>"
- [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa")
- (vec_select:VSX_D
- (match_operand:VSX_D 1 "memory_operand" "Z")
+ [(set (match_operand:VSX_LE 0 "vsx_register_operand" "=wa")
+ (vec_select:VSX_LE
+ (match_operand:VSX_LE 1 "memory_operand" "Z")
(parallel [(const_int 1) (const_int 0)])))]
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
"lxvd2x %x0,%y1"
@@ -1450,9 +1457,9 @@
;; stxvd2x for little endian stores. We need several of
;; these since the form of the PARALLEL differs by mode.
(define_insn "*vsx_stxvd2x2_le_<mode>"
- [(set (match_operand:VSX_D 0 "memory_operand" "=Z")
- (vec_select:VSX_D
- (match_operand:VSX_D 1 "vsx_register_operand" "wa")
+ [(set (match_operand:VSX_LE 0 "memory_operand" "=Z")
+ (vec_select:VSX_LE
+ (match_operand:VSX_LE 1 "vsx_register_operand" "wa")
(parallel [(const_int 1) (const_int 0)])))]
"!BYTES_BIG_ENDIAN && VECTOR_MEM_VSX_P (<MODE>mode)"
"stxvd2x %x1,%y0"
@@ -1606,7 +1613,7 @@
{
if (GET_CODE (op3) == SCRATCH)
op3 = gen_reg_rtx (V4SFmode);
- emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, op2));
+ emit_insn (gen_vsx_xxsldwi_v4sf (op3, op1, op1, GEN_INT (ele)));
tmp = op3;
}
emit_insn (gen_vsx_xscvspdp_scalar2 (op0, tmp));
Index: gcc/config/rs6000/rs6000.h
===================================================================
--- a/src/gcc/config/rs6000/rs6000.h (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/rs6000/rs6000.h (.../branches/gcc-4_8-branch)
@@ -1593,8 +1593,15 @@
/* Define this if stack space is still allocated for a parameter passed
in a register. The value is the number of bytes allocated to this
area. */
-#define REG_PARM_STACK_SPACE(FNDECL) rs6000_reg_parm_stack_space((FNDECL))
+#define REG_PARM_STACK_SPACE(FNDECL) \
+ rs6000_reg_parm_stack_space ((FNDECL), false)
+/* Define this macro if space guaranteed when compiling a function body
+ is different to space required when making a call, a situation that
+ can arise with K&R style function definitions. */
+#define INCOMING_REG_PARM_STACK_SPACE(FNDECL) \
+ rs6000_reg_parm_stack_space ((FNDECL), true)
+
/* Define this if the above stack space is to be considered part of the
space allocated by the caller. */
#define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
@@ -2483,8 +2490,8 @@
#define RS6000_BTC_SAT RS6000_BTC_MISC /* saturate sets VSCR. */
/* Builtin targets. For now, we reuse the masks for those options that are in
- target flags, and pick two random bits for SPE and paired which aren't in
- target_flags. */
+ target flags, and pick three random bits for SPE, paired and ldbl128 which
+ aren't in target_flags. */
#define RS6000_BTM_ALWAYS 0 /* Always enabled. */
#define RS6000_BTM_ALTIVEC MASK_ALTIVEC /* VMX/altivec vectors. */
#define RS6000_BTM_VSX MASK_VSX /* VSX (vector/scalar). */
@@ -2501,6 +2508,7 @@
#define RS6000_BTM_CELL MASK_FPRND /* Target is cell powerpc. */
#define RS6000_BTM_DFP MASK_DFP /* Decimal floating point. */
#define RS6000_BTM_HARD_FLOAT MASK_SOFT_FLOAT /* Hardware floating point. */
+#define RS6000_BTM_LDBL128 MASK_MULTIPLE /* 128-bit long double. */
#define RS6000_BTM_COMMON (RS6000_BTM_ALTIVEC \
| RS6000_BTM_VSX \
@@ -2514,7 +2522,8 @@
| RS6000_BTM_POPCNTD \
| RS6000_BTM_CELL \
| RS6000_BTM_DFP \
- | RS6000_BTM_HARD_FLOAT)
+ | RS6000_BTM_HARD_FLOAT \
+ | RS6000_BTM_LDBL128)
/* Define builtin enum index. */
Index: gcc/config/rs6000/rs6000.md
===================================================================
--- a/src/gcc/config/rs6000/rs6000.md (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/rs6000/rs6000.md (.../branches/gcc-4_8-branch)
@@ -737,7 +737,7 @@
(define_insn "*extendsidi2_lfiwax"
[(set (match_operand:DI 0 "gpc_reg_operand" "=r,r,??wm,!wl,!wu")
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r,r,Z,Z")))]
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r,r,Z,Z")))]
"TARGET_POWERPC64 && TARGET_LFIWAX"
"@
lwa%U1%X1 %0,%1
@@ -760,7 +760,7 @@
(define_insn "*extendsidi2_nocell"
[(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
- (sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]
+ (sign_extend:DI (match_operand:SI 1 "lwa_operand" "Y,r")))]
"TARGET_POWERPC64 && rs6000_gen_cell_microcode && !TARGET_LFIWAX"
"@
lwa%U1%X1 %0,%1
@@ -15847,26 +15847,6 @@
""
"")
-;; The Advance Toolchain 7.0-3 added private builtins: __builtin_longdouble_dw0
-;; and __builtin_longdouble_dw1 to optimize glibc. Add support for these
-;; builtins here.
-
-(define_expand "unpacktf_0"
- [(set (match_operand:DF 0 "nonimmediate_operand" "")
- (unspec:DF [(match_operand:TF 1 "register_operand" "")
- (const_int 0)]
- UNSPEC_UNPACK_128BIT))]
- ""
- "")
-
-(define_expand "unpacktf_1"
- [(set (match_operand:DF 0 "nonimmediate_operand" "")
- (unspec:DF [(match_operand:TF 1 "register_operand" "")
- (const_int 1)]
- UNSPEC_UNPACK_128BIT))]
- ""
- "")
-
(define_insn_and_split "unpack<mode>_dm"
[(set (match_operand:<FP128_64> 0 "nonimmediate_operand" "=d,m,d,r,m")
(unspec:<FP128_64>
Index: gcc/config/arm/arm.c
===================================================================
--- a/src/gcc/config/arm/arm.c (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/arm/arm.c (.../branches/gcc-4_8-branch)
@@ -24476,9 +24476,13 @@
fputs (":\n", file);
if (flag_pic)
{
- /* Output ".word .LTHUNKn-7-.LTHUNKPCn". */
+ /* Output ".word .LTHUNKn-[3,7]-.LTHUNKPCn". */
rtx tem = XEXP (DECL_RTL (function), 0);
- tem = gen_rtx_PLUS (GET_MODE (tem), tem, GEN_INT (-7));
+ /* For TARGET_THUMB1_ONLY the thunk is in Thumb mode, so the PC
+ pipeline offset is four rather than eight. Adjust the offset
+ accordingly. */
+ tem = plus_constant (GET_MODE (tem), tem,
+ TARGET_THUMB1_ONLY ? -3 : -7);
tem = gen_rtx_MINUS (GET_MODE (tem),
tem,
gen_rtx_SYMBOL_REF (Pmode,
Index: gcc/config/arm/arm.md
===================================================================
--- a/src/gcc/config/arm/arm.md (.../tags/gcc_4_8_3_release)
+++ b/src/gcc/config/arm/arm.md (.../branches/gcc-4_8-branch)
@@ -7630,12 +7630,13 @@
(define_insn "*arm_cmpdi_unsigned"
[(set (reg:CC_CZ CC_REGNUM)
- (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r")
- (match_operand:DI 1 "arm_di_operand" "rDi")))]
+ (compare:CC_CZ (match_operand:DI 0 "s_register_operand" "r,r")
+ (match_operand:DI 1 "arm_di_operand" "rDi,rDi")))]
"TARGET_32BIT"
"cmp\\t%R0, %R1\;it eq\;cmpeq\\t%Q0, %Q1"
[(set_attr "conds" "set")
- (set_attr "length" "8")]
+ (set_attr "arch" "a,t2")
+ (set_attr "length" "8,10")]
)
(define_insn "*arm_cmpdi_zero"
Index: libgfortran/intrinsics/ctime.c
===================================================================
--- a/src/libgfortran/intrinsics/ctime.c (.../tags/gcc_4_8_3_release)
+++ b/src/libgfortran/intrinsics/ctime.c (.../branches/gcc-4_8-branch)
@@ -31,31 +31,53 @@
#include <string.h>
-/* strftime-like function that fills a C string with %c format which
- is identical to ctime in the default locale. As ctime and ctime_r
- are poorly specified and their usage not recommended, the
- implementation instead uses strftime. */
+/* Maximum space a ctime-like string might need. A "normal" ctime
+ string is 26 bytes, and in our case 24 bytes as we don't include
+ the trailing newline and null. However, the longest possible year
+ number is -2,147,481,748 (1900 - 2,147,483,648, since tm_year is a
+ 32-bit signed integer) so an extra 7 bytes are needed. */
+#define CTIME_BUFSZ 31
-static size_t
-strctime (char *s, size_t max, const time_t *timep)
+
+/* Thread-safe ctime-like function that fills a Fortran
+ string. ctime_r is a portability headache and marked as obsolescent
+ in POSIX 2008, which recommends strftime in its place. However,
+ strftime(..., "%c",...) doesn't produce ctime-like output on
+ MinGW, so do it manually with snprintf. */
+
+static int
+gf_ctime (char *s, size_t max, const time_t timev)
{
struct tm ltm;
int failed;
+ char buf[CTIME_BUFSZ + 1];
/* Some targets provide a localtime_r based on a draft of the POSIX
standard where the return type is int rather than the
standardized struct tm*. */
- __builtin_choose_expr (__builtin_classify_type (localtime_r (timep, <m))
+ __builtin_choose_expr (__builtin_classify_type (localtime_r (&timev, <m))
== 5,
- failed = localtime_r (timep, <m) == NULL,
- failed = localtime_r (timep, <m) != 0);
+ failed = localtime_r (&timev, <m) == NULL,
+ failed = localtime_r (&timev, <m) != 0);
if (failed)
- return 0;
- return strftime (s, max, "%c", <m);
+ goto blank;
+ int n = snprintf (buf, sizeof (buf),
+ "%3.3s %3.3s%3d %.2d:%.2d:%.2d %d",
+ "SunMonTueWedThuFriSat" + ltm.tm_wday * 3,
+ "JanFebMarAprMayJunJulAugSepOctNovDec" + ltm.tm_mon * 3,
+ ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec,
+ 1900 + ltm.tm_year);
+ if (n < 0)
+ goto blank;
+ if ((size_t) n <= max)
+ {
+ cf_strcpy (s, max, buf);
+ return n;
+ }
+ blank:
+ memset (s, ' ', max);
+ return 0;
}
-/* In the default locale, the date and time representation fits in 26
- bytes. However, other locales might need more space. */
-#define CSZ 100
extern void fdate (char **, gfc_charlen_type *);
export_proto(fdate);
@@ -64,8 +86,8 @@
fdate (char ** date, gfc_charlen_type * date_len)
{
time_t now = time(NULL);
- *date = xmalloc (CSZ);
- *date_len = strctime (*date, CSZ, &now);
+ *date = xmalloc (CTIME_BUFSZ);
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
}
@@ -76,10 +98,7 @@
fdate_sub (char * date, gfc_charlen_type date_len)
{
time_t now = time(NULL);
- char *s = xmalloc (date_len + 1);
- size_t n = strctime (s, date_len + 1, &now);
- fstrcpy (date, date_len, s, n);
- free (s);
+ gf_ctime (date, date_len, now);
}
@@ -91,8 +110,8 @@
PREFIX(ctime) (char ** date, gfc_charlen_type * date_len, GFC_INTEGER_8 t)
{
time_t now = t;
- *date = xmalloc (CSZ);
- *date_len = strctime (*date, CSZ, &now);
+ *date = xmalloc (CTIME_BUFSZ);
+ *date_len = gf_ctime (*date, CTIME_BUFSZ, now);
}
@@ -103,8 +122,5 @@
ctime_sub (GFC_INTEGER_8 * t, char * date, gfc_charlen_type date_len)
{
time_t now = *t;
- char *s = xmalloc (date_len + 1);
- size_t n = strctime (s, date_len + 1, &now);
- fstrcpy (date, date_len, s, n);
- free (s);
+ gf_ctime (date, date_len, now);
}
Index: libgfortran/ChangeLog
===================================================================
--- a/src/libgfortran/ChangeLog (.../tags/gcc_4_8_3_release)
+++ b/src/libgfortran/ChangeLog (.../branches/gcc-4_8-branch)
@@ -1,3 +1,21 @@
+2014-05-26 Janne Blomqvist <jb@gcc.gnu.org>
+
+ Backport from mainline
+ PR libfortran/61310
+ * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf
+ instead of strftime.
+ (fdate): Use gf_ctime.
+ (fdate_sub): Likewise.
+ (ctime): Likewise.
+ (ctime_sub): Likewise.
+
+2014-05-25 Janne Blomqvist <jb@gcc.gnu.org>
+
+ Backport from trunk.
+ PR libfortran/61187
+ * io/unix.c (raw_close): Check if s->fd is -1.
+ (fd_to_stream): Check return value of fstat(), handle error.
+
2014-05-22 Release Manager
* GCC 4.8.3 released.
Index: libgfortran/io/unix.c
===================================================================
--- a/src/libgfortran/io/unix.c (.../tags/gcc_4_8_3_release)
+++ b/src/libgfortran/io/unix.c (.../branches/gcc-4_8-branch)
@@ -407,7 +407,9 @@
{
int retval;
- if (s->fd != STDOUT_FILENO
+ if (s->fd == -1)
+ retval = -1;
+ else if (s->fd != STDOUT_FILENO
&& s->fd != STDERR_FILENO
&& s->fd != STDIN_FILENO)
retval = close (s->fd);
@@ -983,7 +985,15 @@
/* Get the current length of the file. */
- fstat (fd, &statbuf);
+ if (fstat (fd, &statbuf) == -1)
+ {
+ s->st_dev = s->st_ino = -1;
+ s->file_length = 0;
+ if (errno == EBADF)
+ s->fd = -1;
+ raw_init (s);
+ return (stream *) s;
+ }
s->st_dev = statbuf.st_dev;
s->st_ino = statbuf.st_ino;
Index: .
===================================================================
--- a/src/. (.../tags/gcc_4_8_3_release)
+++ b/src/. (.../branches/gcc-4_8-branch)
Property changes on: .
___________________________________________________________________
Modified: svn:mergeinfo
Merged /trunk:r211733
|