This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[google/gcc-4_9] PR debug/60929: Fix a few ICEs and other problems with -fdebug-types-sections
- From: Cary Coutant <ccoutant at google dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 28 Apr 2014 13:32:55 -0700
- Subject: [google/gcc-4_9] PR debug/60929: Fix a few ICEs and other problems with -fdebug-types-sections
- Authentication-results: sourceware.org; auth=none
I've backported the following patch from trunk at r209812. Committed
on the google/gcc-4_9 branch at r209875.
Google ref: 14230806.
-cary
gcc/
* dwarf2out.c (should_move_die_to_comdat): A type definition
can contain a subprogram definition, but don't move it to a
comdat unit.
(clone_as_declaration): Copy DW_AT_abstract_origin attribute.
(generate_skeleton_bottom_up): Remove DW_AT_object_pointer attribute
from original DIE.
(clone_tree_hash): Rename to...
(clone_tree_partial): ...this; change callers. Copy
DW_TAG_subprogram DIEs as declarations.
(copy_decls_walk): Don't copy children of a declaration into a
type unit.
gcc/testsuite/
* g++.dg/debug/dwarf2/dwarf4-nested.C: New test case.
* g++.dg/debug/dwarf2/dwarf4-typedef.C: Add
-fdebug-types-section flag.