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