This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32230] [4.3 Regression] Segfault in set_bb_for_stmt with -O -ftree-vectorize
- From: "eres at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jun 2007 12:19:24 -0000
- Subject: [Bug tree-optimization/32230] [4.3 Regression] Segfault in set_bb_for_stmt with -O -ftree-vectorize
- References: <bug-32230-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from eres at il dot ibm dot com 2007-06-26 12:19 -------
There are places which checks that bsi_insert_on_edge_immediate returns
NULL so checking for NULL before calling it would change the semantic.
Here is the fix for this SIGSEGV:
Index: tree-cfg.c
===================================================================
--- tree-cfg.c (revision 125997)
+++ tree-cfg.c (working copy)
@@ -3003,6 +3003,9 @@
gcc_assert (!PENDING_STMT (e));
+ if (stmt == NULL_TREE)
+ return NULL;
+
if (tree_find_edge_insert_loc (e, &bsi, &new_bb))
bsi_insert_after (&bsi, stmt, BSI_NEW_STMT);
else
Revital
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32230