aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-core.h
blob: 8216a60671803207a8ab2a663251afe419103922 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
/* Core data structures for the 'tree' type.
   Copyright (C) 1989-2019 Free Software Foundation, Inc.

This file is part of GCC.

GCC 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.

GCC 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 GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.  */

#ifndef GCC_TREE_CORE_H
#define GCC_TREE_CORE_H

#include "symtab.h"

/* This file contains all the data structures that define the 'tree' type.
   There are no accessor macros nor functions in this file. Only the
   basic data structures, extern declarations and type definitions.  */

/*---------------------------------------------------------------------------
   Forward type declarations.  Mostly to avoid including unnecessary headers
---------------------------------------------------------------------------*/
struct function;
struct real_value;
struct fixed_value;
struct ptr_info_def;
struct range_info_def;
struct die_struct;


/*---------------------------------------------------------------------------
                              #defined constants
---------------------------------------------------------------------------*/
/* Nonzero if this is a call to a function whose return value depends
   solely on its arguments, has no side effects, and does not read
   global memory.  This corresponds to TREE_READONLY for function
   decls.  */
#define ECF_CONST		  (1 << 0)

/* Nonzero if this is a call to "pure" function (like const function,
   but may read memory.  This corresponds to DECL_PURE_P for function
   decls.  */
#define ECF_PURE		  (1 << 1)

/* Nonzero if this is ECF_CONST or ECF_PURE but cannot be proven to no
   infinite loop.  This corresponds to DECL_LOOPING_CONST_OR_PURE_P
   for function decls.*/
#define ECF_LOOPING_CONST_OR_PURE (1 << 2)

/* Nonzero if this call will never return.  */
#define ECF_NORETURN		  (1 << 3)

/* Nonzero if this is a call to malloc or a related function.  */
#define ECF_MALLOC		  (1 << 4)

/* Nonzero if it is plausible that this is a call to alloca.  */
#define ECF_MAY_BE_ALLOCA	  (1 << 5)

/* Nonzero if this is a call to a function that won't throw an exception.  */
#define ECF_NOTHROW		  (1 << 6)

/* Nonzero if this is a call to setjmp or a related function.  */
#define ECF_RETURNS_TWICE	  (1 << 7)

/* Nonzero if this call replaces the current stack frame.  */
#define ECF_SIBCALL		  (1 << 8)

/* Function does not read or write memory (but may have side effects, so
   it does not necessarily fit ECF_CONST).  */
#define ECF_NOVOPS		  (1 << 9)

/* The function does not lead to calls within current function unit.  */
#define ECF_LEAF		  (1 << 10)

/* Nonzero if this call returns its first argument.  */
#define ECF_RET1		  (1 << 11)

/* Nonzero if this call does not affect transactions.  */
#define ECF_TM_PURE		  (1 << 12)

/* Nonzero if this call is into the transaction runtime library.  */
#define ECF_TM_BUILTIN		  (1 << 13)

/* Nonzero if this is an indirect call by descriptor.  */
#define ECF_BY_DESCRIPTOR	  (1 << 14)

/* Nonzero if this is a cold function.  */
#define ECF_COLD		  (1 << 15)

/* Call argument flags.  */
/* Nonzero if the argument is not dereferenced recursively, thus only
   directly reachable memory is read or written.  */
#define EAF_DIRECT		(1 << 0)

/* Nonzero if memory reached by the argument is not clobbered.  */
#define EAF_NOCLOBBER		(1 << 1)

/* Nonzero if the argument does not escape.  */
#define EAF_NOESCAPE		(1 << 2)

/* Nonzero if the argument is not used by the function.  */
#define EAF_UNUSED		(1 << 3)

/* Call return flags.  */
/* Mask for the argument number that is returned.  Lower two bits of
   the return flags, encodes argument slots zero to three.  */
#define ERF_RETURN_ARG_MASK	(3)

/* Nonzero if the return value is equal to the argument number
   flags & ERF_RETURN_ARG_MASK.  */
#define ERF_RETURNS_ARG		(1 << 2)

/* Nonzero if the return value does not alias with anything.  Functions
   with the malloc attribute have this set on their return value.  */
#define ERF_NOALIAS		(1 << 3)


/*---------------------------------------------------------------------------
                                  Enumerations
---------------------------------------------------------------------------*/
/* Codes of tree nodes.  */
#define DEFTREECODE(SYM, STRING, TYPE, NARGS)   SYM,
#define END_OF_BASE_TREE_CODES LAST_AND_UNUSED_TREE_CODE,

enum tree_code {
#include "all-tree.def"
MAX_TREE_CODES
};

#undef DEFTREECODE
#undef END_OF_BASE_TREE_CODES

/* Number of language-independent tree codes.  */
#define NUM_TREE_CODES \
  ((int) LAST_AND_UNUSED_TREE_CODE)

#define CODE_CONTAINS_STRUCT(CODE, STRUCT) \
  (tree_contains_struct[(CODE)][(STRUCT)])


/* Classify which part of the compiler has defined a given builtin function.
   Note that we assume below that this is no more than two bits.  */
enum built_in_class {
  NOT_BUILT_IN = 0,
  BUILT_IN_FRONTEND,
  BUILT_IN_MD,
  BUILT_IN_NORMAL
};

/* Last marker used for LTO stremaing of built_in_class.  We cannot add it
   to the enum since we need the enumb to fit in 2 bits.  */
#define BUILT_IN_LAST (BUILT_IN_NORMAL + 1)

/* Codes that identify the various built in functions
   so that expand_call can identify them quickly.  */
#define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) ENUM,
enum built_in_function {
#include "builtins.def"
  /* Complex division routines in libgcc.  These are done via builtins
     because emit_library_call_value can't handle complex values.  */
  BUILT_IN_COMPLEX_MUL_MIN,
  BUILT_IN_COMPLEX_MUL_MAX
    = BUILT_IN_COMPLEX_MUL_MIN
      + MAX_MODE_COMPLEX_FLOAT
      - MIN_MODE_COMPLEX_FLOAT,

  BUILT_IN_COMPLEX_DIV_MIN,
  BUILT_IN_COMPLEX_DIV_MAX
    = BUILT_IN_COMPLEX_DIV_MIN
      + MAX_MODE_COMPLEX_FLOAT
      - MIN_MODE_COMPLEX_FLOAT,

  /* Upper bound on non-language-specific builtins.  */
  END_BUILTINS
};

/* Internal functions.  */
enum internal_fn {
#define DEF_INTERNAL_FN(CODE, FLAGS, FNSPEC) IFN_##CODE,
#include "internal-fn.def"
  IFN_LAST
};

/* An enum that combines target-independent built-in functions with
   internal functions, so that they can be treated in a similar way.
   The numbers for built-in functions are the same as for the
   built_in_function enum.  The numbers for internal functions
   start at END_BUITLINS.  */
enum combined_fn {
#define DEF_BUILTIN(ENUM, N, C, T, LT, B, F, NA, AT, IM, COND) \
  CFN_##ENUM = int (ENUM),
#include "builtins.def"


#define DEF_INTERNAL_FN(CODE, FLAGS, FNSPEC) \
  CFN_##CODE = int (END_BUILTINS) + int (IFN_##CODE),
#include "internal-fn.def"

  CFN_LAST
};

/* Tree code classes.  Each tree_code has an associated code class
   represented by a TREE_CODE_CLASS.  */
enum tree_code_class {
  tcc_exceptional, /* An exceptional code (fits no category).  */
  tcc_constant,    /* A constant.  */
  /* Order of tcc_type and tcc_declaration is important.  */
  tcc_type,        /* A type object code.  */
  tcc_declaration, /* A declaration (also serving as variable refs).  */
  tcc_reference,   /* A reference to storage.  */
  tcc_comparison,  /* A comparison expression.  */
  tcc_unary,       /* A unary arithmetic expression.  */
  tcc_binary,      /* A binary arithmetic expression.  */
  tcc_statement,   /* A statement expression, which have side effects
		      but usually no interesting value.  */
  tcc_vl_exp,      /* A function call or other expression with a
		      variable-length operand vector.  */
  tcc_expression   /* Any other expression.  */
};

/* OMP_CLAUSE codes.  Do not reorder, as this is used to index into
   the tables omp_clause_num_ops and omp_clause_code_name.  */
enum omp_clause_code {
  /* Clause zero is special-cased inside the parser
     (c_parser_omp_variable_list).  */
  OMP_CLAUSE_ERROR = 0,

  /* OpenACC/OpenMP clause: private (variable_list).  */
  OMP_CLAUSE_PRIVATE,

  /* OpenMP clause: shared (variable_list).  */
  OMP_CLAUSE_SHARED,

  /* OpenACC/OpenMP clause: firstprivate (variable_list).  */
  OMP_CLAUSE_FIRSTPRIVATE,

  /* OpenMP clause: lastprivate (variable_list).  */
  OMP_CLAUSE_LASTPRIVATE,

  /* OpenACC/OpenMP clause: reduction (operator:variable_list).
     OMP_CLAUSE_REDUCTION_CODE: The tree_code of the operator.
     Operand 1: OMP_CLAUSE_REDUCTION_INIT: Stmt-list to initialize the var.
     Operand 2: OMP_CLAUSE_REDUCTION_MERGE: Stmt-list to merge private var
                into the shared one.
     Operand 3: OMP_CLAUSE_REDUCTION_PLACEHOLDER: A dummy VAR_DECL
                placeholder used in OMP_CLAUSE_REDUCTION_{INIT,MERGE}.
     Operand 4: OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER: Another dummy
		VAR_DECL placeholder, used like the above for C/C++ array
		reductions.  */
  OMP_CLAUSE_REDUCTION,

  /* OpenMP clause: task_reduction (operator:variable_list).  */
  OMP_CLAUSE_TASK_REDUCTION,

  /* OpenMP clause: in_reduction (operator:variable_list).  */
  OMP_CLAUSE_IN_REDUCTION,

  /* OpenMP clause: copyin (variable_list).  */
  OMP_CLAUSE_COPYIN,

