> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98330 > > --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- > So modref allocates a fnspec_summary for an unknown indirect call (NULL > callee) > but then in compute_parm_map calls function_or_virtual_thunk_symbol on > that NULL callee unconditionally. We have a meaningful fnspec for the > call because the call type has a 'fn spec' attribute attached. > > So I'm proposing the following which avoids the ICE (and undefined behavior > calling a member fn on a NULL object)
That looks OK. We do not expect fnspecs on types of indirect calls (we probably should, I just did not expected them to exist) but then we can always recover them from type. I suppose we do not need per-call-stmt sensitive fnspec attributes on indirect calls, right? Honza