https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95719
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-8 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:4ccd63f07dc85911e4c76b350cdc19daeee7284a commit r8-10932-g4ccd63f07dc85911e4c76b350cdc19daeee7284a Author: Jason Merrill <ja...@redhat.com> Date: Tue Jun 23 21:25:21 2020 -0400 c++: Fix ICE with using and virtual function. [PR95719] conversion_path points to the base where we found the using-declaration, not where the function is actually a member; look up the actual base. And then maybe look back to the derived class if the base is primary. gcc/cp/ChangeLog: PR c++/95719 * call.c (build_over_call): Look up the overrider in base_binfo. * class.c (lookup_vfn_in_binfo): Look through BINFO_PRIMARY_P. gcc/testsuite/ChangeLog: PR c++/95719 * g++.dg/tree-ssa/final4.C: New test. (cherry picked from commit 710df943389a854ef00c15ed0ad219b41db236aa)