  /* OpenMP clause: copyprivate (variable_list).  */
  OMP_CLAUSE_COPYPRIVATE,

  /* OpenMP clause: linear (variable-list[:linear-step]).  */
  OMP_CLAUSE_LINEAR,

  /* OpenMP clause: aligned (variable-list[:alignment]).  */
  OMP_CLAUSE_ALIGNED,

  /* OpenMP clause: depend ({in,out,inout}:variable-list).  */
  OMP_CLAUSE_DEPEND,

  /* OpenMP clause: nontemporal (variable-list).  */
  OMP_CLAUSE_NONTEMPORAL,

  /* OpenMP clause: uniform (argument-list).  */
  OMP_CLAUSE_UNIFORM,

  /* OpenMP clause: to (extended-list).
     Only when it appears in declare target.  */
  OMP_CLAUSE_TO_DECLARE,

  /* OpenMP clause: link (variable-list).  */
  OMP_CLAUSE_LINK,

  /* OpenMP clause: from (variable-list).  */
  OMP_CLAUSE_FROM,

  /* OpenMP clause: to (variable-list).  */
  OMP_CLAUSE_TO,

  /* OpenACC clauses: {copy, copyin, copyout, create, delete, deviceptr,
     device, host (self), present, present_or_copy (pcopy), present_or_copyin
     (pcopyin), present_or_copyout (pcopyout), present_or_create (pcreate)}
     (variable-list).

     OpenMP clause: map ({alloc:,to:,from:,tofrom:,}variable-list).  */
  OMP_CLAUSE_MAP,

  /* OpenACC clause: use_device (variable-list).
     OpenMP clause: use_device_ptr (ptr-list).  */
  OMP_CLAUSE_USE_DEVICE_PTR,

  /* OpenMP clause: use_device_addr (variable-list).  */
  OMP_CLAUSE_USE_DEVICE_ADDR,

  /* OpenMP clause: is_device_ptr (variable-list).  */
  OMP_CLAUSE_IS_DEVICE_PTR,

  /* OpenMP clause: inclusive (variable-list).  */
  OMP_CLAUSE_INCLUSIVE,

  /* OpenMP clause: exclusive (variable-list).  */
  OMP_CLAUSE_EXCLUSIVE,

  /* Internal structure to hold OpenACC cache directive's variable-list.
     #pragma acc cache (variable-list).  */
  OMP_CLAUSE__CACHE_,

  /* OpenACC clause: gang [(gang-argument-list)].
     Where
      gang-argument-list: [gang-argument-list, ] gang-argument
      gang-argument: [num:] integer-expression
                   | static: size-expression
      size-expression: * | integer-expression.  */
  OMP_CLAUSE_GANG,

  /* OpenACC clause: async [(integer-expression)].  */
  OMP_CLAUSE_ASYNC,

  /* OpenACC clause: wait [(integer-expression-list)].  */
  OMP_CLAUSE_WAIT,

  /* OpenACC clause: auto.  */
  OMP_CLAUSE_AUTO,

  /* OpenACC clause: seq.  */
  OMP_CLAUSE_SEQ,

  /* Internal clause: temporary for combined loops expansion.  */
  OMP_CLAUSE__LOOPTEMP_,

  /* Internal clause: temporary for task reductions.  */
  OMP_CLAUSE__REDUCTEMP_,

  /* Internal clause: temporary for lastprivate(conditional:).  */
  OMP_CLAUSE__CONDTEMP_,

  /* Internal clause: temporary for inscan reductions.  */
  OMP_CLAUSE__SCANTEMP_,

  /* OpenACC/OpenMP clause: if (scalar-expression).  */
  OMP_CLAUSE_IF,

  /* OpenMP clause: num_threads (integer-expression).  */
  OMP_CLAUSE_NUM_THREADS,

  /* OpenMP clause: schedule.  */
  OMP_CLAUSE_SCHEDULE,

  /* OpenMP clause: nowait.  */
  OMP_CLAUSE_NOWAIT,

  /* OpenMP clause: ordered [(constant-integer-expression)].  */
  OMP_CLAUSE_ORDERED,

  /* OpenACC/OpenMP clause: default.  */
  OMP_CLAUSE_DEFAULT,

  /* OpenACC/OpenMP clause: collapse (constant-integer-expression).  */
  OMP_CLAUSE_COLLAPSE,

  /* OpenMP clause: untied.  */
  OMP_CLAUSE_UNTIED,

  /* OpenMP clause: final (scalar-expression).  */
  OMP_CLAUSE_FINAL,

  /* OpenMP clause: mergeable.  */
  OMP_CLAUSE_MERGEABLE,

  /* OpenMP clause: device (integer-expression).  */
  OMP_CLAUSE_DEVICE,

  /* OpenMP clause: dist_schedule (static[:chunk-size]).  */
  OMP_CLAUSE_DIST_SCHEDULE,

  /* OpenMP clause: inbranch.  */
  OMP_CLAUSE_INBRANCH,

  /* OpenMP clause: notinbranch.  */
  OMP_CLAUSE_NOTINBRANCH,

  /* OpenMP clause: num_teams(integer-expression).  */
  OMP_CLAUSE_NUM_TEAMS,

  /* OpenMP clause: thread_limit(integer-expression).  */
  OMP_CLAUSE_THREAD_LIMIT,

  /* OpenMP clause: proc_bind ({master,close,spread}).  */
  OMP_CLAUSE_PROC_BIND,

  /* OpenMP clause: safelen (constant-integer-expression).  */
  OMP_CLAUSE_SAFELEN,

  /* OpenMP clause: simdlen (constant-integer-expression).  */
  OMP_CLAUSE_SIMDLEN,

  /* OpenMP clause: for.  */
  OMP_CLAUSE_FOR,

  /* OpenMP clause: parallel.  */
  OMP_CLAUSE_PARALLEL,

  /* OpenMP clause: sections.  */
  OMP_CLAUSE_SECTIONS,

  /* OpenMP clause: taskgroup.  */
  OMP_CLAUSE_TASKGROUP,

  /* OpenMP clause: priority (integer-expression).  */
  OMP_CLAUSE_PRIORITY,

  /* OpenMP clause: grainsize (integer-expression).  */
  OMP_CLAUSE_GRAINSIZE,

  /* OpenMP clause: num_tasks (integer-expression).  */
  OMP_CLAUSE_NUM_TASKS,

  /* OpenMP clause: nogroup.  */
  OMP_CLAUSE_NOGROUP,

  /* OpenMP clause: threads.  */
  OMP_CLAUSE_THREADS,

  /* OpenMP clause: simd.  */
  OMP_CLAUSE_SIMD,

  /* OpenMP clause: hint (integer-expression).  */
  OMP_CLAUSE_HINT,

  /* OpenMP clause: defaultmap (tofrom: scalar).  */
  OMP_CLAUSE_DEFAULTMAP,

  /* OpenMP clause: order (concurrent).  */
  OMP_CLAUSE_ORDER,

  /* OpenMP clause: bind (binding).  */
  OMP_CLAUSE_BIND,

  /* Internally used only clause, holding SIMD uid.  */
  OMP_CLAUSE__SIMDUID_,

  /* Internally used only clause, flag whether this is SIMT simd
     loop or not.  */
  OMP_CLAUSE__SIMT_,

  /* OpenACC clause: independent.  */
  OMP_CLAUSE_INDEPENDENT,

  /* OpenACC clause: worker [( [num:] integer-expression)].  */
  OMP_CLAUSE_WORKER,

  /* OpenACC clause: vector [( [length:] integer-expression)].  */
  OMP_CLAUSE_VECTOR,

  /* OpenACC clause: num_gangs (integer-expression).  */
  OMP_CLAUSE_NUM_GANGS,

  /* OpenACC clause: num_workers (integer-expression).  */
  OMP_CLAUSE_NUM_WORKERS,

  /* OpenACC clause: vector_length (integer-expression).  */
  OMP_CLAUSE_VECTOR_LENGTH,

  /* OpenACC clause: tile ( size-expr-list ).  */
  OMP_CLAUSE_TILE,

  /* OpenMP internal-only clause to specify grid dimensions of a gridified
     kernel.  */
  OMP_CLAUSE__GRIDDIM_,

  /* OpenACC clause: if_present.  */
  OMP_CLAUSE_IF_PRESENT,

  /* OpenACC clause: finalize.  */
  OMP_CLAUSE_FINALIZE
};

#undef DEFTREESTRUCT
#define DEFTREESTRUCT(ENUM, NAME) ENUM,
enum tree_node_structure_enum {
#include "treestruct.def"
  LAST_TS_ENUM
};
#undef DEFTREESTRUCT

enum omp_clause_schedule_kind {
  OMP_CLAUSE_SCHEDULE_STATIC,
  OMP_CLAUSE_SCHEDULE_DYNAMIC,
  OMP_CLAUSE_SCHEDULE_GUIDED,
  OMP_CLAUSE_SCHEDULE_AUTO,
  OMP_CLAUSE_SCHEDULE_RUNTIME,
  OMP_CLAUSE_SCHEDULE_MASK = (1 << 3) - 1,
  OMP_CLAUSE_SCHEDULE_MONOTONIC = (1 << 3),
  OMP_CLAUSE_SCHEDULE_NONMONOTONIC = (1 << 4),
  OMP_CLAUSE_SCHEDULE_LAST = 2 * OMP_CLAUSE_SCHEDULE_NONMONOTONIC - 1
};

enum omp_clause_default_kind {
  OMP_CLAUSE_DEFAULT_UNSPECIFIED,
  OMP_CLAUSE_DEFAULT_SHARED,
  OMP_CLAUSE_DEFAULT_NONE,
  OMP_CLAUSE_DEFAULT_PRIVATE,
  OMP_CLAUSE_DEFAULT_FIRSTPRIVATE,
  OMP_CLAUSE_DEFAULT_PRESENT,
  OMP_CLAUSE_DEFAULT_LAST
};

