Author: meiye
Date: 2011-05-23 20:21:36 -0400 (Mon, 23 May 2011)
New Revision: 3620

Modified:
   trunk/osprey/be/opt/opt_cfg.cxx
   trunk/osprey/be/opt/opt_proactive.cxx
Log:
 skip a corner case that does not need a normalization; avoid a seg fault when 
a SC node does not have a representative block. CR: Sun Chan

Modified: trunk/osprey/be/opt/opt_cfg.cxx
===================================================================
--- trunk/osprey/be/opt/opt_cfg.cxx     2011-05-24 00:18:06 UTC (rev 3619)
+++ trunk/osprey/be/opt/opt_cfg.cxx     2011-05-24 00:21:36 UTC (rev 3620)
@@ -6534,8 +6534,9 @@
   BB_NODE * bb_new = Create_and_allocate_bb(BB_GOTO);
   SC_NODE * sc_new = Create_sc(SC_BLOCK);
   sc_new->Append_bbs(bb_new);
+  
+  BB_NODE * bb_head = sc->First_bb();
 
-  BB_NODE * bb_head = sc->Get_bb_rep();
   BB_NODE * bb_prev = bb_head->Prev();
   BB_LIST_ITER bb_list_iter;
   BB_NODE * bb_tmp;

Modified: trunk/osprey/be/opt/opt_proactive.cxx
===================================================================
--- trunk/osprey/be/opt/opt_proactive.cxx       2011-05-24 00:18:06 UTC (rev 
3619)
+++ trunk/osprey/be/opt/opt_proactive.cxx       2011-05-24 00:21:36 UTC (rev 
3620)
@@ -11271,6 +11271,9 @@
   std::pair<SC_NODE *, bool> p_ret = inner->Get_nesting_if();
   SC_NODE * sc_n1 = p_ret.first;
   SC_NODE * sc_iter = sc_n1;
+
+  if (sc_iter == outer)
+    return FALSE;
   
   while (sc_iter && (sc_iter != outer)) {
     if (!sc_iter->Is_well_behaved())


------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to