Index: mingw32.h
===================================================================
--- mingw32.h   (revision 180393)
+++ mingw32.h   (working copy)
@@ -239,3 +239,8 @@
 /* We should find a way to not have to update this manually.  */
 #define LIBGCJ_SONAME "libgcj" /*LIBGCC_EH_EXTN*/ "-12.dll"

+/* For 32-bit Windows we need valid frame-pointer for function using
+   setjmp.  */
+#define SUBTARGET_SETJMP_NEED_FRAME_POINTER \
+  (!TARGET_64BIT && cfun->calls_setjmp)
+
Index: i386.c
===================================================================
--- i386.c      (revision 180393)
+++ i386.c      (working copy)
@@ -8741,6 +8741,12 @@
   if (SUBTARGET_FRAME_POINTER_REQUIRED)
     return true;

+#ifdef SUBTARGET_SETJMP_NEED_FRAME_POINTER
+  /* For older 32-bit runtimes setjmp requires valid frame-pointer.  */
+  if (SUBTARGET_SETJMP_NEED_FRAME_POINTER)
+    return true;
+#endif
+
   /* In ix86_option_override_internal, TARGET_OMIT_LEAF_FRAME_POINTER
      turns off the frame pointer by default.  Turn it back on now if
      we've not got a leaf function.  */
