http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51174
--- Comment #8 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-17 18:37:36 UTC --- > How can I reproduce this additional error in trans-mem.c? I believe that you need to use a target that does not define HAVE_COMDAT_GROUP. Other targets do not fill in DECL_COMDAT_GROUP, but do use DECL_COMDAT. The rest of GCC blindly copies around NULLs and the value never is used. The TM code assumes that all targets with DECL_COMDAT fill in the DECL_COMDAT_GROUP node with a specific content and format that it should mangle. My proposed patch, which appears to work, reverts to copying NULLs if DECL_COMDAT_GROUP is NULL. One could test if (DECL_COMDAT (new_decl) && HAVE_COMDAT_GRUOP) and that probably is more consistent with the rest of varasm.c > After using your patch handling NULL in > rs6000_xcoff_section_type_flags(), I can cc1/cc1plus all the aforementioned > failures in this PR correctly (with a cross to powerpc-ibm-aix5.3.0.0). I do not understand what you are asking. You can reproduce the failures or you cannot? My rs6000.c patch fixes some of the failures. The varasm.c patch is necessary to fix the rest of the failures -- the ones in trans-mem.c. > Is this similar failure you mention something else? Is there a testcase? Is what similar? When this is broken, the existing TM testcases fail all over the place, so I don't think there is a need for additional testcases.