OSDN Git Service

* gimple.c (walk_gimple_op) <GIMPLE_ASSIGN>: Do not request a pure
[pf3gnuchains/gcc-fork.git] / gcc / ada / gcc-interface / ada-tree.h
1 /****************************************************************************
2  *                                                                          *
3  *                         GNAT COMPILER COMPONENTS                         *
4  *                                                                          *
5  *                             A D A - T R E E                              *
6  *                                                                          *
7  *                              C Header File                               *
8  *                                                                          *
9  *          Copyright (C) 1992-2010, Free Software Foundation, Inc.         *
10  *                                                                          *
11  * GNAT is free software;  you can  redistribute it  and/or modify it under *
12  * terms of the  GNU General Public License as published  by the Free Soft- *
13  * ware  Foundation;  either version 3,  or (at your option) any later ver- *
14  * sion.  GNAT is distributed in the hope that it will be useful, but WITH- *
15  * OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY *
16  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License *
17  * for  more details.  You should have received a copy of the GNU General   *
18  * Public License along with GCC; see the file COPYING3.  If not see        *
19  * <http://www.gnu.org/licenses/>.                                          *
20  *                                                                          *
21  * GNAT was originally developed  by the GNAT team at  New York University. *
22  * Extensive contributions were provided by Ada Core Technologies Inc.      *
23  *                                                                          *
24  ****************************************************************************/
25
26 /* The resulting tree type.  */
27 union GTY((desc ("0"),
28            chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)")))
29   lang_tree_node
30 {
31   union tree_node GTY((tag ("0"),
32                        desc ("tree_node_structure (&%h)"))) generic;
33 };
34
35 /* Ada uses the lang_decl and lang_type fields to hold a tree.  */
36 struct GTY(()) lang_type { tree t; };
37 struct GTY(()) lang_decl { tree t; };
38
39 /* Macros to get and set the tree in TYPE_LANG_SPECIFIC.  */
40 #define GET_TYPE_LANG_SPECIFIC(NODE) \
41   (TYPE_LANG_SPECIFIC (NODE) ? TYPE_LANG_SPECIFIC (NODE)->t : NULL_TREE)
42
43 #define SET_TYPE_LANG_SPECIFIC(NODE, X)                     \
44 do {                                                        \
45   tree tmp = (X);                                           \
46   if (!TYPE_LANG_SPECIFIC (NODE))                           \
47     TYPE_LANG_SPECIFIC (NODE) = GGC_NEW (struct lang_type); \
48   TYPE_LANG_SPECIFIC (NODE)->t = tmp;                       \
49 } while (0)
50
51 /* Macros to get and set the tree in DECL_LANG_SPECIFIC.  */
52 #define GET_DECL_LANG_SPECIFIC(NODE) \
53   (DECL_LANG_SPECIFIC (NODE) ? DECL_LANG_SPECIFIC (NODE)->t : NULL_TREE)
54
55 #define SET_DECL_LANG_SPECIFIC(NODE, X)                     \
56 do {                                                        \
57   tree tmp = (X);                                           \
58   if (!DECL_LANG_SPECIFIC (NODE))                           \
59     DECL_LANG_SPECIFIC (NODE) = GGC_NEW (struct lang_decl); \
60   DECL_LANG_SPECIFIC (NODE)->t = tmp;                       \
61 } while (0)
62
63
64 /* Flags added to type nodes.  */
65
66 /* For RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE, nonzero if this is a
67    record being used as a fat pointer (only true for RECORD_TYPE).  */
68 #define TYPE_FAT_POINTER_P(NODE) \
69   TYPE_LANG_FLAG_0 (RECORD_OR_UNION_CHECK (NODE))
70
71 #define TYPE_IS_FAT_POINTER_P(NODE) \
72   (TREE_CODE (NODE) == RECORD_TYPE && TYPE_FAT_POINTER_P (NODE))
73
74 /* For integral types and array types, nonzero if this is a packed array type
75    used for bit-packed types.  Such types should not be extended to a larger
76    size or validated against a specified size.  */
77 #define TYPE_PACKED_ARRAY_TYPE_P(NODE) TYPE_LANG_FLAG_0 (NODE)
78
79 #define TYPE_IS_PACKED_ARRAY_TYPE_P(NODE) \
80   ((TREE_CODE (NODE) == INTEGER_TYPE || TREE_CODE (NODE) == ARRAY_TYPE) \
81    && TYPE_PACKED_ARRAY_TYPE_P (NODE))
82
83 /* For INTEGER_TYPE, nonzero if this is a modular type with a modulus that
84    is not equal to two to the power of its mode's size.  */
85 #define TYPE_MODULAR_P(NODE) TYPE_LANG_FLAG_1 (INTEGER_TYPE_CHECK (NODE))
86
87 /* For ARRAY_TYPE, nonzero if this type corresponds to a dimension of
88    an Ada array other than the first.  */
89 #define TYPE_MULTI_ARRAY_P(NODE) TYPE_LANG_FLAG_1 (ARRAY_TYPE_CHECK (NODE))
90
91 /* For FUNCTION_TYPE, nonzero if this denotes a function returning an
92    unconstrained array or record.  */
93 #define TYPE_RETURN_UNCONSTRAINED_P(NODE) \
94   TYPE_LANG_FLAG_1 (FUNCTION_TYPE_CHECK (NODE))
95
96 /* For RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE, nonzero if this denotes
97    a justified modular type (will only be true for RECORD_TYPE).  */
98 #define TYPE_JUSTIFIED_MODULAR_P(NODE) \
99   TYPE_LANG_FLAG_1 (RECORD_OR_UNION_CHECK (NODE))
100
101 /* Nonzero in an arithmetic subtype if this is a subtype not known to the
102    front-end.  */
103 #define TYPE_EXTRA_SUBTYPE_P(NODE) TYPE_LANG_FLAG_2 (NODE)
104
105 /* For RECORD_TYPE, UNION_TYPE, and QUAL_UNION_TYPE, nonzero if this is the
106    type for an object whose type includes its template in addition to
107    its value (only true for RECORD_TYPE).  */
108 #define TYPE_CONTAINS_TEMPLATE_P(NODE) \
109   TYPE_LANG_FLAG_3 (RECORD_OR_UNION_CHECK (NODE))
110
111 /* For INTEGER_TYPE, nonzero if this really represents a VAX
112    floating-point type.  */
113 #define TYPE_VAX_FLOATING_POINT_P(NODE) \
114   TYPE_LANG_FLAG_3 (INTEGER_TYPE_CHECK (NODE))
115
116 /* True if NODE is a thin pointer.  */
117 #define TYPE_IS_THIN_POINTER_P(NODE)                    \
118   (POINTER_TYPE_P (NODE)                                \
119    && TREE_CODE (TREE_TYPE (NODE)) == RECORD_TYPE       \
120    && TYPE_CONTAINS_TEMPLATE_P (TREE_TYPE (NODE)))
121
122 /* True if TYPE is either a fat or thin pointer to an unconstrained
123    array.  */
124 #define TYPE_IS_FAT_OR_THIN_POINTER_P(NODE) \
125   (TYPE_IS_FAT_POINTER_P (NODE) || TYPE_IS_THIN_POINTER_P (NODE))
126
127 /* For INTEGER_TYPEs, nonzero if the type has a biased representation.  */
128 #define TYPE_BIASED_REPRESENTATION_P(NODE) \
129   TYPE_LANG_FLAG_4 (INTEGER_TYPE_CHECK (NODE))
130
131 /* For ARRAY_TYPEs, nonzero if the array type has Convention_Fortran.  */
132 #define TYPE_CONVENTION_FORTRAN_P(NODE) \
133   TYPE_LANG_FLAG_4 (ARRAY_TYPE_CHECK (NODE))
134
135 /* For FUNCTION_TYPEs, nonzero if the function returns by direct reference,
136    i.e. the callee returns a pointer to a memory location it has allocated
137    and the caller only needs to dereference the pointer.  */
138 #define TYPE_RETURN_BY_DIRECT_REF_P(NODE) \
139   TYPE_LANG_FLAG_4 (FUNCTION_TYPE_CHECK (NODE))
140
141 /* For VOID_TYPE, ENUMERAL_TYPE, UNION_TYPE, and RECORD_TYPE, nonzero if this
142    is a dummy type, made to correspond to a private or incomplete type.  */
143 #define TYPE_DUMMY_P(NODE) TYPE_LANG_FLAG_4 (NODE)
144
145 #define TYPE_IS_DUMMY_P(NODE) \
146   ((TREE_CODE (NODE) == VOID_TYPE || TREE_CODE (NODE) == RECORD_TYPE    \
147     || TREE_CODE (NODE) == UNION_TYPE || TREE_CODE (NODE) == ENUMERAL_TYPE) \
148    && TYPE_DUMMY_P (NODE))
149
150 /* For an INTEGER_TYPE, nonzero if TYPE_ACTUAL_BOUNDS is present.  */
151 #define TYPE_HAS_ACTUAL_BOUNDS_P(NODE) \
152   TYPE_LANG_FLAG_5 (INTEGER_TYPE_CHECK (NODE))
153
154 /* For a RECORD_TYPE, nonzero if this was made just to supply needed
155    padding or alignment.  */
156 #define TYPE_PADDING_P(NODE) TYPE_LANG_FLAG_5 (RECORD_TYPE_CHECK (NODE))
157
158 #define TYPE_IS_PADDING_P(NODE) \
159   (TREE_CODE (NODE) == RECORD_TYPE && TYPE_PADDING_P (NODE))
160
161 /* True if TYPE can alias any other types.  */
162 #define TYPE_UNIVERSAL_ALIASING_P(NODE) TYPE_LANG_FLAG_6 (NODE)
163
164 /* In an UNCONSTRAINED_ARRAY_TYPE, this is the record containing both the
165    template and the object.
166
167    ??? We also put this on an ENUMERAL_TYPE that is dummy.  Technically,
168    this is a conflict on the minval field, but there doesn't seem to be
169    simple fix, so we'll live with this kludge for now.  */
170 #define TYPE_OBJECT_RECORD_TYPE(NODE) \
171   (TREE_CHECK2 ((NODE), UNCONSTRAINED_ARRAY_TYPE, ENUMERAL_TYPE)->type.minval)
172
173 /* For numerical types, this is the GCC lower bound of the type.  The GCC
174    type system is based on the invariant that an object X of a given type
175    cannot hold at run time a value smaller than its lower bound; otherwise
176    the behavior is undefined.  The optimizer takes advantage of this and
177    considers that the assertion X >= LB is always true.  */
178 #define TYPE_GCC_MIN_VALUE(NODE) (NUMERICAL_TYPE_CHECK (NODE)->type.minval)
179
180 /* For numerical types, this is the GCC upper bound of the type.  The GCC
181    type system is based on the invariant that an object X of a given type
182    cannot hold at run time a value larger than its upper bound; otherwise
183    the behavior is undefined.  The optimizer takes advantage of this and
184    considers that the assertion X <= UB is always true.  */
185 #define TYPE_GCC_MAX_VALUE(NODE) (NUMERICAL_TYPE_CHECK (NODE)->type.maxval)
186
187 /* For a FUNCTION_TYPE, if the subprogram has parameters passed by copy in/
188    copy out, this is the list of nodes used to specify the return values of
189    the out (or in out) parameters that are passed by copy in/copy out.  For
190    a full description of the copy in/copy out parameter passing mechanism
191    refer to the routine gnat_to_gnu_entity.  */
192 #define TYPE_CI_CO_LIST(NODE) TYPE_LANG_SLOT_1 (FUNCTION_TYPE_CHECK (NODE))
193
194 /* For a VECTOR_TYPE, this is the representative array type.  */
195 #define TYPE_REPRESENTATIVE_ARRAY(NODE) \
196   TYPE_LANG_SLOT_1 (VECTOR_TYPE_CHECK (NODE))
197
198 /* For numerical types, this holds various RM-defined values.  */
199 #define TYPE_RM_VALUES(NODE) TYPE_LANG_SLOT_1 (NUMERICAL_TYPE_CHECK (NODE))
200
201 /* Macros to get and set the individual values in TYPE_RM_VALUES.  */
202 #define TYPE_RM_VALUE(NODE, N)                              \
203   (TYPE_RM_VALUES (NODE)                                    \
204    ? TREE_VEC_ELT (TYPE_RM_VALUES (NODE), (N)) : NULL_TREE)
205
206 #define SET_TYPE_RM_VALUE(NODE, N, X)              \
207 do {                                               \
208   tree tmp = (X);                                  \
209   if (!TYPE_RM_VALUES (NODE))                      \
210     TYPE_RM_VALUES (NODE) = make_tree_vec (3);     \
211   /* ??? The field is not visited by the generic   \
212      code so we need to mark it manually.  */      \
213   MARK_VISITED (tmp);                              \
214   TREE_VEC_ELT (TYPE_RM_VALUES (NODE), (N)) = tmp; \
215 } while (0)
216
217 /* For numerical types, this is the RM size of the type, aka its precision.
218    There is a discrepancy between what is called precision here (and more
219    generally throughout gigi) and what is called precision in the GCC type
220    system: in the former case it's TYPE_RM_SIZE whereas it's TYPE_PRECISION
221    in the latter case.  They are not identical because of the need to support
222    invalid values.
223
224    These values can be outside the range of values allowed by the RM size
225    but they must nevertheless be valid in the GCC type system, otherwise
226    the optimizer can pretend that they simply don't exist.  Therefore they
227    must be within the range of values allowed by the precision in the GCC
228    sense, hence TYPE_PRECISION be set to the Esize, not the RM size.  */
229 #define TYPE_RM_SIZE(NODE) TYPE_RM_VALUE ((NODE), 0)
230 #define SET_TYPE_RM_SIZE(NODE, X) SET_TYPE_RM_VALUE ((NODE), 0, (X))
231
232 /* For numerical types, this is the RM lower bound of the type.  There is
233    again a discrepancy between this lower bound and the GCC lower bound,
234    again because of the need to support invalid values.
235
236    These values can be outside the range of values allowed by the RM lower
237    bound but they must nevertheless be valid in the GCC type system, otherwise
238    the optimizer can pretend that they simply don't exist.  Therefore they
239    must be within the range of values allowed by the lower bound in the GCC
240    sense, hence the GCC lower bound be set to that of the base type.  */
241 #define TYPE_RM_MIN_VALUE(NODE) TYPE_RM_VALUE ((NODE), 1)
242 #define SET_TYPE_RM_MIN_VALUE(NODE, X) SET_TYPE_RM_VALUE ((NODE), 1, (X))
243
244 /* For numerical types, this is the RM upper bound of the type.  There is
245    again a discrepancy between this upper bound and the GCC upper bound,
246    again because of the need to support invalid values.
247
248    These values can be outside the range of values allowed by the RM upper
249    bound but they must nevertheless be valid in the GCC type system, otherwise
250    the optimizer can pretend that they simply don't exist.  Therefore they
251    must be within the range of values allowed by the upper bound in the GCC
252    sense, hence the GCC upper bound be set to that of the base type.  */
253 #define TYPE_RM_MAX_VALUE(NODE) TYPE_RM_VALUE ((NODE), 2)
254 #define SET_TYPE_RM_MAX_VALUE(NODE, X) SET_TYPE_RM_VALUE ((NODE), 2, (X))
255
256 /* For numerical types, this is the lower bound of the type, i.e. the RM lower
257    bound for language-defined types and the GCC lower bound for others.  */
258 #undef TYPE_MIN_VALUE
259 #define TYPE_MIN_VALUE(NODE) \
260   (TYPE_RM_MIN_VALUE (NODE) \
261    ? TYPE_RM_MIN_VALUE (NODE) : TYPE_GCC_MIN_VALUE (NODE))
262
263 /* For numerical types, this is the upper bound of the type, i.e. the RM upper
264    bound for language-defined types and the GCC upper bound for others.  */
265 #undef TYPE_MAX_VALUE
266 #define TYPE_MAX_VALUE(NODE) \
267   (TYPE_RM_MAX_VALUE (NODE) \
268    ? TYPE_RM_MAX_VALUE (NODE) : TYPE_GCC_MAX_VALUE (NODE))
269
270 /* For an INTEGER_TYPE with TYPE_MODULAR_P, this is the value of the
271    modulus. */
272 #define TYPE_MODULUS(NODE) GET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))
273 #define SET_TYPE_MODULUS(NODE, X) \
274   SET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE), X)
275
276 /* For an INTEGER_TYPE with TYPE_VAX_FLOATING_POINT_P, this is the
277    Digits_Value.  */
278 #define TYPE_DIGITS_VALUE(NODE) \
279   GET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))
280 #define SET_TYPE_DIGITS_VALUE(NODE, X) \
281   SET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE), X)
282
283 /* For an INTEGER_TYPE that is the TYPE_DOMAIN of some ARRAY_TYPE, this is
284    the type corresponding to the Ada index type.  */
285 #define TYPE_INDEX_TYPE(NODE) \
286   GET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))
287 #define SET_TYPE_INDEX_TYPE(NODE, X) \
288   SET_TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE), X)
289
290 /* For an INTEGER_TYPE with TYPE_HAS_ACTUAL_BOUNDS_P or an ARRAY_TYPE, this is
291    the index type that should be used when the actual bounds are required for
292    a template.  This is used in the case of packed arrays.  */
293 #define TYPE_ACTUAL_BOUNDS(NODE) \
294   GET_TYPE_LANG_SPECIFIC (TREE_CHECK2 (NODE, INTEGER_TYPE, ARRAY_TYPE))
295 #define SET_TYPE_ACTUAL_BOUNDS(NODE, X) \
296   SET_TYPE_LANG_SPECIFIC (TREE_CHECK2 (NODE, INTEGER_TYPE, ARRAY_TYPE), X)
297
298 /* For a RECORD_TYPE that is a fat pointer, this is the type for the
299    unconstrained object.  Likewise for a RECORD_TYPE that is pointed
300    to by a thin pointer.  */
301 #define TYPE_UNCONSTRAINED_ARRAY(NODE) \
302   GET_TYPE_LANG_SPECIFIC (RECORD_TYPE_CHECK (NODE))
303 #define SET_TYPE_UNCONSTRAINED_ARRAY(NODE, X) \
304   SET_TYPE_LANG_SPECIFIC (RECORD_TYPE_CHECK (NODE), X)
305
306 /* For other RECORD_TYPEs and all UNION_TYPEs and QUAL_UNION_TYPEs, this is
307    the Ada size of the object.  This differs from the GCC size in that it
308    does not include any rounding up to the alignment of the type.  */
309 #define TYPE_ADA_SIZE(NODE) \
310   GET_TYPE_LANG_SPECIFIC (RECORD_OR_UNION_CHECK (NODE))
311 #define SET_TYPE_ADA_SIZE(NODE, X) \
312   SET_TYPE_LANG_SPECIFIC (RECORD_OR_UNION_CHECK (NODE), X)
313
314
315 /* Flags added to decl nodes.  */
316
317 /* Nonzero in a FUNCTION_DECL that represents a stubbed function
318    discriminant.  */
319 #define DECL_STUBBED_P(NODE) DECL_LANG_FLAG_0 (FUNCTION_DECL_CHECK (NODE))
320
321 /* Nonzero in a VAR_DECL if it is guaranteed to be constant after having
322    been elaborated and TREE_READONLY is not set on it.  */
323 #define DECL_READONLY_ONCE_ELAB(NODE) DECL_LANG_FLAG_0 (VAR_DECL_CHECK (NODE))
324
325 /* Nonzero in a CONST_DECL if its value is (essentially) the address of a
326    constant CONSTRUCTOR.  */
327 #define DECL_CONST_ADDRESS_P(NODE) DECL_LANG_FLAG_0 (CONST_DECL_CHECK (NODE))
328
329 /* Nonzero if this decl is always used by reference; i.e., an INDIRECT_REF
330    is needed to access the object.  */
331 #define DECL_BY_REF_P(NODE) DECL_LANG_FLAG_1 (NODE)
332
333 /* Nonzero in a FIELD_DECL that is a dummy built for some internal reason.  */
334 #define DECL_INTERNAL_P(NODE) DECL_LANG_FLAG_3 (FIELD_DECL_CHECK (NODE))
335
336 /* Nonzero if this decl is a PARM_DECL for an Ada array being passed to a
337    foreign convention subprogram.  */
338 #define DECL_BY_COMPONENT_PTR_P(NODE) DECL_LANG_FLAG_3 (PARM_DECL_CHECK (NODE))
339
340 /* Nonzero in a FUNCTION_DECL that corresponds to an elaboration procedure.  */
341 #define DECL_ELABORATION_PROC_P(NODE) \
342   DECL_LANG_FLAG_3 (FUNCTION_DECL_CHECK (NODE))
343
344 /* Nonzero if this is a decl for a pointer that points to something which
345    is readonly.  Used mostly for fat pointers.  */
346 #define DECL_POINTS_TO_READONLY_P(NODE) DECL_LANG_FLAG_4 (NODE)
347
348 /* Nonzero in a PARM_DECL if we are to pass by descriptor.  */
349 #define DECL_BY_DESCRIPTOR_P(NODE) DECL_LANG_FLAG_5 (PARM_DECL_CHECK (NODE))
350
351 /* Nonzero in a VAR_DECL if it is a pointer renaming a global object.  */
352 #define DECL_RENAMING_GLOBAL_P(NODE) DECL_LANG_FLAG_5 (VAR_DECL_CHECK (NODE))
353
354 /* In a FIELD_DECL corresponding to a discriminant, contains the
355    discriminant number.  */
356 #define DECL_DISCRIMINANT_NUMBER(NODE) DECL_INITIAL (FIELD_DECL_CHECK (NODE))
357
358 /* In a CONST_DECL, points to a VAR_DECL that is allocatable to
359    memory.  Used when a scalar constant is aliased or has its
360    address taken.  */
361 #define DECL_CONST_CORRESPONDING_VAR(NODE) \
362   GET_DECL_LANG_SPECIFIC (CONST_DECL_CHECK (NODE))
363 #define SET_DECL_CONST_CORRESPONDING_VAR(NODE, X) \
364   SET_DECL_LANG_SPECIFIC (CONST_DECL_CHECK (NODE), X)
365
366 /* In a FIELD_DECL, points to the FIELD_DECL that was the ultimate
367    source of the decl.  */
368 #define DECL_ORIGINAL_FIELD(NODE) \
369   GET_DECL_LANG_SPECIFIC (FIELD_DECL_CHECK (NODE))
370 #define SET_DECL_ORIGINAL_FIELD(NODE, X) \
371   SET_DECL_LANG_SPECIFIC (FIELD_DECL_CHECK (NODE), X)
372
373 /* Set DECL_ORIGINAL_FIELD of FIELD1 to (that of) FIELD2.  */
374 #define SET_DECL_ORIGINAL_FIELD_TO_FIELD(FIELD1, FIELD2)        \
375   SET_DECL_ORIGINAL_FIELD ((FIELD1),                            \
376                            DECL_ORIGINAL_FIELD (FIELD2)         \
377                            ? DECL_ORIGINAL_FIELD (FIELD2) : (FIELD2))
378
379 /* Return true if FIELD1 and FIELD2 represent the same field.  */
380 #define SAME_FIELD_P(FIELD1, FIELD2)                                    \
381   ((FIELD1) == (FIELD2)                                                 \
382    || DECL_ORIGINAL_FIELD (FIELD1) == (FIELD2)                          \
383    || (FIELD1) == DECL_ORIGINAL_FIELD (FIELD2)                          \
384    || (DECL_ORIGINAL_FIELD (FIELD1)                                     \
385        && (DECL_ORIGINAL_FIELD (FIELD1) == DECL_ORIGINAL_FIELD (FIELD2))))
386
387 /* In a VAR_DECL, points to the object being renamed if the VAR_DECL is a
388    renaming pointer, otherwise 0.  Note that this object is guaranteed to
389    be protected against multiple evaluations.  */
390 #define DECL_RENAMED_OBJECT(NODE) \
391   GET_DECL_LANG_SPECIFIC (VAR_DECL_CHECK (NODE))
392 #define SET_DECL_RENAMED_OBJECT(NODE, X) \
393   SET_DECL_LANG_SPECIFIC (VAR_DECL_CHECK (NODE), X)
394
395 /* In a TYPE_DECL, points to the parallel type if any, otherwise 0.  */
396 #define DECL_PARALLEL_TYPE(NODE) \
397   GET_DECL_LANG_SPECIFIC (TYPE_DECL_CHECK (NODE))
398 #define SET_DECL_PARALLEL_TYPE(NODE, X) \
399   SET_DECL_LANG_SPECIFIC (TYPE_DECL_CHECK (NODE), X)
400
401 /* In a FUNCTION_DECL, points to the stub associated with the function
402    if any, otherwise 0.  */
403 #define DECL_FUNCTION_STUB(NODE) \
404   GET_DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (NODE))
405 #define SET_DECL_FUNCTION_STUB(NODE, X) \
406   SET_DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (NODE), X)
407
408 /* In a PARM_DECL, points to the alternate TREE_TYPE.  */
409 #define DECL_PARM_ALT_TYPE(NODE) \
410   GET_DECL_LANG_SPECIFIC (PARM_DECL_CHECK (NODE))
411 #define SET_DECL_PARM_ALT_TYPE(NODE, X) \
412   SET_DECL_LANG_SPECIFIC (PARM_DECL_CHECK (NODE), X)
413
414
415 /* Fields and macros for statements.  */
416 #define IS_ADA_STMT(NODE) \
417   (STATEMENT_CLASS_P (NODE) && TREE_CODE (NODE) >= STMT_STMT)
418
419 #define STMT_STMT_STMT(NODE)     TREE_OPERAND_CHECK_CODE (NODE, STMT_STMT, 0)
420 #define LOOP_STMT_TOP_COND(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 0)
421 #define LOOP_STMT_BOT_COND(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 1)
422 #define LOOP_STMT_UPDATE(NODE)   TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 2)
423 #define LOOP_STMT_BODY(NODE)     TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 3)
424 #define LOOP_STMT_LABEL(NODE)    TREE_OPERAND_CHECK_CODE (NODE, LOOP_STMT, 4)
425 #define EXIT_STMT_COND(NODE)     TREE_OPERAND_CHECK_CODE (NODE, EXIT_STMT, 0)
426 #define EXIT_STMT_LABEL(NODE)    TREE_OPERAND_CHECK_CODE (NODE, EXIT_STMT, 1)