Please backport https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=267338 aka https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88561
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=1dfeaca5c52a5a266c7045622362a7c1da0eefc0 commit 1dfeaca5c52a5a266c7045622362a7c1da0eefc0 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-01-29 20:23:04 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-01-29 20:23:04 +0000 8.2.0: backport ipa/devirt bad code generation, bug #676672 Reported-by: Thomas Deutschmann Bug: https://bugs.gentoo.org/676672 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> 8.2.0/gentoo/116_all_ipa-pgo-PR88561-fix.patch | 115 +++++++++++++++++++++++++ 8.2.0/gentoo/README.history | 3 + 2 files changed, 118 insertions(+)
Queued for next gcc-8.2.0 patchset as: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=1dfeaca5c52a5a266c7045622362a7c1da0eefc0 Should be cut within a month. Please check it if works for you meanwhile. Dropping patch to '/etc/portage/patches/sys-devel/gcc:8.2.0/' should be good enough to make it applied to gcc.
Was released with gcc-8.3.0: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c316784999beaf6b9a3699a54aa4e0c27421d7fc