https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85734
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> --- There is function_always_visible_to_compiler_p which should disable this sort of warning. So I suppose we want to test it prior warning about malloc attribute?