Commit 809d6575 by Richard Kenner

(assemble_variable): Consistently use DECL_SIZE for everything.

From-SVN: r9145
parent e2041e68
...@@ -1031,19 +1031,16 @@ assemble_variable (decl, top_level, at_end, dont_output_data) ...@@ -1031,19 +1031,16 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
TREE_ASM_WRITTEN (decl) = 1; TREE_ASM_WRITTEN (decl) = 1;
/* If storage size is erroneously variable, just continue. app_disable ();
Error message was already made. */
if (DECL_SIZE (decl)) if (! dont_output_data)
{ {
if (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST) if (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST)
goto finish; goto finish;
app_disable ();
/* This is better than explicit arithmetic, since it avoids overflow. */ /* This is better than explicit arithmetic, since it avoids overflow. */
size_tree = size_binop (CEIL_DIV_EXPR, size_tree = size_binop (CEIL_DIV_EXPR,
DECL_SIZE (decl), size_int (BITS_PER_UNIT)); DECL_SIZE (decl), size_int (BITS_PER_UNIT));
if (TREE_INT_CST_HIGH (size_tree) != 0) if (TREE_INT_CST_HIGH (size_tree) != 0)
{ {
...@@ -1311,11 +1308,10 @@ assemble_variable (decl, top_level, at_end, dont_output_data) ...@@ -1311,11 +1308,10 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
{ {
if (DECL_INITIAL (decl)) if (DECL_INITIAL (decl))
/* Output the actual data. */ /* Output the actual data. */
output_constant (DECL_INITIAL (decl), output_constant (DECL_INITIAL (decl), TREE_INT_CST_LOW (size_tree));
int_size_in_bytes (TREE_TYPE (decl)));
else else
/* Leave space for it. */ /* Leave space for it. */
assemble_zeros (int_size_in_bytes (TREE_TYPE (decl))); assemble_zeros (TREE_INT_CST_LOW (size_tree));
} }
finish: finish:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment