Index: gcc/config/sparc/sparc.cc
--- gcc/config/sparc/sparc.cc.orig
+++ gcc/config/sparc/sparc.cc
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "varasm.h"
 #include "output.h"
 #include "insn-attr.h"
+#include "flags.h"
 #include "explow.h"
 #include "expr.h"
 #include "debug.h"
@@ -6221,6 +6222,9 @@ sparc_flat_expand_prologue (void)
 				         sparc_frame_base_offset
 					   - sparc_apparent_frame_size,
 					 SORR_SAVE);
+
+  if (warn_stack_larger_than && size > stack_larger_than_size)
+    warning (OPT_Wstack_larger_than_, "stack usage is %lld bytes", size);
 
   /* Advertise that the data calculated just above are now valid.  */
   sparc_prologue_data_valid_p = true;
