(assemble_variable): If low part of size doesn't fit in an int,
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 14 Jul 1997 11:26:35 +0000 (07:26 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 14 Jul 1997 11:26:35 +0000 (07:26 -0400)
variable is too large.

From-SVN: r14428

gcc/varasm.c

index 29257ddb55d0b8213b66d961cf2e84aaba75c3c9..dae266244c8b050aa1b7408b33b0f176ddc12cf5 100644 (file)
@@ -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;