enum omp_clause_defaultmap_kind {
  OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED,
  OMP_CLAUSE_DEFAULTMAP_CATEGORY_SCALAR,
  OMP_CLAUSE_DEFAULTMAP_CATEGORY_AGGREGATE,
  OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALLOCATABLE,
  OMP_CLAUSE_DEFAULTMAP_CATEGORY_POINTER,
  OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK = 7,
  OMP_CLAUSE_DEFAULTMAP_ALLOC = 1 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  OMP_CLAUSE_DEFAULTMAP_TO = 2 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  OMP_CLAUSE_DEFAULTMAP_FROM = 3 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  OMP_CLAUSE_DEFAULTMAP_TOFROM = 4 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  OMP_CLAUSE_DEFAULTMAP_FIRSTPRIVATE
    = 5 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  OMP_CLAUSE_DEFAULTMAP_NONE = 6 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  OMP_CLAUSE_DEFAULTMAP_DEFAULT
    = 7 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1),
  OMP_CLAUSE_DEFAULTMAP_MASK = 7 * (OMP_CLAUSE_DEFAULTMAP_CATEGORY_MASK + 1)
};

enum omp_clause_bind_kind {
  OMP_CLAUSE_BIND_TEAMS,
  OMP_CLAUSE_BIND_PARALLEL,
  OMP_CLAUSE_BIND_THREAD
};

/* memory-order-clause on OpenMP atomic/flush constructs or
   argument of atomic_default_mem_order clause.  */
enum omp_memory_order {
  OMP_MEMORY_ORDER_UNSPECIFIED,
  OMP_MEMORY_ORDER_RELAXED,
  OMP_MEMORY_ORDER_ACQUIRE,
  OMP_MEMORY_ORDER_RELEASE,
  OMP_MEMORY_ORDER_ACQ_REL,
  OMP_MEMORY_ORDER_SEQ_CST
};

/* There is a TYPE_QUAL value for each type qualifier.  They can be
   combined by bitwise-or to form the complete set of qualifiers for a
   type.  */
enum cv_qualifier {
  TYPE_UNQUALIFIED   = 0x0,
  TYPE_QUAL_CONST    = 0x1,
  TYPE_QUAL_VOLATILE = 0x2,
  TYPE_QUAL_RESTRICT = 0x4,
  TYPE_QUAL_ATOMIC   = 0x8
};

/* Standard named or nameless data types of the C compiler.  */
enum tree_index {
  TI_ERROR_MARK,
  TI_INTQI_TYPE,
  TI_INTHI_TYPE,
  TI_INTSI_TYPE,
  TI_INTDI_TYPE,
  TI_INTTI_TYPE,

  TI_UINTQI_TYPE,
  TI_UINTHI_TYPE,
  TI_UINTSI_TYPE,
  TI_UINTDI_TYPE,
  TI_UINTTI_TYPE,

  TI_ATOMICQI_TYPE,
  TI_ATOMICHI_TYPE,
  TI_ATOMICSI_TYPE,
  TI_ATOMICDI_TYPE,
  TI_ATOMICTI_TYPE,

  TI_UINT16_TYPE,
  TI_UINT32_TYPE,
  TI_UINT64_TYPE,

  TI_VOID,

  TI_INTEGER_ZERO,
  TI_INTEGER_ONE,
  TI_INTEGER_THREE,
  TI_INTEGER_MINUS_ONE,
  TI_NULL_POINTER,

  TI_SIZE_ZERO,
  TI_SIZE_ONE,

  TI_BITSIZE_ZERO,
  TI_BITSIZE_ONE,
  TI_BITSIZE_UNIT,

  TI_PUBLIC,
  TI_PROTECTED,
  TI_PRIVATE,

  TI_BOOLEAN_FALSE,
  TI_BOOLEAN_TRUE,

  TI_FLOAT_TYPE,
  TI_DOUBLE_TYPE,
  TI_LONG_DOUBLE_TYPE,

  /* The _FloatN and _FloatNx types must be consecutive, and in the
     same sequence as the corresponding complex types, which must also
     be consecutive; _FloatN must come before _FloatNx; the order must
     also be the same as in the floatn_nx_types array and the RID_*
     values in c-common.h.  This is so that iterations over these
     types work as intended.  */
  TI_FLOAT16_TYPE,
  TI_FLOATN_TYPE_FIRST = TI_FLOAT16_TYPE,
  TI_FLOATN_NX_TYPE_FIRST = TI_FLOAT16_TYPE,
  TI_FLOAT32_TYPE,
  TI_FLOAT64_TYPE,
  TI_FLOAT128_TYPE,
  TI_FLOATN_TYPE_LAST = TI_FLOAT128_TYPE,
#define NUM_FLOATN_TYPES (TI_FLOATN_TYPE_LAST - TI_FLOATN_TYPE_FIRST + 1)
  TI_FLOAT32X_TYPE,
  TI_FLOATNX_TYPE_FIRST = TI_FLOAT32X_TYPE,
  TI_FLOAT64X_TYPE,
  TI_FLOAT128X_TYPE,
  TI_FLOATNX_TYPE_LAST = TI_FLOAT128X_TYPE,
  TI_FLOATN_NX_TYPE_LAST = TI_FLOAT128X_TYPE,
#define NUM_FLOATNX_TYPES (TI_FLOATNX_TYPE_LAST - TI_FLOATNX_TYPE_FIRST + 1)
#define NUM_FLOATN_NX_TYPES (TI_FLOATN_NX_TYPE_LAST		\
			     - TI_FLOATN_NX_TYPE_FIRST		\
			     + 1)

  /* Put the complex types after their component types, so that in (sequential)
     tree streaming we can assert that their component types have already been
     handled (see tree-streamer.c:record_common_node).  */
  TI_COMPLEX_INTEGER_TYPE,
  TI_COMPLEX_FLOAT_TYPE,
  TI_COMPLEX_DOUBLE_TYPE,
  TI_COMPLEX_LONG_DOUBLE_TYPE,

  TI_COMPLEX_FLOAT16_TYPE,
  TI_COMPLEX_FLOATN_NX_TYPE_FIRST = TI_COMPLEX_FLOAT16_TYPE,
  TI_COMPLEX_FLOAT32_TYPE,
  TI_COMPLEX_FLOAT64_TYPE,
  TI_COMPLEX_FLOAT128_TYPE,
  TI_COMPLEX_FLOAT32X_TYPE,
  TI_COMPLEX_FLOAT64X_TYPE,
  TI_COMPLEX_FLOAT128X_TYPE,

  TI_FLOAT_PTR_TYPE,
  TI_DOUBLE_PTR_TYPE,
  TI_LONG_DOUBLE_PTR_TYPE,
  TI_INTEGER_PTR_TYPE,

  TI_VOID_TYPE,
  TI_PTR_TYPE,
  TI_CONST_PTR_TYPE,
  TI_SIZE_TYPE,
  TI_PID_TYPE,
  TI_PTRDIFF_TYPE,
  TI_VA_LIST_TYPE,
  TI_VA_LIST_GPR_COUNTER_FIELD,
  TI_VA_LIST_FPR_COUNTER_FIELD,
  TI_BOOLEAN_TYPE,
  TI_FILEPTR_TYPE,
  TI_CONST_TM_PTR_TYPE,
  TI_FENV_T_PTR_TYPE,
  TI_CONST_FENV_T_PTR_TYPE,
  TI_FEXCEPT_T_PTR_TYPE,
  TI_CONST_FEXCEPT_T_PTR_TYPE,
  TI_POINTER_SIZED_TYPE,

  TI_DFLOAT32_TYPE,
  TI_DFLOAT64_TYPE,
  TI_DFLOAT128_TYPE,
  TI_DFLOAT32_PTR_TYPE,
  TI_DFLOAT64_PTR_TYPE,
  TI_DFLOAT128_PTR_TYPE,

  TI_VOID_LIST_NODE,

  TI_MAIN_IDENTIFIER,

  TI_SAT_SFRACT_TYPE,
  TI_SAT_FRACT_TYPE,
  TI_SAT_LFRACT_TYPE,
  TI_SAT_LLFRACT_TYPE,
  TI_SAT_USFRACT_TYPE,
  TI_SAT_UFRACT_TYPE,
  TI_SAT_ULFRACT_TYPE,
  TI_SAT_ULLFRACT_TYPE,
  TI_SFRACT_TYPE,
  TI_FRACT_TYPE,
  TI_LFRACT_TYPE,
  TI_LLFRACT_TYPE,
  TI_USFRACT_TYPE,
  TI_UFRACT_TYPE,
  TI_ULFRACT_TYPE,
  TI_ULLFRACT_TYPE,
  TI_SAT_SACCUM_TYPE,
  TI_SAT_ACCUM_TYPE,
  TI_SAT_LACCUM_TYPE,
  TI_SAT_LLACCUM_TYPE,
  TI_SAT_USACCUM_TYPE,
  TI_SAT_UACCUM_TYPE,
  TI_SAT_ULACCUM_TYPE,
  TI_SAT_ULLACCUM_TYPE,
  TI_SACCUM_TYPE,
  TI_ACCUM_TYPE,
  TI_LACCUM_TYPE,
  TI_LLACCUM_TYPE,
  TI_USACCUM_TYPE,
  TI_UACCUM_TYPE,
  TI_ULACCUM_TYPE,
  TI_ULLACCUM_TYPE,
  TI_QQ_TYPE,
  TI_HQ_TYPE,
  TI_SQ_TYPE,
  TI_DQ_TYPE,
  TI_TQ_TYPE,
  TI_UQQ_TYPE,
  TI_UHQ_TYPE,
  TI_USQ_TYPE,
  TI_UDQ_TYPE,
  TI_UTQ_TYPE,
  TI_SAT_QQ_TYPE,
  TI_SAT_HQ_TYPE,
  TI_SAT_SQ_TYPE,
  TI_SAT_DQ_TYPE,
  TI_SAT_TQ_TYPE,
  TI_SAT_UQQ_TYPE,
  TI_SAT_UHQ_TYPE,
  TI_SAT_USQ_TYPE,
  TI_SAT_UDQ_TYPE,
  TI_SAT_UTQ_TYPE,
  TI_HA_TYPE,
  TI_SA_TYPE,
  TI_DA_TYPE,
  TI_TA_TYPE,
  TI_UHA_TYPE,
  TI_USA_TYPE,
  TI_UDA_TYPE,
  TI_UTA_TYPE,
  TI_SAT_HA_TYPE,
  TI_SAT_SA_TYPE,
  TI_SAT_DA_TYPE,
  TI_SAT_TA_TYPE,
  TI_SAT_UHA_TYPE,
  TI_SAT_USA_TYPE,
  TI_SAT_UDA_TYPE,
  TI_SAT_UTA_TYPE,

  TI_OPTIMIZATION_DEFAULT,
  TI_OPTIMIZATION_CURRENT,
  TI_TARGET_OPTION_DEFAULT,
  TI_TARGET_OPTION_CURRENT,
  TI_CURRENT_TARGET_PRAGMA,
  TI_CURRENT_OPTIMIZE_PRAGMA,

  TI_CHREC_DONT_KNOW,
  TI_CHREC_KNOWN,

  TI_MAX
};

