Backport upstream patches to fix ICEs when using -fdebug-types-section.
commitc128931791b3abe8af1e6019dc79511228c2f919
authorccoutant <ccoutant@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Jun 2013 18:49:17 +0000 (12 18:49 +0000)
committerccoutant <ccoutant@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Jun 2013 18:49:17 +0000 (12 18:49 +0000)
treef801cfef9b17371c2f61471df84f2cdbc27f4922
parent61bfdddf03a75b3d7ef36a977bf9eeba53d724f4
Backport upstream patches to fix ICEs when using -fdebug-types-section.

gcc:

2012-08-09   Cary Coutant  <ccoutant@google.com>

    Backport of pending upstream patch.

* dwarf2out.c (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.

2012-08-22   Cary Coutant  <ccoutant@google.com>

* dwarf2out.c (should_move_die_to_comdat): A type definition
can contain a subprogram definition, but don't move it to a
comdat unit.

2012-08-29   Cary Coutant  <ccoutant@google.com>

* dwarf2out.c (clone_tree_partial): Remove.
(copy_decls_walk): Don't copy children of a declaration
into a type unit.

2012-08-31   Cary Coutant  <ccoutant@google.com>

* dwarf2out.c (clone_tree_partial): Restore.
(copy_decls_walk): Call clone_tree_partial to copy children
of non-declaration DIEs.

gcc/testsuite:

2012-08-09   Cary Coutant  <ccoutant@google.com>

    Backport of pending upstream patch.

* g++.dg/debug/dwarf2/dwarf4-nested.C: New test case.
* g++.dg/debug/dwarf2/dwarf4-typedef.C: Add
-fdebug-types-section flag.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/google@200036 138bc75d-0d04-0410-961f-82ee72b054a4
gcc-4_8/gcc/dwarf2out.c
gcc-4_8/gcc/testsuite/g++.dg/debug/dwarf2/dwarf4-nested.C [new file with mode: 0644]
gcc-4_8/gcc/testsuite/g++.dg/debug/dwarf2/dwarf4-typedef.C