http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51902
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26391|0 |1 is obsolete| | --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-23 15:25:09 UTC --- Created attachment 26432 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26432 gcc47-pr51902.patch Updated patch that ought to fix up redeclaration1.C. It is like the previous patch, but additionally for the duration in between reorder_blocks_1 and blocks_nreverse_all temporarily sets BLOCK_SUPERCONTEXT not to the supercontext origin block, but to the supercontext fragment in which it has been seen. This is then used in extra BLOCK_SAME_RANGE clearing. If we didn't adjust BLOCK_SUPERCONTEXT to the old meaning right away, if BLOCK_FRAGMENT_CHAIN (BLOCK_SUPERCONTEXT (block)) is different from BLOCK_SUPERCONTEXT (BLOCK_FRAGMENT_CHAIN (block)), we clear BLOCK_SAME_RANGE (block) as well. This should IMHO ensure that if BLOCK_SAME_RANGE is set, the .debug_range can be merged or tail merged with the parent. As the patch does adjust BLOCK_SUPERCONTEXT of the block in the same loop to avoid multiple chain walks, we remember it in prev_super variable instead.