https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86441
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- is your plugin called before *free_lang_data pass is happening? Because if it is not, then most if not all of the front-end specific data has been removed from the types which is why you might be getting a crash.