Index: cfgexpand.c
===================================================================
--- cfgexpand.c	(revision 203259)
+++ cfgexpand.c	(working copy)
@@ -1131,7 +1131,9 @@ defer_stack_allocation (tree var, bool toplevel)
      other hand, we don't want the function's stack frame size to
      get completely out of hand.  So we avoid adding scalars and
      "small" aggregates to the list at all.  */
-  if (optimize == 0 && tree_low_cst (DECL_SIZE_UNIT (var), 1) < 32)
+  if (optimize == 0
+      && (tree_low_cst (DECL_SIZE_UNIT (var), 1)
+          < PARAM_VALUE (PARAM_MIN_SIZE_FOR_STACK_SHARING)))
     return false;
 
   return true;
Index: params.def
===================================================================
--- params.def	(revision 203259)
+++ params.def	(working copy)
@@ -682,6 +682,12 @@ DEFPARAM (PARAM_SSP_BUFFER_SIZE,
 	  "The lower bound for a buffer to be considered for stack smashing protection",
 	  8, 1, 0)
 
+DEFPARAM (PARAM_MIN_SIZE_FOR_STACK_SHARING,
+	  "min-size-for-stack-sharing",
+	  "Attempt to share stack slots among variables in different lexical blocks "
+	  "at O0 only if their sizes exceed this value",
+	  32, 0, 0)
+
 /* When we thread through a block we have to make copies of the
    statements within the block.  Clearly for large blocks the code
    duplication is bad.
