https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61558
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #13 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Jan Hubicka from comment #12) > the problem here is that grokdeclarator call set_decl_tls_model on variable > that is uninstantiated template. > this triggers creation of symbol node for it that is not correct, because > uninstantiated var decls do not correspond to any variables. Right. And this wasn't a problem when the TLS model was stored in the DECL. > I guess similar case may be triggered by section attribute. I would think so; it's just less common. > I wonder if there is reasonably easy way to avoid setting these properties on > DECLs that are not real variables/functions. I suppose the front end could use a different encoding for these properties in templates than in non-templates. Annoying, but probably not that hard. > Other alternative would be to arrange symtab_node::real_symbol_p > to return false on those and make them to bypass assembler name hash. Is > there a way to recognize them from a middle-end? Not currently, I think; perhaps it would make sense to set DECL_ABSTRACT_P on them.