https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117440
--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
When processing covariant return thunk to g::f() const which is expanded to
gimple we get stuck on:
# .MEM_6 = VDEF <.MEM_4(D)>
g::*.LTHUNK0 (this_5(D));
It fails on sanity check of EAF flags:
/* Check that flags seems sane: if function does not read the parameter
it can not access it indirectly. */
gcc_checking_assert (!(f & EAF_NO_DIRECT_READ)
|| ((f & EAF_NO_INDIRECT_READ)
&& (f & EAF_NO_INDIRECT_CLOBBER)
&& (f & EAF_NO_INDIRECT_ESCAPE)
&& (f & EAF_NOT_RETURNED_INDIRECTLY)));
The f & EAF_NO_DIRECT_READ is true but f & EAF_NO_INDIRECT_CLOBBER is false.
So I need to figure out where NO_INDIRECT_CLOBBER got cleaned.