(expand_call): Don't use int_size_in_bytes for a variable-size object.
authorRichard Stallman <rms@gnu.org>
Sat, 2 Jan 1993 21:43:51 +0000 (21:43 +0000)
committerRichard Stallman <rms@gnu.org>
Sat, 2 Jan 1993 21:43:51 +0000 (21:43 +0000)
From-SVN: r3060

gcc/calls.c

index c23fb829cd9ee696a13f0626b6b2e2263e1c4e95..c132a6586b86eec7aff4e84f1e574ec0a2a288de 100644 (file)
@@ -886,10 +886,10 @@ expand_call (exp, target, ignore)
        {
          /* We make a copy of the object and pass the address to the function
             being called.  */
-         int size = int_size_in_bytes (type);
          rtx copy;
 
-         if (size < 0)
+         if (TYPE_SIZE (type) == 0
+             || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
            {
              /* This is a variable-sized object.  Make space on the stack
                 for it.  */
@@ -908,7 +908,10 @@ expand_call (exp, target, ignore)
                                                            TYPE_ALIGN (type)));
            }
          else
-           copy = assign_stack_temp (TYPE_MODE (type), size, 1);
+           {
+             int size = int_size_in_bytes (type);
+             copy = assign_stack_temp (TYPE_MODE (type), size, 1);
+           }
 
          store_expr (args[i].tree_value, copy, 0);