summaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-08 11:38:26 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-08 11:38:26 +0000
commit4ce8ada59713e8a15d5082d98bf23d5f0e6ffbd4 (patch)
treec9ff0be570529a9d26034693ee68985146adcd5f /gcc/ada
parentc1c960b600444065ad759bc48f41bb9e15f97b75 (diff)
downloadgcc-4ce8ada59713e8a15d5082d98bf23d5f0e6ffbd4.tar.gz
* gcc-interface/decl.c (make_aligning_type): Declare the type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159183 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/gcc-interface/decl.c10
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 2a2805a49f0..3878ccd4149 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,9 @@
2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/decl.c (make_aligning_type): Declare the type.
+
+2010-05-08 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/decl.c (gnat_to_gnu_entity): Create variables for size
expressions of variant part of record types declared at library level.
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index b0334f2c8ed..6df79fb878e 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -5955,8 +5955,8 @@ make_aligning_type (tree type, unsigned int align, tree size,
if (TREE_CODE (name) == TYPE_DECL)
name = DECL_NAME (name);
-
- TYPE_NAME (record_type) = concat_name (name, "_ALIGN");
+ name = concat_name (name, "ALIGN");
+ TYPE_NAME (record_type) = name;
/* Compute VOFFSET and then POS. The next byte position multiple of some
alignment after some address is obtained by "and"ing the alignment minus
@@ -6001,8 +6001,12 @@ make_aligning_type (tree type, unsigned int align, tree size,
size_int (room + align / BITS_PER_UNIT));
SET_TYPE_MODE (record_type, BLKmode);
-
relate_alias_sets (record_type, type, ALIAS_SET_COPY);
+
+ /* Declare it now since it will never be declared otherwise. This is
+ necessary to ensure that its subtrees are properly marked. */
+ create_type_decl (name, record_type, NULL, true, false, Empty);
+
return record_type;
}