diff options
-rw-r--r-- | gcc/varasm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 29257dd..dae2662 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1272,6 +1272,8 @@ assemble_variable (decl, top_level, at_end, dont_output_data) if (! dont_output_data) { + int size; + if (TREE_CODE (DECL_SIZE (decl)) != INTEGER_CST) goto finish; @@ -1279,7 +1281,9 @@ assemble_variable (decl, top_level, at_end, dont_output_data) size_tree = size_binop (CEIL_DIV_EXPR, 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"); goto finish; |