This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56742] Optimization bug lead to uncaught throw
- From: "ktietz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 26 Mar 2013 21:14:23 +0000
- Subject: [Bug c++/56742] Optimization bug lead to uncaught throw
- Auto-submitted: auto-generated
- References: <bug-56742-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56742
--- Comment #2 from Kai Tietz <ktietz at gcc dot gnu.org> 2013-03-26 21:14:23 UTC ---
Hmm, yes indeed it is the -freorder-blocks option. One solution is to disallow
after reload for SEH-target to modify jumps.
The following patch fixes the issue for me.
Index: i386.c
===================================================================
--- i386.c (Revision 197118)
+++ i386.c (Arbeitskopie)
@@ -3941,6 +3941,19 @@
register_pass (&insert_vzeroupper_info);
}
+/* Implement TARGET_CANNOT_MODIFY_JUMPS_P. */
+static bool
+ix86_cannot_modify_jumps_p (void)
+{
+ if (TARGET_SEH && reload_completed
+ && cfun)
+ return true;
+ return false;
+}
+
+#undef TARGET_CANNOT_MODIFY_JUMPS_P
+#define TARGET_CANNOT_MODIFY_JUMPS_P ix86_cannot_modify_jumps_p
+
/* Update register usage after having seen the compiler flags. */
static void