http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49568
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> 2011-07-01 21:10:46 UTC --- (In reply to comment #6) > + DECL_COMDAT (node->decl) = DECL_COMDAT (decl_node->decl); > if (DECL_ONE_ONLY (decl_node->decl)) > { > - DECL_COMDAT (node->decl) = DECL_COMDAT (decl_node->decl); Looks good to me. > Jason, the whole code copying visibilities to thunk decls is just a hack. Do > you think you can make C++ FE to put proper visibility flags on thunks and > same body aliases? I can certainly copy some flags across. But it seems rather cumbersome to have to manage same_comdat_group in the front end. There's also the issue that in order to set DECL_COMDAT_GROUP (and thus DECL_ONE_ONLY) we need to build the mangled name for the main decl which otherwise might not be needed.