/* An enumeration of the standard C integer types.  These must be
   ordered so that shorter types appear before longer ones, and so
   that signed types appear before unsigned ones, for the correct
   functioning of interpret_integer() in c-lex.c.  */
enum integer_type_kind {
  itk_char,
  itk_signed_char,
  itk_unsigned_char,
  itk_short,
  itk_unsigned_short,
  itk_int,
  itk_unsigned_int,
  itk_long,
  itk_unsigned_long,
  itk_long_long,
  itk_unsigned_long_long,

  itk_intN_0,
  itk_unsigned_intN_0,
  itk_intN_1,
  itk_unsigned_intN_1,
  itk_intN_2,
  itk_unsigned_intN_2,
  itk_intN_3,
  itk_unsigned_intN_3,

  itk_none
};

/* A pointer-to-function member type looks like:

     struct {
       __P __pfn;
       ptrdiff_t __delta;
     };

   If __pfn is NULL, it is a NULL pointer-to-member-function.

   (Because the vtable is always the first thing in the object, we
   don't need its offset.)  If the function is virtual, then PFN is
   one plus twice the index into the vtable; otherwise, it is just a
   pointer to the function.

   Unfortunately, using the lowest bit of PFN doesn't work in
   architectures that don't impose alignment requirements on function
   addresses, or that use the lowest bit to tell one ISA from another,
   for example.  For such architectures, we use the lowest bit of
   DELTA instead of the lowest bit of the PFN, and DELTA will be
   multiplied by 2.  */
enum ptrmemfunc_vbit_where_t {
  ptrmemfunc_vbit_in_pfn,
  ptrmemfunc_vbit_in_delta
};

/* Flags that may be passed in the third argument of decl_attributes, and
   to handler functions for attributes.  */
enum attribute_flags {
  /* The type passed in is the type of a DECL, and any attributes that
     should be passed in again to be applied to the DECL rather than the
     type should be returned.  */
  ATTR_FLAG_DECL_NEXT = 1,
  /* The type passed in is a function return type, and any attributes that
     should be passed in again to be applied to the function type rather
     than the return type should be returned.  */
  ATTR_FLAG_FUNCTION_NEXT = 2,
  /* The type passed in is an array element type, and any attributes that
     should be passed in again to be applied to the array type rather
     than the element type should be returned.  */
  ATTR_FLAG_ARRAY_NEXT = 4,
  /* The type passed in is a structure, union or enumeration type being
     created, and should be modified in place.  */
  ATTR_FLAG_TYPE_IN_PLACE = 8,
  /* The attributes are being applied by default to a library function whose
     name indicates known behavior, and should be silently ignored if they
     are not in fact compatible with the function type.  */
  ATTR_FLAG_BUILT_IN = 16,
  /* A given attribute has been parsed as a C++-11 attribute.  */
  ATTR_FLAG_CXX11 = 32
};

/* Types used to represent sizes.  */
enum size_type_kind {
  stk_sizetype,		/* Normal representation of sizes in bytes.  */
  stk_ssizetype,	/* Signed representation of sizes in bytes.  */
  stk_bitsizetype,	/* Normal representation of sizes in bits.  */
  stk_sbitsizetype,	/* Signed representation of sizes in bits.  */
  stk_type_kind_last
};

enum operand_equal_flag {
  OEP_ONLY_CONST = 1,
  OEP_PURE_SAME = 2,
  OEP_MATCH_SIDE_EFFECTS = 4,
  OEP_ADDRESS_OF = 8,
  /* Internal within operand_equal_p:  */
  OEP_NO_HASH_CHECK = 16,
  /* Internal within inchash::add_expr:  */
  OEP_HASH_CHECK = 32,
  /* Makes operand_equal_p handle more expressions:  */
  OEP_LEXICOGRAPHIC = 64
};

/* Enum and arrays used for tree allocation stats.
   Keep in sync with tree.c:tree_node_kind_names.  */
enum tree_node_kind {
  d_kind,
  t_kind,
  b_kind,
  s_kind,
  r_kind,
  e_kind,
  c_kind,
  id_kind,
  vec_kind,
  binfo_kind,
  ssa_name_kind,
  constr_kind,
  x_kind,
  lang_decl,
  lang_type,
  omp_clause_kind,
  all_kinds
};

enum annot_expr_kind {
  annot_expr_ivdep_kind,
  annot_expr_unroll_kind,
  annot_expr_no_vector_kind,
  annot_expr_vector_kind,
  annot_expr_parallel_kind,
  annot_expr_kind_last
};

/*---------------------------------------------------------------------------
                                Type definitions
---------------------------------------------------------------------------*/
/* When processing aliases at the symbol table level, we need the
   declaration of target. For this reason we need to queue aliases and
   process them after all declarations has been produced.  */
struct GTY(()) alias_pair {
  tree decl;
  tree target;
};

/* An initialization priority.  */
typedef unsigned short priority_type;

/* The type of a callback function for walking over tree structure.  */
typedef tree (*walk_tree_fn) (tree *, int *, void *);

/* The type of a callback function that represents a custom walk_tree.  */
typedef tree (*walk_tree_lh) (tree *, int *, tree (*) (tree *, int *, void *),
			      void *, hash_set<tree> *);


/*---------------------------------------------------------------------------
                              Main data structures
---------------------------------------------------------------------------*/
/* A tree node can represent a data type, a variable, an expression
   or a statement.  Each node has a TREE_CODE which says what kind of
   thing it represents.  Some common codes are:
   INTEGER_TYPE -- represents a type of integers.
   ARRAY_TYPE -- represents a type of pointer.
   VAR_DECL -- represents a declared variable.
   INTEGER_CST -- represents a constant integer value.
   PLUS_EXPR -- represents a sum (an expression).

   As for the contents of a tree node: there are some fields
   that all nodes share.  Each TREE_CODE has various special-purpose
   fields as well.  The fields of a node are never accessed directly,
   always through accessor macros.  */

/* Every kind of tree node starts with this structure,
   so all nodes have these fields.

   See the accessor macros, defined below, for documentation of the
   fields, and the table below which connects the fields and the
   accessor macros.  */

struct GTY(()) tree_base {
  ENUM_BITFIELD(tree_code) code : 16;

  unsigned side_effects_flag : 1;
  unsigned constant_flag : 1;
  unsigned addressable_flag : 1;
  unsigned volatile_flag : 1;
  unsigned readonly_flag : 1;
  unsigned asm_written_flag: 1;
  unsigned nowarning_flag : 1;
  unsigned visited : 1;

  unsigned used_flag : 1;
  unsigned nothrow_flag : 1;
  unsigned static_flag : 1;
  unsigned public_flag : 1;
  unsigned private_flag : 1;
  unsigned protected_flag : 1;
  unsigned deprecated_flag : 1;
  unsigned default_def_flag : 1;

  union {
    /* The bits in the following structure should only be used with
       accessor macros that constrain inputs with tree checking.  */
    struct {
      unsigned lang_flag_0 : 1;
      unsigned lang_flag_1 : 1;
      unsigned lang_flag_2 : 1;
      unsigned lang_flag_3 : 1;
      unsigned lang_flag_4 : 1;
      unsigned lang_flag_5 : 1;
      unsigned lang_flag_6 : 1;
      unsigned saturating_flag : 1;

      unsigned unsigned_flag : 1;
      unsigned packed_flag : 1;
      unsigned user_align : 1;
      unsigned nameless_flag : 1;
      unsigned atomic_flag : 1;
      unsigned spare0 : 3;

      unsigned spare1 : 8;

      /* This field is only used with TREE_TYPE nodes; the only reason it is
	 present in tree_base instead of tree_type is to save space.  The size
	 of the field must be large enough to hold addr_space_t values.  */
      unsigned address_space : 8;
    } bits;

    /* The following fields are present in tree_base to save space.  The
       nodes using them do not require any of the flags above and so can
       make better use of the 4-byte sized word.  */

    /* The number of HOST_WIDE_INTs in an INTEGER_CST.  */
    struct {
      /* The number of HOST_WIDE_INTs if the INTEGER_CST is accessed in
	 its native precision.  */
      unsigned char unextended;

      /* The number of HOST_WIDE_INTs if the INTEGER_CST is extended to
	 wider precisions based on its TYPE_SIGN.  */
      unsigned char extended;

      /* The number of HOST_WIDE_INTs if the INTEGER_CST is accessed in
	 offset_int precision, with smaller integers being extended
	 according to their TYPE_SIGN.  This is equal to one of the two
	 fields above but is cached for speed.  */
      unsigned char offset;
    } int_length;

    /* VEC length.  This field is only used with TREE_VEC.  */
    int length;

    /* This field is only used with VECTOR_CST.  */
    struct {
      /* The value of VECTOR_CST_LOG2_NPATTERNS.  */
      unsigned int log2_npatterns : 8;

