the old_die if statement, and delete assertion for it.
(decl_ultimate_origin): Remove last change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13956
138bc75d-0d04-0410-961f-
82ee72b054a4
{
register tree immediate_origin = DECL_ABSTRACT_ORIGIN (decl);
{
register tree immediate_origin = DECL_ABSTRACT_ORIGIN (decl);
- if (immediate_origin == NULL_TREE || immediate_origin == decl)
+ if (immediate_origin == NULL_TREE)
if (origin != NULL)
add_abstract_origin_attribute (var_die, origin);
if (origin != NULL)
add_abstract_origin_attribute (var_die, origin);
- else if (old_die && TREE_STATIC (decl))
- {
- assert (get_AT_flag (old_die, DW_AT_declaration) == 1);
+ /* Loop unrolling can create multiple blocks that refer to the same
+ static variable, so we must test for the DW_AT_declaration flag. */
+ /* ??? Loop unrolling/reorder_blocks should perhaps be rewritten to
+ copy decls and set the DECL_ABSTRACT flag on them instead of
+ sharing them. */
+ else if (old_die && TREE_STATIC (decl)
+ && get_AT_flag (old_die, DW_AT_declaration) == 1)
+ {
+ /* ??? This is an instantiation of a C++ class level static. */
add_AT_die_ref (var_die, DW_AT_specification, old_die);
if (DECL_NAME (decl))
{
add_AT_die_ref (var_die, DW_AT_specification, old_die);
if (DECL_NAME (decl))
{