This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Re: dwarf2out change breaks ada and libstdc++ on solaris too
- From: Devang Patel <dpatel at apple dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Andreas Tobler <toa at pop dot agri dot ch>
- Date: Tue, 3 Feb 2004 09:44:24 -0800
- Subject: [PATCH] Re: dwarf2out change breaks ada and libstdc++ on solaris too
- References: <20040128091442.GA15449@redhat.com> <4017DFED.1060405@pop.agri.ch> <A12E0988-5295-11D8-8DA1-000393A91CAA@apple.com> <401D6D41.7040000@pop.agri.ch>
It seems I broke all targets that do not supply target specific
routine to build builtin va_list. These targets use standard
builtin va_list that is just void *. So the fix is to just not emit
DW_TAG_imported_decl in such cases. Here is the patch that fixes it.
2004-02-03 Devang Patel <dpatel@apple.com>
* dwarf2out.c (dwarf2out_imported_module_or_decl): Do not force
out VOID_TYPE.
Andreas Tobler helped me to investigate and test this patch on solaris9.
At this moment I am running bootstrap and DejaGNU test run on
i686-pc-linux-gnu to make sure that this does not cause any other
problem.. OK to apply this fix in mainline if it succeeds?
Thank you,
--
Devang
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.483
diff -c -3 -p -r1.483 dwarf2out.c
*** dwarf2out.c 29 Jan 2004 18:42:56 -0000 1.483
--- dwarf2out.c 3 Feb 2004 17:36:56 -0000
*************** dwarf2out_imported_module_or_decl (tree
*** 12268,12280 ****
if (!context)
scope_die = comp_unit_die;
else if (TYPE_P (context))
! scope_die = force_type_die (context);
else
scope_die = force_decl_die (context);
/* For TYPE_DECL, lookup TREE_TYPE. */
if (TREE_CODE (decl) == TYPE_DECL)
! at_import_die = force_type_die (TREE_TYPE (decl));
else
at_import_die = force_decl_die (decl);
--- 12276,12300 ----
if (!context)
scope_die = comp_unit_die;
else if (TYPE_P (context))
! {
! tree v = root_type (context);
! if (v && TREE_CODE (v) == VOID_TYPE)
! /* Can not force die VOID_TYPE. */
! return;
! scope_die = force_type_die (context);
! }
else
scope_die = force_decl_die (context);
/* For TYPE_DECL, lookup TREE_TYPE. */
if (TREE_CODE (decl) == TYPE_DECL)
! {
! tree v = root_type (TREE_TYPE (decl));
! if (v && TREE_CODE (v) == VOID_TYPE)
! /* Can not force die VOID_TYPE. */
! return;
! at_import_die = force_type_die (TREE_TYPE (decl));
! }
else
at_import_die = force_decl_die (decl);