This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Lost symbol in DECL_RTL/dwarf2
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-bugs at gcc dot gnu dot org, jason at redhat dot com
- Date: Wed, 9 Jan 2002 15:35:45 +0100
- Subject: Lost symbol in DECL_RTL/dwarf2
Hi,
While compiling testcase from bugreport 4461
extern long double _Complex conjl (long double _Complex);
void check_complex (const char *, __complex__ long double, __complex__ long double);
static void
conj_test (void)
{
check_complex ("", conjl (({ __complex__ long double __retval; __real__ __retval = (3.0); __imag__ __retval = (-4.0); __retval; })), ({ __complex__ long double __retval; __real__ __retval = (3.0); __imag__ __retval = (4.0); __retval; }));
}
The reference to nonexisting LC1 is consutrcted. I've tracked down to
be DECL_RTL of retval who reference it. Retval really is constant so this
makes sense, but the retval is optimized out so the symbol is never output.
What is the proper fix? Should we make sure we do not reference symbols in
DECL_RTL, or should we check whether the constant is out in dwarf2 or should we
replace the memory reference by constant when it comes to const pool or should
we make the constant to be output if it is references from DECL_RTL?
Honza