------- Comment #6 from rguenth at gcc dot gnu dot org 2006-05-29 14:04 ------- At entry of verify_ssa of afterReading() we have
(gdb) call debug_immediate_uses () Immediate_uses: verbose.3_1 : --> single use. if (verbose.3_1 > 0) goto <L2>; else goto <L1>; D.1752_2 : --> single use. foo (&"%s%s"[0], D.1752_2, D.1751_3); D.1751_3 : --> single use. foo (&"%s%s"[0], D.1752_2, D.1751_3); verbose_4 : --> no uses. (gdb) print *ssa_names $6 = {base = {num = 5, alloc = 50, vec = {0x0}}} but walking the fn stmts we have f.i. 701 for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi)) (gdb) 703 tree stmt = bsi_stmt (bsi); (gdb) 706 if (check_modified_stmt && stmt_modified_p (stmt)) (gdb) call debug_generic_expr (stmt) # VUSE <verboseD.1734_5>; verbose.3D.1750_1 = verboseD.1734 i.e. SSA_NAME_VERSION of 5 on the VOP, which is out of range. Indeed, in the verification loop FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES | SSA_OP_ALL_KILLS) { op = USE_FROM_PTR (use_p); if (verify_use (bb, definition_block[SSA_NAME_VERSION (op)], use_p, stmt, false, !is_gimple_reg (op), names_defined_in_bb)) goto err; } we end up calling verify_use with Breakpoint 7, verify_use (bb=0xb7d38e60, def_bb=0x11, use_p=0xb7db4814, stmt=0xb7d37318, check_abnormal=0 '\0', is_virtual=1 '\001', names_defined_in_bb=0x8a6429c) at /space/rguenther/src/svn/gcc-4_1-branch/gcc/tree-ssa.c:222 where def_bb is random garbage and use_p is also bogus. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27793