https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95970
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> --- I think the warning is a false positive. The problem call is introduced by early inlining and is eliminated by path isolation, but the -Wnonnull warning code runs before that happens (by the post_ipa_warn pass). Here's the relevant portion of the path isolation dump showing the removal: ;; Function Named_type::do_type_descriptor (_ZN10Named_type18do_type_descriptorE P4GogoPS_, funcdef_no=8125, decl_uid=214219, cgraph_uid=3913, symbol_order=4835) Pass statistics of "isolate-paths": ---------------- ... Removing basic block 11 ;; basic block 11, loop depth 0 ;; pred: _20 = MEM[(int (*) () *)_19 + 96B]; _21 = OBJ_TYPE_REF(_20;(struct Type)0B->12) (0B, gogo_9(D), 0B); this_7(D)->seen_alias_ = 0; goto <bb 10>; [100.00%] ;; succ: 10