This fixes the fact that the inliner now associates a BLOCK with BLOCK_SOURCE_LOCATION but we don't dare to keep that BLOCK live when removing unused block scopes. Adding location verification for BLOCK_SOURCE_LOCATION shows this immediately during bootstrap.
The obvious fix for this is the tree-inline.c hunk (obvious in that it is a return to previous behavior where location and block were not unified). As for the verification either we verify it the way in the patch below or we verify that LOCATION_BLOCK of BLOCK_SOURCE_LOCATION is always NULL. Any preference? (or just leave out the checking?) Bootstrap and regtest running on x86_64-unknown-linux-gnu (now way past the ICE with just the checking bits applied). Thanks, Richard. 2013-03-08 Richard Biener <rguent...@suse.de> * tree-inline.c (expand_call_inline): Do not associate a BLOCK with the location in BLOCK_SOURCE_LOCATION. * tree-cfg.c (verify_location): Verify BLOCK_SOURCE_LOCATION. Index: gcc/tree-inline.c =================================================================== *** gcc/tree-inline.c (revision 196538) --- gcc/tree-inline.c (working copy) *************** expand_call_inline (basic_block bb, gimp *** 3929,3935 **** { id->block = make_node (BLOCK); BLOCK_ABSTRACT_ORIGIN (id->block) = fn; ! BLOCK_SOURCE_LOCATION (id->block) = input_location; prepend_lexical_block (gimple_block (stmt), id->block); } --- 3929,3935 ---- { id->block = make_node (BLOCK); BLOCK_ABSTRACT_ORIGIN (id->block) = fn; ! BLOCK_SOURCE_LOCATION (id->block) = LOCATION_LOCUS (input_location); prepend_lexical_block (gimple_block (stmt), id->block); } Index: gcc/tree-cfg.c =================================================================== *** gcc/tree-cfg.c (revision 196538) --- gcc/tree-cfg.c (working copy) *************** verify_location (pointer_set_t *blocks, *** 4511,4516 **** --- 4511,4518 ---- error ("location references block not in block tree"); return true; } + if (block != NULL_TREE) + return verify_location (blocks, BLOCK_SOURCE_LOCATION (block)); return false; }