http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53042
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-19 14:09:20 UTC --- Patch: Index: gcc/symtab.c =================================================================== --- gcc/symtab.c (revision 186594) +++ gcc/symtab.c (working copy) @@ -537,10 +537,23 @@ verify_symtab_base (symtab_node node) { symtab_node n = node->symbol.same_comdat_group; - if (!DECL_ONE_ONLY (n->symbol.decl)) + if (SUPPORTS_ONE_ONLY) { - error ("non-DECL_ONE_ONLY node in a same_comdat_group list"); - error_found = true; + if (!DECL_ONE_ONLY (n->symbol.decl)) + { + error ("non-DECL_ONE_ONLY node in a same_comdat_group list"); + error_found = true; + } + } + else + { + if (!DECL_COMMON (n->symbol.decl) + && !DECL_WEAK (n->symbol.decl)) + { + error ("non-DECL_COMMON / DECL_WEAK node in a same_comdat_group " + "list"); + error_found = true; + } } if (n->symbol.type != node->symbol.type) {