aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index a5c6845..48acbfb 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -2898,7 +2898,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
gnat_field = Next_Stored_Discriminant (gnat_field))
if (Present (Corresponding_Discriminant (gnat_field)))
{
- gnu_field = gnat_to_gnu_field_decl (gnat_field);
+ tree gnu_field = gnat_to_gnu_field_decl (gnat_field);
tree gnu_ref
= build3 (COMPONENT_REF, TREE_TYPE (gnu_field),
gnu_get_parent, gnu_field, NULL_TREE);
@@ -7840,7 +7840,7 @@ compatible_signatures_p (tree ftype1, tree ftype2)
tree
substitute_in_type (tree t, tree f, tree r)
{
- tree new_tree;
+ tree nt;
gcc_assert (CONTAINS_PLACEHOLDER_P (r));
@@ -7861,15 +7861,15 @@ substitute_in_type (tree t, tree f, tree r)
if (low == TYPE_GCC_MIN_VALUE (t) && high == TYPE_GCC_MAX_VALUE (t))
return t;
- new_tree = copy_type (t);
- TYPE_GCC_MIN_VALUE (new_tree) = low;
- TYPE_GCC_MAX_VALUE (new_tree) = high;
+ nt = copy_type (t);
+ TYPE_GCC_MIN_VALUE (nt) = low;
+ TYPE_GCC_MAX_VALUE (nt) = high;
if (TREE_CODE (t) == INTEGER_TYPE && TYPE_INDEX_TYPE (t))
SET_TYPE_INDEX_TYPE
- (new_tree, substitute_in_type (TYPE_INDEX_TYPE (t), f, r));
+ (nt, substitute_in_type (TYPE_INDEX_TYPE (t), f, r));
- return new_tree;
+ return nt;
}
/* Then the subtypes. */
@@ -7882,21 +7882,21 @@ substitute_in_type (tree t, tree f, tree r)
if (low == TYPE_RM_MIN_VALUE (t) && high == TYPE_RM_MAX_VALUE (t))
return t;
- new_tree = copy_type (t);
- SET_TYPE_RM_MIN_VALUE (new_tree, low);
- SET_TYPE_RM_MAX_VALUE (new_tree, high);
+ nt = copy_type (t);
+ SET_TYPE_RM_MIN_VALUE (nt, low);
+ SET_TYPE_RM_MAX_VALUE (nt, high);
- return new_tree;
+ return nt;
}
return t;
case COMPLEX_TYPE:
- new_tree = substitute_in_type (TREE_TYPE (t), f, r);
- if (new_tree == TREE_TYPE (t))
+ nt = substitute_in_type (TREE_TYPE (t), f, r);
+ if (nt == TREE_TYPE (t))
return t;
- return build_complex_type (new_tree);
+ return build_complex_type (nt);
case OFFSET_TYPE:
case METHOD_TYPE:
@@ -7913,16 +7913,16 @@ substitute_in_type (tree t, tree f, tree r)
if (component == TREE_TYPE (t) && domain == TYPE_DOMAIN (t))
return t;
- new_tree = build_array_type (component, domain);
- TYPE_ALIGN (new_tree) = TYPE_ALIGN (t);
- TYPE_USER_ALIGN (new_tree) = TYPE_USER_ALIGN (t);
- SET_TYPE_MODE (new_tree, TYPE_MODE (t));
- TYPE_SIZE (new_tree) = SUBSTITUTE_IN_EXPR (TYPE_SIZE (t), f, r);
- TYPE_SIZE_UNIT (new_tree) = SUBSTITUTE_IN_EXPR (TYPE_SIZE_UNIT (t), f, r);
- TYPE_NONALIASED_COMPONENT (new_tree) = TYPE_NONALIASED_COMPONENT (t);
- TYPE_MULTI_ARRAY_P (new_tree) = TYPE_MULTI_ARRAY_P (t);
- TYPE_CONVENTION_FORTRAN_P (new_tree) = TYPE_CONVENTION_FORTRAN_P (t);
- return new_tree;
+ nt = build_array_type (component, domain);
+ TYPE_ALIGN (nt) = TYPE_ALIGN (t);
+ TYPE_USER_ALIGN (nt) = TYPE_USER_ALIGN (t);
+ SET_TYPE_MODE (nt, TYPE_MODE (t));
+ TYPE_SIZE (nt) = SUBSTITUTE_IN_EXPR (TYPE_SIZE (t), f, r);
+ TYPE_SIZE_UNIT (nt) = SUBSTITUTE_IN_EXPR (TYPE_SIZE_UNIT (t), f, r);
+ TYPE_NONALIASED_COMPONENT (nt) = TYPE_NONALIASED_COMPONENT (t);
+ TYPE_MULTI_ARRAY_P (nt) = TYPE_MULTI_ARRAY_P (t);
+ TYPE_CONVENTION_FORTRAN_P (nt) = TYPE_CONVENTION_FORTRAN_P (t);
+ return nt;
}
case RECORD_TYPE:
@@ -7935,8 +7935,8 @@ substitute_in_type (tree t, tree f, tree r)
/* Start out with no fields, make new fields, and chain them
in. If we haven't actually changed the type of any field,
discard everything we've done and return the old type. */
- new_tree = copy_type (t);
- TYPE_FIELDS (new_tree) = NULL_TREE;
+ nt = copy_type (t);
+ TYPE_FIELDS (nt) = NULL_TREE;
for (field = TYPE_FIELDS (t); field; field = TREE_CHAIN (field))
{
@@ -7967,23 +7967,23 @@ substitute_in_type (tree t, tree f, tree r)
}
}
- DECL_CONTEXT (new_field) = new_tree;
+ DECL_CONTEXT (new_field) = nt;
SET_DECL_ORIGINAL_FIELD (new_field,
(DECL_ORIGINAL_FIELD (field)
? DECL_ORIGINAL_FIELD (field) : field));
- TREE_CHAIN (new_field) = TYPE_FIELDS (new_tree);
- TYPE_FIELDS (new_tree) = new_field;
+ TREE_CHAIN (new_field) = TYPE_FIELDS (nt);
+ TYPE_FIELDS (nt) = new_field;
}
if (!changed_field)
return t;
- TYPE_FIELDS (new_tree) = nreverse (TYPE_FIELDS (new_tree));
- TYPE_SIZE (new_tree) = SUBSTITUTE_IN_EXPR (TYPE_SIZE (t), f, r);
- TYPE_SIZE_UNIT (new_tree) = SUBSTITUTE_IN_EXPR (TYPE_SIZE_UNIT (t), f, r);
- SET_TYPE_ADA_SIZE (new_tree, SUBSTITUTE_IN_EXPR (TYPE_ADA_SIZE (t), f, r));
- return new_tree;
+ TYPE_FIELDS (nt) = nreverse (TYPE_FIELDS (nt));
+ TYPE_SIZE (nt) = SUBSTITUTE_IN_EXPR (TYPE_SIZE (t), f, r);
+ TYPE_SIZE_UNIT (nt) = SUBSTITUTE_IN_EXPR (TYPE_SIZE_UNIT (t), f, r);
+ SET_TYPE_ADA_SIZE (nt, SUBSTITUTE_IN_EXPR (TYPE_ADA_SIZE (t), f, r));
+ return nt;
}
default: