Is there really only one symbol_ref object referring to each symbolic label?
Geoff Keating
geoffk@geoffk.org
Fri Jun 27 21:23:00 GMT 2003
Kazu Hirata <kazu@cs.umass.edu> writes:
> 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?
Strings in SYMBOL_REFs are supposed to live in the identifier hash
table, and so should be unique...
--
- Geoffrey Keating <geoffk@geoffk.org>
More information about the Gcc
mailing list