This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa]: Still a problem with insertion, this time, after
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: gcc at gcc dot gnu dot org,Andrew MacLeod <amacleod at redhat dot com>
- Date: Sun, 1 Jun 2003 20:39:16 -0400
- Subject: [tree-ssa]: Still a problem with insertion, this time, after
Insertion after a LOOP_EXPR at the end of the bb seems not to work.
You end up with a BB that looks like:
(gdb) p debug_tree_bb (bb)
BLOCK 0
PRED: ENTRY
SUCC: 1
PARENT: nil
LOOP DEPTH: 0
NEXT BLOCK: 1
PREV BLOCK: -1
23 while (1)
-1 pretmp.4_24 = in_9 + 1B
Something isn't updated right here because the reverse iterator gets
one statement, and the forward iterator gets two:
2480 count_stmts_in_bb (bb)
2481 basic_block bb;
2482 {
2483 block_stmt_iterator bsi;
2484 int num_stmt1 = 0;
2485 int num_stmt2 = 0;
2486
2487 bsi = bsi_start (bb);
2488 for (; !bsi_end_p (bsi); bsi_next (&bsi))
2489 num_stmt1++;
(gdb) l
2490
2491 bsi = bsi_last (bb);
2492 for (; !bsi_end_p (bsi); bsi_prev (&bsi))
2493 num_stmt2++;
2494 if (num_stmt1 != num_stmt2)
2495 abort ();
2496 return num_stmt1;
2497 }
We abort on line 2495.
--Dan