This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Your patch causes -gdwarf-2 crash
- To: egcs-patches at cygnus dot com, Jason Merrill <jason at cygnus dot com>
- Subject: Your patch causes -gdwarf-2 crash
- From: Mark Mitchell <mark at markmitchell dot com>
- Date: Mon, 17 Aug 1998 12:31:00 -0700
- Cc: Jim Wilson <wilson at cygnus dot com>
- Reply-to: mark at markmitchell dot com
Jason --
This patch:
1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
* rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
causes an abort in dwarf2out.c, here:
if (DECL_IGNORED_P (decl))
{
if (TREE_CODE (decl) == FUNCTION_DECL
&& DECL_INITIAL (decl) != NULL)
abort ();
The type-info function is defined, but ignored. How about the
attached patch, Jim?
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com
Mon Aug 17 12:30:19 1998 Mark Mitchell <mark@markmitchell.com>
* dwarf2out.c (dwarf2out_decl): Don't abort on a DECL_INGORED_P
defined function if it is also DECL_ARTIFICIAL.
Index: dwarf2out.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/dwarf2out.c,v
retrieving revision 1.66
diff -c -p -r1.66 dwarf2out.c
*** dwarf2out.c 1998/08/11 13:23:44 1.66
--- dwarf2out.c 1998/08/17 19:27:51
*************** dwarf2out_decl (decl)
*** 9420,9426 ****
if (DECL_IGNORED_P (decl))
{
if (TREE_CODE (decl) == FUNCTION_DECL
! && DECL_INITIAL (decl) != NULL)
abort ();
return;
--- 9420,9431 ----
if (DECL_IGNORED_P (decl))
{
if (TREE_CODE (decl) == FUNCTION_DECL
! && DECL_INITIAL (decl) != NULL
! /* Some functions (like the synthetic RTTI functions
! generated by the C++ front-end) are compiler-generated, and
! may be DECL_IGNORED_P. Since they have no BLOCKs, there's
! no problem ignoring them. */
! && !DECL_ARTIFICIAL (decl))
abort ();
return;