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

Kazu Hirata kazu@cs.umass.edu
Fri Jun 27 20:49:00 GMT 2003


Hi,

GCC Internals Manual states that

  For any symbolic label, there is only one symbol_ref object
  referring to it.

Does this mean x == y iff XSTR (x, 0) == XSTR (y, 0), assuming both x
and y are SYMBOL_REF?  If so, looking at gen_rtx_SYMBOL_REF, I think
we can get two different rtx objects just by saying

  x = gen_rtx_SYMBOL_REF (Pmode, "hello");
  y = gen_rtx_SYMBOL_REF (Pmode, strdup ("hello"));

Or are we not supposed to do this?

Thanks in advance,

Kazu Hirata



More information about the Gcc mailing list