aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/utils.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2005-03-29 18:21:55 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2005-03-29 18:21:55 +0200
commita6de8e2167ec79f1db37c3d5ac29fd73ac7a2e2a (patch)
treefeca584ba266a98eb8c687cc50ea7aa3b16dd2f3 /gcc/ada/utils.c
parent2813bb6b356e37af272d5ce279d0fdddc794e34f (diff)
downloadgcc-a6de8e2167ec79f1db37c3d5ac29fd73ac7a2e2a.zip
gcc-a6de8e2167ec79f1db37c3d5ac29fd73ac7a2e2a.tar.gz
gcc-a6de8e2167ec79f1db37c3d5ac29fd73ac7a2e2a.tar.bz2
re PR ada/19956 (ICE copy_tree_r, at tree-inline.c:2320 on simple Ada code)
2005-03-29 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> PR ada/19956 * utils.c (finish_record_type): Use variable_size when setting sizes. From-SVN: r97186
Diffstat (limited to 'gcc/ada/utils.c')
-rw-r--r--gcc/ada/utils.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index 762ec30..484067d 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -668,10 +668,10 @@ finish_record_type (tree record_type, tree fieldlist, bool has_rep,
TYPE_MODE (record_type) = BLKmode;
if (!had_size_unit)
- TYPE_SIZE_UNIT (record_type) = size_zero_node;
-
+ TYPE_SIZE_UNIT (record_type) = size_zero_node;
if (!had_size)
TYPE_SIZE (record_type) = bitsize_zero_node;
+
/* For all-repped records with a size specified, lay the QUAL_UNION_TYPE
out just like a UNION_TYPE, since the size will be fixed. */
else if (code == QUAL_UNION_TYPE)
@@ -796,9 +796,11 @@ finish_record_type (tree record_type, tree fieldlist, bool has_rep,
: convert (sizetype, size_binop (CEIL_DIV_EXPR, size,
bitsize_unit_node)));
- TYPE_SIZE (record_type) = round_up (size, TYPE_ALIGN (record_type));
+ TYPE_SIZE (record_type)
+ = variable_size (round_up (size, TYPE_ALIGN (record_type)));
TYPE_SIZE_UNIT (record_type)
- = round_up (size_unit, TYPE_ALIGN (record_type) / BITS_PER_UNIT);
+ = variable_size (round_up (size_unit,
+ TYPE_ALIGN (record_type) / BITS_PER_UNIT));
compute_record_mode (record_type);
}