https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61510
--- Comment #3 from jgreenhalgh at gcc dot gnu.org --- Created attachment 32975 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32975&action=edit Reduced testcase. Adding a reduced testcase for this bug. Honza: To answer your question, if I add gcc_assert (origin_node) before the dereference, it triggers - so in my case we definitely do have a NULL origin_node. If I dump decl, DECL_ABSTRACT_ORIGIN (decl) the results look "sane" (I think)... decl: full-name "std::scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs>::scoped_allocator_adaptor() [with _OuterAlloc = std::allocator<short int>; _InnerAllocs = {}]" pending-inline-info 0x7f32a2507ab0 template-info 0x7f32a2362680 DECL_ABSTRACT_ORIGIN: full-name "std::scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs>::scoped_allocator_adaptor() [with _OuterAlloc = std::allocator<short int>; _InnerAllocs = {}]" pending-inline-info 0x7f32a2507990 template-info 0x7f32a2362680 cgraph_get_node (DECL_ABSTRACT_ORIGIN (decl)) == (nil)