summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-18 18:33:14 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-18 18:33:14 +0000
commit9e2d2e27763b4dd1d9d5a3e812f5b60845fcd20b (patch)
treebb2b1497e101a864f13fa46a185e42bc1c04587f
parent6590374032917a56a1deeba67ec41eba8352c448 (diff)
downloadgcc-9e2d2e27763b4dd1d9d5a3e812f5b60845fcd20b.tar.gz
* decl.c (maybe_pad_type): Only generate the XVS parallel type if
the padded type has a variable size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134443 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/decl.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 3f23e2f5d8d..2242667c1a1 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
+ * decl.c (maybe_pad_type): Only generate the XVS parallel type if
+ the padded type has a variable size.
+
+2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
+
* decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Use the return by
target pointer mechanism as soon as the size is not constant.
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index 254b70a2722..525dad807fa 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -5683,11 +5683,12 @@ maybe_pad_type (tree type, tree size, unsigned int align,
/* Unless debugging information isn't being written for the input type,
write a record that shows what we are a subtype of and also make a
- variable that indicates our size, if variable. */
+ variable that indicates our size, if still variable. */
if (TYPE_NAME (record)
&& AGGREGATE_TYPE_P (type)
- && (TREE_CODE (TYPE_NAME (type)) != TYPE_DECL
- || !DECL_IGNORED_P (TYPE_NAME (type))))
+ && TREE_CODE (orig_size) != INTEGER_CST
+ && !(TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
+ && DECL_IGNORED_P (TYPE_NAME (type))))
{
tree marker = make_node (RECORD_TYPE);
tree name = TYPE_NAME (record);