> Jan Hubicka <hubi...@ucw.cz> writes:
> >> Richard Sandiford wrote the original section anchors implementation,
> >> so he would be a good person to comment about the interaction between
> >> aliases and section anchors.
> >
> > Thanks! Richard, does this patch seem sane?
> 
> Looks good to me in principle, but with:
> 
> > +      struct symtab_node *snode;
> >        decl = SYMBOL_REF_DECL (symbol);
> > +
> > +      snode = symtab_node (decl);
> > +      if (snode->alias)
> > +       {
> > +         rtx target = DECL_RTL (symtab_alias_ultimate_target 
> > (snode)->decl);
> > +         SYMBOL_REF_BLOCK_OFFSET (symbol) = SYMBOL_REF_BLOCK_OFFSET 
> > (target);
> > +         return;
> > +       }
> 
> is SYMBOL_REF_BLOCK_OFFSET (target) guaranteed to be valid at this point?
> It looked at face value like you'd need a recursive call to place_block_symbol
> on the target before the copy.

My reading was that SYMBOL_REF_BLOCK_OFFSET is computed at DECL_RTL calculation
time. But you are right - it is done by validize_mem that is not done by 
DECL_RTL.
Shall I just call it on target first?

Honza
> 
> Thanks,
> Richard

Reply via email to