(expand_decl): If stack checking, use alloca for large vars.
authorRichard Kenner <kenner@gcc.gnu.org>
Thu, 17 Jul 1997 15:26:30 +0000 (11:26 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Thu, 17 Jul 1997 15:26:30 +0000 (11:26 -0400)
From-SVN: r14472

gcc/stmt.c

index fb17900046c1e0d3a36536f721889f5650030b0c..0dcb4cba8cb4c20fee26bab3e2b54ef86c1eb7bd 100644 (file)
@@ -3573,7 +3573,11 @@ expand_decl (decl)
                           / BITS_PER_UNIT));
     }
 
-  else if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST)
+  else if (TREE_CODE (DECL_SIZE (decl)) == INTEGER_CST
+          && ! (flag_stack_check && ! STACK_CHECK_BUILTIN
+                && (TREE_INT_CST_HIGH (DECL_SIZE (decl)) != 0
+                    || (TREE_INT_CST_LOW (DECL_SIZE (decl))
+                        > STACK_CHECK_MAX_VAR_SIZE * BITS_PER_UNIT))))
     {
       /* Variable of fixed size that goes on the stack.  */
       rtx oldaddr = 0;