From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8343 invoked by alias); 27 May 2010 20:51:04 -0000 Received: (qmail 8279 invoked by uid 48); 27 May 2010 20:50:47 -0000 Date: Thu, 27 May 2010 20:51:00 -0000 Message-ID: <20100527205047.8278.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/44188] Fails to produce DW_AT_typedef for typedef of anonymous struct In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-05/txt/msg03068.txt.bz2 ------- Comment #4 from jakub at gcc dot gnu dot org 2010-05-27 20:50 ------- Not 100% sure yet, but I believe this commit broke bootstrap on both x86_64-linux and i686-linux, e.g. in libobjc or in ada bits. One of the ICEs I'm seeing is: #0 fancy_abort (file=0x8d1d1e3 "../../gcc/dwarf2out.c", line=16990, function=0x8d21b15 "add_byte_size_attribute") at ../../gcc/diagnostic.c:782 #1 0x0823486f in add_byte_size_attribute (die=0xf7d76a20, tree_node=) at ../../gcc/dwarf2out.c:16990 #2 0x082568d3 in gen_struct_or_union_type_die (type=0xf7d52cc0, context_die=0xf7d633f0, usage=) at ../../gcc/dwarf2out.c:19329 #3 gen_tagged_type_die (type=0xf7d52cc0, context_die=0xf7d633f0, usage=) at ../../gcc/dwarf2out.c:19502 #4 0x08257e9a in gen_typedef_die (decl=0xf7d600d8, context_die=0xf7d633f0) at ../../gcc/dwarf2out.c:19430 #5 0x08255a59 in gen_decl_die (decl=0xf7d600d8, origin=, context_die=0xf7d633f0) at ../../gcc/dwarf2out.c:20186 gen_typedef_die is called on: unit size align 32 symtab -136878016 alias set -1 canonical type 0xf7d52c00 fields pointer_to_this chain > asm_written unsigned SI size unit size align 32 symtab -136877536 alias set -1 canonical type 0xf7d52cc0> asm_written VOID file /usr/src/gcc/libobjc/objc/objc.h line 72 col 4 align 1> Given the comments, I wonder if: --- dwarf2out.c.jj3 2010-05-27 21:48:57.000000000 +0200 +++ dwarf2out.c 2010-05-27 22:50:22.000000000 +0200 @@ -19427,7 +19427,9 @@ gen_typedef_die (tree decl, dw_die_ref c generate that DIE right away. add_type_attribute called below will then pick (via lookup_type_die) that anonymous struct DIE. */ - gen_tagged_type_die (type, context_die, DINFO_USAGE_DIR_USE); + if (RECORD_OR_UNION_TYPE_P (type) + || TREE_CODE (type) == ENUMERAL_TYPE) + gen_tagged_type_die (type, context_die, DINFO_USAGE_DIR_USE); } add_type_attribute (type_die, type, TREE_READONLY (decl), isn't intended, calling gen_tagged_type_die on a POINTER_TYPE is weird. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44188