------- Comment #19 from rguenth at gcc dot gnu dot org 2006-05-03 10:36 ------- Thanks!
So, the problem is that PRE inserts (and later realifies) fake stores in basic blocks with abnormal control flow. It would need to do the insertion on the outgoing edges in this case, or deal with splitting the block and adjusting EH info at realifying point. But the much easier solution is to just punt on basic blocks that have abnormal control flow. Like Index: tree-ssa-pre.c =================================================================== *** tree-ssa-pre.c (revision 113493) --- tree-ssa-pre.c (working copy) *************** insert_fake_stores (void) *** 3216,3221 **** --- 3216,3229 ---- FOR_ALL_BB (block) { block_stmt_iterator bsi; + int i; + /* Do not insert fake stores in basic blocks that have + abnormal control flow. */ + for (i=0; i<EDGE_COUNT (block->succs); ++i) + if (EDGE_SUCC (block, i)->flags & EDGE_COMPLEX) + break; + if (i != EDGE_COUNT (block->succs)) + continue; for (bsi = bsi_start (block); !bsi_end_p (bsi); bsi_next (&bsi)) { tree stmt = bsi_stmt (bsi); Danny? -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dberlin at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26447