https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99526
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- https://github.com/FRRouting/frr/tree/master/tools/gcc-plugins https://github.com/FRRouting/frr/blob/master/tools/gcc-plugins/gcc-retain-typeinfo.patch seems like the patch which will fix this.