Is there really only one symbol_ref object referring to each symbolic label?

Kazu Hirata kazu@cs.umass.edu
Mon Jun 30 16:32:00 GMT 2003


Hi Richard,

> > GCC Internals Manual states that
> > 
> >   For any symbolic label, there is only one symbol_ref object
> >   referring to it.
> 
> This is a lie.  Most trivially, we can generate new ones when
> we have to change modes, when ptr_mode != Pmode.

Actually, I was wondering what a SYMBOL_REF with mode other than Pmode
means.  Some back ends use

  gen_rtx_SYMBOL_REF (VOIDmode, ...);

The only thing that comes to my mind is that VOIDmode is used to have
rtx_equal_p and its friends reject a comparison with another
SYMBOL_REF in Pmode using the fact that they check the equality of
modes first, but this sounds like an unlikely idea...

Kazu Hirata



More information about the Gcc mailing list