On Fri, 29 Apr 2022, Jakub Jelinek wrote: > On Fri, Apr 29, 2022 at 01:11:31PM +0200, Jakub Jelinek via Gcc-patches wrote: > > Depends. DECL_IN_CONSTANT_POOL decls can appear 2 ways, through > > tree_output_constant_def which does create a varpool node for them > > and is generally invoked during GIMPLE passes or so, and using > > output_constant_def, which is called during expansion or later and doesn't > > have varpool nodes created unless say alias.cc creates those for them. > > Oh, and one thing I forgot. The constant pool decls can be put into section > anchors, so it is essential that we handle DECL_IN_CONSTANT_POOL decls > there and don't just punt on those.
Ah, OK - that makes sense (maybe we should create varpool nodes at the point we associate them with anchors, or alternatively use the varpool node of the anchor?). Richard.