r190610 - in /branches/google/gcc-4_7/gcc: Chan...

ccoutant@gcc.gnu.org ccoutant@gcc.gnu.org
Thu Aug 23 01:13:00 GMT 2012


Author: ccoutant
Date: Thu Aug 23 01:13:56 2012
New Revision: 190610

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190610
Log:
This patch is for the google/gcc-4_7 branch.

If a function contains a local typedef of an anonymous structure, GCC
will generate a typedef DIE in the function, where the typedef DIE points
to a structure_type DIE at the top level.  That structure_type DIE, if
it's a non-POD, can contain ctor and dtor definitions.  This causes an
assertion in should_move_die_to_comdat to fail, as we have up to now
assumed that this could never happen.

Perhaps a better fix would be to fix the generation of the structure_type
DIE somehow, but GDB seems happy with what we're generating, and we don't
want to extract this type into a comdat type unit anyway, so this patch
fixes things up so that we just skip the type instead of asserting.

I'll explore other possible fixes for trunk, but this should be good
for google/gcc-4_7.

Tested with build and validate, and by compiling the failing test case.

Google ref b/6669962.

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

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.

Modified:
    branches/google/gcc-4_7/gcc/ChangeLog.google-4_7
    branches/google/gcc-4_7/gcc/dwarf2out.c



More information about the Gcc-cvs mailing list