Commit 506711af by Richard Kenner

(assemble_variable): If low part of size doesn't fit in an int,

variable is too large.

From-SVN: r14428
parent 9ddca353
...@@ -1272,6 +1272,8 @@ assemble_variable (decl, top_level, at_end, dont_output_data) ...@@ -1272,6 +1272,8 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
if (! dont_output_data) if (! dont_output_data)
{ {
int size;
if (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST) if (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST)
goto finish; goto finish;
...@@ -1279,7 +1281,9 @@ assemble_variable (decl, top_level, at_end, dont_output_data) ...@@ -1279,7 +1281,9 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
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) size = TREE_INT_CST_LOW (size_tree);
if (TREE_INT_CST_HIGH (size_tree) != 0
|| size != TREE_INT_CST_LOW (size_tree))
{ {
error_with_decl (decl, "size of variable `%s' is too large"); error_with_decl (decl, "size of variable `%s' is too large");
goto finish; goto 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