      /* The value of VECTOR_CST_NELTS_PER_PATTERN.  */
      unsigned int nelts_per_pattern : 8;

      /* For future expansion.  */
      unsigned int unused : 16;
    } vector_cst;

    /* SSA version number.  This field is only used with SSA_NAME.  */
    unsigned int version;

    /* CHREC_VARIABLE.  This field is only used with POLYNOMIAL_CHREC.  */
    unsigned int chrec_var;

    /* Internal function code.  */
    enum internal_fn ifn;

    /* OMP_ATOMIC* memory order.  */
    enum omp_memory_order omp_atomic_memory_order;

    /* The following two fields are used for MEM_REF and TARGET_MEM_REF
       expression trees and specify known data non-dependences.  For
       two memory references in a function they are known to not
       alias if dependence_info.clique are equal and dependence_info.base
       are distinct.  Clique number zero means there is no information,
       clique number one is populated from function global information
       and thus needs no remapping on transforms like loop unrolling.  */
    struct {
      unsigned short clique;
      unsigned short base;
    } dependence_info;
  } GTY((skip(""))) u;
};

/* The following table lists the uses of each of the above flags and
   for which types of nodes they are defined.

   addressable_flag:

       TREE_ADDRESSABLE in
           VAR_DECL, PARM_DECL, RESULT_DECL, FUNCTION_DECL, LABEL_DECL
           SSA_NAME
           all types
           CONSTRUCTOR, IDENTIFIER_NODE
           STMT_EXPR

       CALL_EXPR_TAILCALL in
           CALL_EXPR

       CASE_LOW_SEEN in
           CASE_LABEL_EXPR

       PREDICT_EXPR_OUTCOME in
	   PREDICT_EXPR

   static_flag:

       TREE_STATIC in
           VAR_DECL, FUNCTION_DECL
           CONSTRUCTOR

       TREE_NO_TRAMPOLINE in
           ADDR_EXPR

       BINFO_VIRTUAL_P in
           TREE_BINFO

       TREE_SYMBOL_REFERENCED in
           IDENTIFIER_NODE

       CLEANUP_EH_ONLY in
           TARGET_EXPR, WITH_CLEANUP_EXPR

       TRY_CATCH_IS_CLEANUP in
           TRY_CATCH_EXPR

       ASM_INPUT_P in
           ASM_EXPR

       TYPE_REF_CAN_ALIAS_ALL in
           POINTER_TYPE, REFERENCE_TYPE

       CASE_HIGH_SEEN in
           CASE_LABEL_EXPR

       ENUM_IS_SCOPED in
	   ENUMERAL_TYPE

       TRANSACTION_EXPR_OUTER in
	   TRANSACTION_EXPR

       SSA_NAME_ANTI_RANGE_P in
	   SSA_NAME

       MUST_TAIL_CALL in
	   CALL_EXPR

   public_flag:

       TREE_OVERFLOW in
           INTEGER_CST, REAL_CST, COMPLEX_CST, VECTOR_CST

       TREE_PUBLIC in
           VAR_DECL, FUNCTION_DECL
           IDENTIFIER_NODE

       CONSTRUCTOR_NO_CLEARING in
           CONSTRUCTOR

       ASM_VOLATILE_P in
           ASM_EXPR

       CALL_EXPR_VA_ARG_PACK in
           CALL_EXPR

       TYPE_CACHED_VALUES_P in
           all types

       SAVE_EXPR_RESOLVED_P in
           SAVE_EXPR

       OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE in
           OMP_CLAUSE_LASTPRIVATE

       OMP_CLAUSE_PRIVATE_DEBUG in
           OMP_CLAUSE_PRIVATE

       OMP_CLAUSE_LINEAR_NO_COPYIN in
	   OMP_CLAUSE_LINEAR

       OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION in
	   OMP_CLAUSE_MAP

       OMP_CLAUSE_REDUCTION_OMP_ORIG_REF in
	   OMP_CLAUSE_{,TASK_,IN_}REDUCTION

       TRANSACTION_EXPR_RELAXED in
	   TRANSACTION_EXPR

       FALLTHROUGH_LABEL_P in
	   LABEL_DECL

       SSA_NAME_IS_VIRTUAL_OPERAND in
	   SSA_NAME

       EXPR_LOCATION_WRAPPER_P in
	   NON_LVALUE_EXPR, VIEW_CONVERT_EXPR

   private_flag:

       TREE_PRIVATE in
           all decls

       CALL_EXPR_RETURN_SLOT_OPT in
           CALL_EXPR

       OMP_SECTION_LAST in
           OMP_SECTION

       OMP_PARALLEL_COMBINED in
           OMP_PARALLEL

       OMP_CLAUSE_PRIVATE_OUTER_REF in
	   OMP_CLAUSE_PRIVATE

       OMP_CLAUSE_LINEAR_NO_COPYOUT in
	   OMP_CLAUSE_LINEAR

       TYPE_REF_IS_RVALUE in
	   REFERENCE_TYPE

       ENUM_IS_OPAQUE in
	   ENUMERAL_TYPE

   protected_flag:

       TREE_PROTECTED in
           BLOCK
           all decls

       CALL_FROM_THUNK_P and
       CALL_ALLOCA_FOR_VAR_P in
           CALL_EXPR

       OMP_CLAUSE_LINEAR_VARIABLE_STRIDE in
	   OMP_CLAUSE_LINEAR

       ASM_INLINE_P in
	   ASM_EXPR

   side_effects_flag:

       TREE_SIDE_EFFECTS in
           all expressions
           all decls
           all constants

       FORCED_LABEL in
           LABEL_DECL

   volatile_flag:

       TREE_THIS_VOLATILE in
           all expressions
           all decls

       TYPE_VOLATILE in
           all types

   readonly_flag:

       TREE_READONLY in
           all expressions
           all decls

       TYPE_READONLY in
           all types

   constant_flag:

       TREE_CONSTANT in
           all expressions
           all decls
           all constants

       TYPE_SIZES_GIMPLIFIED in
           all types

   unsigned_flag:

       TYPE_UNSIGNED in
           all types

       DECL_UNSIGNED in
           all decls

   asm_written_flag:

       TREE_ASM_WRITTEN in
           VAR_DECL, FUNCTION_DECL, TYPE_DECL
           RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE
           BLOCK, STRING_CST

       SSA_NAME_OCCURS_IN_ABNORMAL_PHI in
           SSA_NAME

   used_flag:

       TREE_USED in
           all expressions
           all decls
           IDENTIFIER_NODE

   nothrow_flag:

       TREE_NOTHROW in
           CALL_EXPR
           FUNCTION_DECL

       TREE_THIS_NOTRAP in
          INDIRECT_REF, MEM_REF, TARGET_MEM_REF, ARRAY_REF, ARRAY_RANGE_REF

       SSA_NAME_IN_FREE_LIST in
          SSA_NAME

       DECL_NONALIASED in
	  VAR_DECL

   deprecated_flag:

       TREE_DEPRECATED in
           all decls
	   all types

       IDENTIFIER_TRANSPARENT_ALIAS in
           IDENTIFIER_NODE

       SSA_NAME_POINTS_TO_READONLY_MEMORY in
	   SSA_NAME

   visited:

       TREE_VISITED in
           all trees (used liberally by many passes)

   saturating_flag:

       TYPE_REVERSE_STORAGE_ORDER in
           RECORD_TYPE, UNION_TYPE, QUAL_UNION_TYPE, ARRAY_TYPE

       TYPE_SATURATING in
           other types

       VAR_DECL_IS_VIRTUAL_OPERAND in
	   VAR_DECL

   nowarning_flag:

       TREE_NO_WARNING in
           all expressions
           all decls

       TYPE_ARTIFICIAL in
           all types

   default_def_flag:

       TYPE_FINAL_P in
	   RECORD_TYPE, UNION_TYPE and QUAL_UNION_TYPE

       TYPE_VECTOR_OPAQUE in
	   VECTOR_TYPE

       SSA_NAME_IS_DEFAULT_DEF in
           SSA_NAME

       DECL_NONLOCAL_FRAME in
	   VAR_DECL

       REF_REVERSE_STORAGE_ORDER in
           BIT_FIELD_REF, MEM_REF

       FUNC_ADDR_BY_DESCRIPTOR in
           ADDR_EXPR

       CALL_EXPR_BY_DESCRIPTOR in
           CALL_EXPR
*/

struct GTY(()) tree_typed {
  struct tree_base base;
  tree type;
};

struct GTY(()) tree_common {
  struct tree_typed typed;
  tree chain;
};

struct GTY(()) tree_int_cst {
  struct tree_typed typed;
  HOST_WIDE_INT val[1];
};


struct GTY(()) tree_real_cst {
  struct tree_typed typed;
  struct real_value * real_cst_ptr;
};

struct GTY(()) tree_fixed_cst {
  struct tree_typed typed;
  struct fixed_value * fixed_cst_ptr;
};

struct GTY(()) tree_string {
  struct tree_typed typed;
  int length;
  char str[1];
};

struct GTY(()) tree_complex {
  struct tree_typed typed;
  tree real;
  tree imag;
};

struct GTY(()) tree_vector {
  struct tree_typed typed;
  tree GTY ((length ("vector_cst_encoded_nelts ((tree) &%h)"))) elts[1];
};

struct GTY(()) tree_poly_int_cst {
  struct tree_typed typed;
  tree coeffs[NUM_POLY_INT_COEFFS];
};

struct GTY(()) tree_identifier {
  struct tree_common common;
  struct ht_identifier id;
};

struct GTY(()) tree_list {
  struct tree_common common;
  tree purpose;
  tree value;
};

struct GTY(()) tree_vec {
  struct tree_common common;
  tree GTY ((length ("TREE_VEC_LENGTH ((tree)&%h)"))) a[1];
};

