https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66448
--- Comment #15 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Aldy Hernandez from comment #14) > Created attachment 35734 [details] > Patch to ICE on other duplicate DW_AT_ attributes > I can't reproduce any of these with a cross compiler. I'm building a cross > with: > > --enable-languages=c,c++ --disable-bootstrap --disable-multilib > --target=i686-darwin The triple for the platform I'm testing on is : x86_64-apple-darwin12 I doubt that i686/x86_64 is significant since the errors show on both multilib variants. However, I'd avoid the default version - and suggest at least xxx-apple-darwin10. > ...but I still can't get cc1plus to trigger any ICE with the attached patch. me neither - nevertheless... > > warning: invalid DWARF generated by the compiler: DIE 0x00000176 has > > multiple > > AT_artificial attributes in > > '/var/folders/tj/17r7407j14d324dzf67cnvxm000114/T//ccNJ6qak.o'. > > Similarly here. > > The attached patch adds ICEs for duplicate > DW_AT_{artificial,decl_line,decl_file} tags. Since I'm flying blind here, > would you mind finding for which files we trigger ICEs and attach the > preprocessed files so I can reproduce with a cc1/cc1plus? I assume just one > of each type will do. OK. so … the ICEs don't fire - but, nevertheless, the output seems to be incorrect. I'll attach the intermediate files in a follow-on post. for the case of: ./gcc/xgcc -Bgcc /GCC/gcc-trunk/gcc/testsuite/gcc.c-torture/execute/20020412-1.c -m64 -O3 -g -o t -save-temps dwarfdump --verify 20020412-1.o ---------------------------------------------------------------------- File: 20020412-1.o (x86_64) ---------------------------------------------------------------------- Verifying Compile Unit Header chain... ok Verifying .debug_info... error: Range is not in parent BLCK {0x000001da}: [0x0000000000000190 - 0x0000000000000204) ERROR 0x0000020a: contains multiple AT_decl_file attributes. ERROR 0x0000020a: contains multiple AT_decl_line attributes. ERROR 0x0000020a: contains multiple AT_decl_file attributes. ERROR 0x0000020a: contains multiple AT_decl_line attributes. ERROR 0x0000028d: contains multiple AT_decl_file attributes. ERROR 0x0000028d: contains multiple AT_decl_line attributes. ====== using binutils objdump (which groks mach-o) … although I realise you don't have a cross-assembler (although I'm working on that too ;) ) Contents of the .debug_info section: Compilation Unit @ offset 0x0: Length: 0x39d (32-bit) Version: 2 Abbrev Offset: 0x0 <snip> <209> DW_AT_const_value : 5 <2><20a>: Abbrev Number: 11 (DW_TAG_structure_type) <20b> DW_AT_decl_file : 1 <20c> DW_AT_decl_line : 43 <20d> DW_AT_decl_file : 1 <20e> DW_AT_decl_line : 43 <20f> DW_AT_decl_file : 1 <210> DW_AT_decl_line : 43 <211> DW_AT_sibling : <0x222> <3><215>: Abbrev Number: 7 (DW_TAG_member) so it appears that the tools agree about the binary .. =====