This patch is for the google/gcc-4_7 branch.
commitcc1eef5fdd5b4767c0811415abe905f5429a6bd3
authorccoutant <ccoutant@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Sep 2012 18:10:20 +0000 (4 18:10 +0000)
committerccoutant <ccoutant@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Sep 2012 18:10:20 +0000 (4 18:10 +0000)
tree3addf23082af4c9880f0034f8aaa9773a79082c1
parente55496a25d02a2cc4f5055261b641c81408a8a40
This patch is for the google/gcc-4_7 branch.

This patch fixes a problem caused by the previous patch that removed
the code to copy children of a DIE referenced by a type unit.

> I don't believe that it's necessary to copy the children of the class
> declaration at all, and this patch simply removes the code that copies
> those children. If there's a reference in the type unit to one of the
> children of that class, that one child will get copied in as needed.

The problem was that it IS necessary to copy the children of a
non-declaration -- such as a DW_TAG_array_type.  I've restored the
loop that calls clone_tree_partial, but placed it within a test
for is_declaration_die.

Bootstraps and passes regression tests. Also tested with parts of the
GDB testsuite, and is still able to build a large internal test case
that previously resulted in out-of-memory during compilation.

Google ref b/7041390.

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

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/google@190940 138bc75d-0d04-0410-961f-82ee72b054a4
gcc-4_7/gcc/ChangeLog.google-4_7
gcc-4_7/gcc/dwarf2out.c