This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/32230] [4.3 Regression] Segfault in set_bb_for_stmt with -O -ftree-vectorize



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]