diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-18 18:33:14 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-18 18:33:14 +0000 |
commit | 9e2d2e27763b4dd1d9d5a3e812f5b60845fcd20b (patch) | |
tree | bb2b1497e101a864f13fa46a185e42bc1c04587f | |
parent | 6590374032917a56a1deeba67ec41eba8352c448 (diff) | |
download | gcc-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/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/decl.c | 7 |
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); |