/* A single element of a CONSTRUCTOR. VALUE holds the actual value of the
   element. INDEX can optionally design the position of VALUE: in arrays,
   it is the index where VALUE has to be placed; in structures, it is the
   FIELD_DECL of the member.  */
struct GTY(()) constructor_elt {
  tree index;
  tree value;
};

struct GTY(()) tree_constructor {
  struct tree_typed typed;
  vec<constructor_elt, va_gc> *elts;
};

enum omp_clause_depend_kind
{
  OMP_CLAUSE_DEPEND_IN,
  OMP_CLAUSE_DEPEND_OUT,
  OMP_CLAUSE_DEPEND_INOUT,
  OMP_CLAUSE_DEPEND_MUTEXINOUTSET,
  OMP_CLAUSE_DEPEND_SOURCE,
  OMP_CLAUSE_DEPEND_SINK,
  OMP_CLAUSE_DEPEND_DEPOBJ,
  OMP_CLAUSE_DEPEND_LAST
};

enum omp_clause_proc_bind_kind
{
  /* Numbers should match omp_proc_bind_t enum in omp.h.  */
  OMP_CLAUSE_PROC_BIND_FALSE = 0,
  OMP_CLAUSE_PROC_BIND_TRUE = 1,
  OMP_CLAUSE_PROC_BIND_MASTER = 2,
  OMP_CLAUSE_PROC_BIND_CLOSE = 3,
  OMP_CLAUSE_PROC_BIND_SPREAD = 4,
  OMP_CLAUSE_PROC_BIND_LAST
};

enum omp_clause_linear_kind
{
  OMP_CLAUSE_LINEAR_DEFAULT,
  OMP_CLAUSE_LINEAR_REF,
  OMP_CLAUSE_LINEAR_VAL,
  OMP_CLAUSE_LINEAR_UVAL
};

struct GTY(()) tree_exp {
  struct tree_typed typed;
  location_t locus;
  tree GTY ((special ("tree_exp"),
	     desc ("TREE_CODE ((tree) &%0)")))
    operands[1];
};

/* Immediate use linking structure.  This structure is used for maintaining
   a doubly linked list of uses of an SSA_NAME.  */
struct GTY(()) ssa_use_operand_t {
  struct ssa_use_operand_t* GTY((skip(""))) prev;
  struct ssa_use_operand_t* GTY((skip(""))) next;
  /* Immediate uses for a given SSA name are maintained as a cyclic
     list.  To recognize the root of this list, the location field
     needs to point to the original SSA name.  Since statements and
     SSA names are of different data types, we need this union.  See
     the explanation in struct imm_use_iterator.  */
  union { gimple *stmt; tree ssa_name; } GTY((skip(""))) loc;
  tree *GTY((skip(""))) use;
};

struct GTY(()) tree_ssa_name {
  struct tree_typed typed;

  /* _DECL wrapped by this SSA name.  */
  tree var;

  /* Statement that defines this SSA name.  */
  gimple *def_stmt;

  /* Value range information.  */
  union ssa_name_info_type {
    /* Pointer attributes used for alias analysis.  */
    struct GTY ((tag ("0"))) ptr_info_def *ptr_info;
    /* Value range attributes used for zero/sign extension elimination.  */
    struct GTY ((tag ("1"))) range_info_def *range_info;
  } GTY ((desc ("%1.typed.type ?" \
		"!POINTER_TYPE_P (TREE_TYPE ((tree)&%1)) : 2"))) info;

  /* Immediate uses list for this SSA_NAME.  */
  struct ssa_use_operand_t imm_uses;
};

struct GTY(()) phi_arg_d {
  /* imm_use MUST be the first element in struct because we do some
     pointer arithmetic with it.  See phi_arg_index_from_use.  */
  struct ssa_use_operand_t imm_use;
  tree def;
  location_t locus;
};

struct GTY(()) tree_omp_clause {
  struct tree_common common;
  location_t locus;
  enum omp_clause_code code;
  union omp_clause_subcode {
    enum omp_clause_default_kind   default_kind;
    enum omp_clause_schedule_kind  schedule_kind;
    enum omp_clause_depend_kind    depend_kind;
    /* See include/gomp-constants.h for enum gomp_map_kind's values.  */
    unsigned int		   map_kind;
    enum omp_clause_proc_bind_kind proc_bind_kind;
    enum tree_code                 reduction_code;
    enum omp_clause_linear_kind    linear_kind;
    enum tree_code                 if_modifier;
    enum omp_clause_defaultmap_kind defaultmap_kind;
    enum omp_clause_bind_kind      bind_kind;
    /* The dimension a OMP_CLAUSE__GRIDDIM_ clause of a gridified target
       construct describes.  */
    unsigned int		   dimension;
  } GTY ((skip)) subcode;

  /* The gimplification of OMP_CLAUSE_REDUCTION_{INIT,MERGE} for omp-low's
     usage.  */
  gimple_seq gimple_reduction_init;
  gimple_seq gimple_reduction_merge;

  tree GTY ((length ("omp_clause_num_ops[OMP_CLAUSE_CODE ((tree)&%h)]")))
    ops[1];
};

struct GTY(()) tree_block {
  struct tree_base base;
  tree chain;

  unsigned block_num;

  location_t locus;
  location_t end_locus;

  tree vars;
  vec<tree, va_gc> *nonlocalized_vars;

  tree subblocks;
  tree supercontext;
  tree abstract_origin;
  tree fragment_origin;
  tree fragment_chain;

  /* Pointer to the DWARF lexical block.  */
  struct die_struct *die;
};

struct GTY(()) tree_type_common {
  struct tree_common common;
  tree size;
  tree size_unit;
  tree attributes;
  unsigned int uid;

  unsigned int precision : 10;
  unsigned no_force_blk_flag : 1;
  unsigned needs_constructing_flag : 1;
  unsigned transparent_aggr_flag : 1;
  unsigned restrict_flag : 1;
  unsigned contains_placeholder_bits : 2;

  ENUM_BITFIELD(machine_mode) mode : 8;

  /* TYPE_STRING_FLAG for INTEGER_TYPE and ARRAY_TYPE.
     TYPE_CXX_ODR_P for RECORD_TYPE and UNION_TYPE.  */
  unsigned string_flag : 1;
  unsigned lang_flag_0 : 1;
  unsigned lang_flag_1 : 1;
  unsigned lang_flag_2 : 1;
  unsigned lang_flag_3 : 1;
  unsigned lang_flag_4 : 1;
  unsigned lang_flag_5 : 1;
  unsigned lang_flag_6 : 1;
  unsigned lang_flag_7 : 1;

  /* TYPE_ALIGN in log2; this has to be large enough to hold values
     of the maximum of BIGGEST_ALIGNMENT and MAX_OFILE_ALIGNMENT,
     the latter being usually the larger.  For ELF it is 8<<28,
     so we need to store the value 32 (not 31, as we need the zero
     as well), hence six bits.  */
  unsigned align : 6;
  unsigned warn_if_not_align : 6;
  unsigned typeless_storage : 1;
  unsigned empty_flag : 1;
  unsigned spare : 17;

  alias_set_type alias_set;
  tree pointer_to;
  tree reference_to;
  union tree_type_symtab {
    int GTY ((tag ("TYPE_SYMTAB_IS_ADDRESS"))) address;
    struct die_struct * GTY ((tag ("TYPE_SYMTAB_IS_DIE"))) die;
  } GTY ((desc ("debug_hooks->tree_type_symtab_field"))) symtab;
  tree canonical;
  tree next_variant;
  tree main_variant;
  tree context;
  tree name;
};

struct GTY(()) tree_type_with_lang_specific {
  struct tree_type_common common;
  /* Points to a structure whose details depend on the language in use.  */
  struct lang_type *lang_specific;
};

struct GTY(()) tree_type_non_common {
  struct tree_type_with_lang_specific with_lang_specific;
  tree values;
  tree minval;
  tree maxval;
  tree lang_1;
};

struct GTY (()) tree_binfo {
  struct tree_common common;

  tree offset;
  tree vtable;
  tree virtuals;
  tree vptr_field;
  vec<tree, va_gc> *base_accesses;
  tree inheritance;

  tree vtt_subvtt;
  tree vtt_vptr;

  vec<tree, va_gc> base_binfos;
};

struct GTY(()) tree_decl_minimal {
  struct tree_common common;
  location_t locus;
  unsigned int uid;
  tree name;
  tree context;
};

struct GTY(()) tree_decl_common {
  struct tree_decl_minimal common;
  tree size;

  ENUM_BITFIELD(machine_mode) mode : 8;

  unsigned nonlocal_flag : 1;
  unsigned virtual_flag : 1;
  unsigned ignored_flag : 1;
  unsigned abstract_flag : 1;
  unsigned artificial_flag : 1;
  unsigned preserve_flag: 1;
  unsigned debug_expr_is_from : 1;

  unsigned lang_flag_0 : 1;
  unsigned lang_flag_1 : 1;
  unsigned lang_flag_2 : 1;
  unsigned lang_flag_3 : 1;
  unsigned lang_flag_4 : 1;
  unsigned lang_flag_5 : 1;
  unsigned lang_flag_6 : 1;
  unsigned lang_flag_7 : 1;
  unsigned lang_flag_8 : 1;

  /* In VAR_DECL and PARM_DECL, this is DECL_REGISTER
     IN TRANSLATION_UNIT_DECL, this is TRANSLATION_UNIT_WARN_EMPTY_P.  */
  unsigned decl_flag_0 : 1;
  /* In FIELD_DECL, this is DECL_BIT_FIELD
     In VAR_DECL and FUNCTION_DECL, this is DECL_EXTERNAL.
     In TYPE_DECL, this is TYPE_DECL_SUPPRESS_DEBUG.  */
  unsigned decl_flag_1 : 1;
  /* In FIELD_DECL, this is DECL_NONADDRESSABLE_P
     In VAR_DECL, PARM_DECL and RESULT_DECL, this is
     DECL_HAS_VALUE_EXPR_P.  */
  unsigned decl_flag_2 : 1;
  /* In FIELD_DECL, this is DECL_PADDING_P.  */
  unsigned decl_flag_3 : 1;
  /* Logically, these two would go in a theoretical base shared by var and
     parm decl. */
  unsigned gimple_reg_flag : 1;
  /* In VAR_DECL, PARM_DECL and RESULT_DECL, this is DECL_BY_REFERENCE.  */
  unsigned decl_by_reference_flag : 1;
  /* In a VAR_DECL and PARM_DECL, this is DECL_READ_P.  */
  unsigned decl_read_flag : 1;
  /* In a VAR_DECL or RESULT_DECL, this is DECL_NONSHAREABLE.  */
  /* In a PARM_DECL, this is DECL_HIDDEN_STRING_LENGTH.  */
  unsigned decl_nonshareable_flag : 1;

