https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79937
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 43577 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43577&action=edit gcc8-pr79937.patch My #c8 patch doesn't work at all, but this one at least fixes the two testcases (but indeed doesn't fix one where bar returns X rather than C).