https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56785
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> --- Created attachment 32994 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32994&action=edit stop the inheritance recursion at the last element This fixes all the issues mentioned here