  /* DECL_OFFSET_ALIGN, used only for FIELD_DECLs.  */
  unsigned int off_align : 6;

  /* DECL_ALIGN.  It should have the same size as TYPE_ALIGN.  */
  unsigned int align : 6;

  /* DECL_WARN_IF_NOT_ALIGN.  It should have the same size as
     TYPE_WARN_IF_NOT_ALIGN.  */
  unsigned int warn_if_not_align : 6;

  /* 14 bits unused.  */

  /* UID for points-to sets, stable over copying from inlining.  */
  unsigned int pt_uid;

  tree size_unit;
  tree initial;
  tree attributes;
  tree abstract_origin;

  /* Points to a structure whose details depend on the language in use.  */
  struct lang_decl *lang_specific;
};

struct GTY(()) tree_decl_with_rtl {
  struct tree_decl_common common;
  rtx rtl;
};

struct GTY(()) tree_field_decl {
  struct tree_decl_common common;

  tree offset;
  tree bit_field_type;
  tree qualifier;
  tree bit_offset;
  tree fcontext;
};

struct GTY(()) tree_label_decl {
  struct tree_decl_with_rtl common;
  int label_decl_uid;
  int eh_landing_pad_nr;
};

struct GTY(()) tree_result_decl {
  struct tree_decl_with_rtl common;
};

struct GTY(()) tree_const_decl {
  struct tree_decl_common common;
};

struct GTY(()) tree_parm_decl {
  struct tree_decl_with_rtl common;
  rtx incoming_rtl;
};

struct GTY(()) tree_decl_with_vis {
 struct tree_decl_with_rtl common;
 tree assembler_name;
 struct symtab_node *symtab_node;

 /* Belong to VAR_DECL exclusively.  */
 unsigned defer_output : 1;
 unsigned hard_register : 1;
 unsigned common_flag : 1;
 unsigned in_text_section : 1;
 unsigned in_constant_pool : 1;
 unsigned dllimport_flag : 1;
 /* Don't belong to VAR_DECL exclusively.  */
 unsigned weak_flag : 1;

 unsigned seen_in_bind_expr : 1;
 unsigned comdat_flag : 1;
 /* Used for FUNCTION_DECL, VAR_DECL and in C++ for TYPE_DECL.  */
 ENUM_BITFIELD(symbol_visibility) visibility : 2;
 unsigned visibility_specified : 1;

 /* Belong to FUNCTION_DECL exclusively.  */
 unsigned init_priority_p : 1;
 /* Used by C++ only.  Might become a generic decl flag.  */
 unsigned shadowed_for_var_p : 1;
 /* Belong to FUNCTION_DECL exclusively.  */
 unsigned cxx_constructor : 1;
 /* Belong to FUNCTION_DECL exclusively.  */
 unsigned cxx_destructor : 1;
 /* Belong to FUNCTION_DECL exclusively.  */
 unsigned final : 1;
 /* Belong to FUNCTION_DECL exclusively.  */
 unsigned regdecl_flag : 1;
 /* 14 unused bits. */
};

struct GTY(()) tree_var_decl {
  struct tree_decl_with_vis common;
};

struct GTY(()) tree_decl_non_common {
  struct tree_decl_with_vis common;
  /* Almost all FE's use this.  */
  tree result;
};

/* Classify a special function declaration type.  */

enum function_decl_type
{
  NONE,
  OPERATOR_NEW,
  OPERATOR_DELETE,
  LAMBDA_FUNCTION

  /* 0 values left */
};

/* FUNCTION_DECL inherits from DECL_NON_COMMON because of the use of the
   arguments/result/saved_tree fields by front ends.   It was either inherit
   FUNCTION_DECL from non_common, or inherit non_common from FUNCTION_DECL,
   which seemed a bit strange.  */

struct GTY(()) tree_function_decl {
  struct tree_decl_non_common common;

  struct function *f;

  /* Arguments of the function.  */
  tree arguments;
  /* The personality function. Used for stack unwinding. */
  tree personality;

  /* Function specific options that are used by this function.  */
  tree function_specific_target;	/* target options */
  tree function_specific_optimization;	/* optimization options */

  /* Generic function body.  */
  tree saved_tree;
  /* Index within a virtual table.  */
  tree vindex;

  /* In a FUNCTION_DECL for which DECL_BUILT_IN holds, this is
     DECL_FUNCTION_CODE.  Otherwise unused.  */
  enum built_in_function function_code;

  ENUM_BITFIELD(built_in_class) built_in_class : 2;
  unsigned static_ctor_flag : 1;
  unsigned static_dtor_flag : 1;
  unsigned uninlinable : 1;
  unsigned possibly_inlined : 1;
  unsigned novops_flag : 1;
  unsigned returns_twice_flag : 1;

  unsigned malloc_flag : 1;
  unsigned declared_inline_flag : 1;
  unsigned no_inline_warning_flag : 1;
  unsigned no_instrument_function_entry_exit : 1;
  unsigned no_limit_stack : 1;
  unsigned disregard_inline_limits : 1;
  unsigned pure_flag : 1;
  unsigned looping_const_or_pure_flag : 1;

  /* Align the bitfield to boundary of a byte.  */
  ENUM_BITFIELD(function_decl_type) decl_type: 2;
  unsigned has_debug_args_flag : 1;
  unsigned versioned_function : 1;

  /* 12 bits left for future expansion.  */
};

struct GTY(()) tree_translation_unit_decl {
  struct tree_decl_common common;
  /* Source language of this translation unit.  Used for DWARF output.  */
  const char * GTY((skip(""))) language;
  /* TODO: Non-optimization used to build this translation unit.  */
  /* TODO: Root of a partial DWARF tree for global types and decls.  */
};

struct GTY(()) tree_type_decl {
  struct tree_decl_non_common common;

};

struct GTY ((chain_next ("%h.next"), chain_prev ("%h.prev"))) tree_statement_list_node
 {
  struct tree_statement_list_node *prev;
  struct tree_statement_list_node *next;
  tree stmt;
};

struct GTY(()) tree_statement_list
 {
  struct tree_typed typed;
  struct tree_statement_list_node *head;
  struct tree_statement_list_node *tail;
};


/* Optimization options used by a function.  */

struct GTY(()) tree_optimization_option {
  struct tree_base base;

  /* The optimization options used by the user.  */
  struct cl_optimization *opts;

  /* Target optabs for this set of optimization options.  This is of
     type `struct target_optabs *'.  */
  void *GTY ((atomic)) optabs;

  /* The value of this_target_optabs against which the optabs above were
     generated.  */
  struct target_optabs *GTY ((skip)) base_optabs;
};

/* Forward declaration, defined in target-globals.h.  */

class GTY(()) target_globals;

/* Target options used by a function.  */

struct GTY(()) tree_target_option {
  struct tree_base base;

  /* Target globals for the corresponding target option.  */
  class target_globals *globals;

  /* The optimization options used by the user.  */
  struct cl_target_option *opts;
};

/* Define the overall contents of a tree node.
   It may be any of the structures declared above
   for various types of node.  */
union GTY ((ptr_alias (union lang_tree_node),
	    desc ("tree_node_structure (&%h)"), variable_size)) tree_node {
  struct tree_base GTY ((tag ("TS_BASE"))) base;
  struct tree_typed GTY ((tag ("TS_TYPED"))) typed;
  struct tree_common GTY ((tag ("TS_COMMON"))) common;
  struct tree_int_cst GTY ((tag ("TS_INT_CST"))) int_cst;
  struct tree_poly_int_cst GTY ((tag ("TS_POLY_INT_CST"))) poly_int_cst;
  struct tree_real_cst GTY ((tag ("TS_REAL_CST"))) real_cst;
  struct tree_fixed_cst GTY ((tag ("TS_FIXED_CST"))) fixed_cst;
  struct tree_vector GTY ((tag ("TS_VECTOR"))) vector;
  struct tree_string GTY ((tag ("TS_STRING"))) string;
  struct tree_complex GTY ((tag ("TS_COMPLEX"))) complex;
  struct tree_identifier GTY ((tag ("TS_IDENTIFIER"))) identifier;
  struct tree_decl_minimal GTY((tag ("TS_DECL_MINIMAL"))) decl_minimal;
  struct tree_decl_common GTY ((tag ("TS_DECL_COMMON"))) decl_common;
  struct tree_decl_with_rtl GTY ((tag ("TS_DECL_WRTL"))) decl_with_rtl;
  struct tree_decl_non_common  GTY ((tag ("TS_DECL_NON_COMMON")))
    decl_non_common;
  struct tree_parm_decl  GTY  ((tag ("TS_PARM_DECL"))) parm_decl;
  struct tree_decl_with_vis GTY ((tag ("TS_DECL_WITH_VIS"))) decl_with_vis;
  struct tree_var_decl GTY ((tag ("TS_VAR_DECL"))) var_decl;
  struct tree_field_decl GTY ((tag ("TS_FIELD_DECL"))) field_decl;
  struct tree_label_decl GTY ((tag ("TS_LABEL_DECL"))) label_decl;
  struct tree_result_decl GTY ((tag ("TS_RESULT_DECL"))) result_decl;
  struct tree_const_decl GTY ((tag ("TS_CONST_DECL"))) const_decl;
  struct tree_type_decl GTY ((tag ("TS_TYPE_DECL"))) type_decl;
  struct tree_function_decl GTY ((tag ("TS_FUNCTION_DECL"))) function_decl;
  struct tree_translation_unit_decl GTY ((tag ("TS_TRANSLATION_UNIT_DECL")))
    translation_unit_decl;
  struct tree_type_common GTY ((tag ("TS_TYPE_COMMON"))) type_common;
  struct tree_type_with_lang_specific GTY ((tag ("TS_TYPE_WITH_LANG_SPECIFIC")))
    type_with_lang_specific;
  struct tree_type_non_common GTY ((tag ("TS_TYPE_NON_COMMON")))
    type_non_common;
  struct tree_list GTY ((tag ("TS_LIST"))) list;
  struct tree_vec GTY ((tag ("TS_VEC"))) vec;
  struct tree_exp GTY ((tag ("TS_EXP"))) exp;
  struct tree_ssa_name GTY ((tag ("TS_SSA_NAME"))) ssa_name;
  struct tree_block GTY ((tag ("TS_BLOCK"))) block;
  struct tree_binfo GTY ((tag ("TS_BINFO"))) binfo;
  struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list;
  struct tree_constructor GTY ((tag ("TS_CONSTRUCTOR"))) constructor;
  struct tree_omp_clause GTY ((tag ("TS_OMP_CLAUSE"))) omp_clause;
  struct tree_optimization_option GTY ((tag ("TS_OPTIMIZATION"))) optimization;
  struct tree_target_option GTY ((tag ("TS_TARGET_OPTION"))) target_option;
};

