http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51174
--- Comment #6 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-16 18:43:06
UTC ---
DECL_COMDAT field validly can be NULL on some targets. And most other uses
seem to be copying the value. I think that tm_mangle() needs to be prepared
for its argument to be NULL or don't call tm_mangle() if DECL_COMDAT fiels is
NULL. Maybe something like:
/* Perform the same remapping to the comdat group. */
if (DECL_COMDAT (new_decl) && DECL_COMDAT_GROUP (old_decl))
DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));
else
DECL_COMDAT_GROUP (new_decl) = DECL_COMDAT_GROUP (old_decl);
in ipa_tm_create_version() and ipa_tm_create_version_alias().