[PATCH] Fix for lazy decl_rtl bug in dwarf2out.c
Mark Mitchell
mark@codesourcery.com
Mon Apr 16 10:50:00 GMT 2001
>>>>> "Jason" == Jason Merrill <jason_merrill@redhat.com> writes:
Jason> If DECL_RTL is always set, I think it makes sense to
Jason> continue using the DECL_RTL macro. Using DECL_RTL_IF_SET
Jason> implies that sometimes it isn't.
Yes -- it only makes sense to use DECL_RTL_IF_SET if coded like:
rtx = DECL_RTL_IF_SET (decl);
if (rtx)
/* Do something */;
else
abort ();
Jason> Furthermore, if it isn't set, make_decl_rtl will abort
Jason> because it doesn't know what to do with a LABEL_DECL.
Right -- but we're mixing abstraction layers.
It's possible that `make_decl_rtl' will learn to make RTL for a label
(why not pipe all DECLs through the same interface). Since that
widens the set of inputs allowed by make_decl_rtl, that ought to be a
safe and permissible change.
On the other hand, if we believe that DECL_RTL should always be set in
the code Daniel is looking at, then we should have an abort there to
express that constraint. Otherwise, the reasonable change to
make_decl_rtl would eliminate the consistency check in dwarf2out.c.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-patches
mailing list