/* Structure describing an attribute and a function to handle it.  */
struct attribute_spec {
  /* The name of the attribute (without any leading or trailing __),
     or NULL to mark the end of a table of attributes.  */
  const char *name;
  /* The minimum length of the list of arguments of the attribute.  */
  int min_length;
  /* The maximum length of the list of arguments of the attribute
     (-1 for no maximum).  */
  int max_length;
  /* Whether this attribute requires a DECL.  If it does, it will be passed
     from types of DECLs, function return types and array element types to
     the DECLs, function types and array types respectively; but when
     applied to a type in any other circumstances, it will be ignored with
     a warning.  (If greater control is desired for a given attribute,
     this should be false, and the flags argument to the handler may be
     used to gain greater control in that case.)  */
  bool decl_required;
  /* Whether this attribute requires a type.  If it does, it will be passed
     from a DECL to the type of that DECL.  */
  bool type_required;
  /* Whether this attribute requires a function (or method) type.  If it does,
     it will be passed from a function pointer type to the target type,
     and from a function return type (which is not itself a function
     pointer type) to the function type.  */
  bool function_type_required;
  /* Specifies if attribute affects type's identity.  */
  bool affects_type_identity;
  /* Function to handle this attribute.  NODE points to the node to which
     the attribute is to be applied.  If a DECL, it should be modified in
     place; if a TYPE, a copy should be created.  NAME is the canonicalized
     name of the attribute i.e. without any leading or trailing underscores.
     ARGS is the TREE_LIST of the arguments (which may be NULL).  FLAGS gives
     further information about the context of the attribute.  Afterwards, the
     attributes will be added to the DECL_ATTRIBUTES or TYPE_ATTRIBUTES, as
     appropriate, unless *NO_ADD_ATTRS is set to true (which should be done on
     error, as well as in any other cases when the attributes should not be
     added to the DECL or TYPE).  Depending on FLAGS, any attributes to be
     applied to another type or DECL later may be returned;
     otherwise the return value should be NULL_TREE.  This pointer may be
     NULL if no special handling is required beyond the checks implied
     by the rest of this structure.  */
  tree (*handler) (tree *node, tree name, tree args,
		   int flags, bool *no_add_attrs);

  /* Specifies the name of an attribute that's mutually exclusive with
     this one, and whether the relationship applies to the function,
     variable, or type form of the attribute.  */
  struct exclusions {
    const char *name;
    bool function;
    bool variable;
    bool type;
  };

  /* An array of attribute exclusions describing names of other attributes
     that this attribute is mutually exclusive with.  */
  const exclusions *exclude;
};

/* These functions allow a front-end to perform a manual layout of a
   RECORD_TYPE.  (For instance, if the placement of subsequent fields
   depends on the placement of fields so far.)  Begin by calling
   start_record_layout.  Then, call place_field for each of the
   fields.  Then, call finish_record_layout.  See layout_type for the
   default way in which these functions are used.  */
typedef struct record_layout_info_s {
  /* The RECORD_TYPE that we are laying out.  */
  tree t;
  /* The offset into the record so far, in bytes, not including bits in
     BITPOS.  */
  tree offset;
  /* The last known alignment of SIZE.  */
  unsigned int offset_align;
  /* The bit position within the last OFFSET_ALIGN bits, in bits.  */
  tree bitpos;
  /* The alignment of the record so far, in bits.  */
  unsigned int record_align;
  /* The alignment of the record so far, ignoring #pragma pack and
     __attribute__ ((packed)), in bits.  */
  unsigned int unpacked_align;
  /* The previous field laid out.  */
  tree prev_field;
  /* The static variables (i.e., class variables, as opposed to
     instance variables) encountered in T.  */
  vec<tree, va_gc> *pending_statics;
  /* Bits remaining in the current alignment group */
  int remaining_in_alignment;
  /* True if we've seen a packed field that didn't have normal
     alignment anyway.  */
  int packed_maybe_necessary;
} *record_layout_info;

/* Iterator for going through the function arguments.  */
struct function_args_iterator {
  tree next;			/* TREE_LIST pointing to the next argument */
};

/* Structures to map from a tree to another tree.  */
struct GTY(()) tree_map_base {
  tree from;
};

/* Map from a tree to another tree.  */

struct GTY((for_user)) tree_map {
  struct tree_map_base base;
  unsigned int hash;
  tree to;
};

/* Map from a decl tree to another tree.  */
struct GTY((for_user)) tree_decl_map {
  struct tree_map_base base;
  tree to;
};

/* Map from a tree to an int.  */
struct GTY((for_user)) tree_int_map {
  struct tree_map_base base;
  unsigned int to;
};

/* Map from a decl tree to a tree vector.  */
struct GTY((for_user)) tree_vec_map {
  struct tree_map_base base;
  vec<tree, va_gc> *to;
};

/* Abstract iterators for CALL_EXPRs.  These static inline definitions
   have to go towards the end of tree.h so that union tree_node is fully
   defined by this point.  */

/* Structure containing iterator state.  */
struct call_expr_arg_iterator {
  tree t;	/* the call_expr */
  int n;	/* argument count */
  int i;	/* next argument index */
};

struct const_call_expr_arg_iterator {
  const_tree t;	/* the call_expr */
  int n;	/* argument count */
  int i;	/* next argument index */
};

/* The builtin_info structure holds the FUNCTION_DECL of the standard builtin
   function, and flags.  */
struct GTY(()) builtin_info_type {
  tree decl;
  /* Whether the user can use <xxx> instead of explicitly using calls
     to __builtin_<xxx>.  */
  unsigned implicit_p : 1;
  /* Whether the user has provided a declaration of <xxx>.  */
  unsigned declared_p : 1;
};

/* Information about a _FloatN or _FloatNx type that may be
   supported.  */
struct floatn_type_info {
  /* The number N in the type name.  */
  int n;
  /* Whether it is an extended type _FloatNx (true) or an interchange
     type (false).  */
  bool extended;
};


/*---------------------------------------------------------------------------
                                Global variables
---------------------------------------------------------------------------*/
/* Matrix describing the structures contained in a given tree code.  */
extern bool tree_contains_struct[MAX_TREE_CODES][64];

/* Class of tree given its code.  */
extern const enum tree_code_class tree_code_type[];

/* Each tree code class has an associated string representation.
   These must correspond to the tree_code_class entries.  */
extern const char *const tree_code_class_strings[];

/* Number of argument-words in each kind of tree-node.  */
extern const unsigned char tree_code_length[];

/* Vector of all alias pairs for global symbols.  */
extern GTY(()) vec<alias_pair, va_gc> *alias_pairs;

/* Names of all the built_in classes.  */
extern const char *const built_in_class_names[BUILT_IN_LAST];

/* Names of all the built_in functions.  */
extern const char * built_in_names[(int) END_BUILTINS];

/* Number of operands and names for each OMP_CLAUSE node.  */
extern unsigned const char omp_clause_num_ops[];
extern const char * const omp_clause_code_name[];

/* A vector of all translation-units.  */
extern GTY (()) vec<tree, va_gc> *all_translation_units;

/* Vector of standard trees used by the C compiler.  */
extern GTY(()) tree global_trees[TI_MAX];

/* The standard C integer types.  Use integer_type_kind to index into
   this array.  */
extern GTY(()) tree integer_types[itk_none];

/* Types used to represent sizes.  */
extern GTY(()) tree sizetype_tab[(int) stk_type_kind_last];

/* Arrays for keeping track of tree node statistics.  */
extern uint64_t tree_node_counts[];
extern uint64_t tree_node_sizes[];

/* True if we are in gimple form and the actions of the folders need to
   be restricted.  False if we are not in gimple form and folding is not
   restricted to creating gimple expressions.  */
extern bool in_gimple_form;

/* Functional interface to the builtin functions.  */
extern GTY(()) builtin_info_type builtin_info[(int)END_BUILTINS];

/* If nonzero, an upper limit on alignment of structure fields, in bits,  */
extern unsigned int maximum_field_alignment;

/* Points to the FUNCTION_DECL of the function whose body we are reading.  */
extern GTY(()) tree current_function_decl;

/* Nonzero means a FUNC_BEGIN label was emitted.  */
extern GTY(()) const char * current_function_func_begin_label;

/* Information about the _FloatN and _FloatNx types.  */
extern const floatn_type_info floatn_nx_types[NUM_FLOATN_NX_TYPES];

#endif  // GCC_TREE_CORE_H