This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Re: dwarf2out change breaks ada and libstdc++ on solaris too



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);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]