https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86441
--- Comment #5 from Boris Kolpackov <boris at kolpackov dot net> --- Sorry, somehow I missed the request for more information. This is happening on the first PLUGIN_OVERRIDE_GATE callback call. I looked thought the GCC source code and it appears free_lang_data happens on one of the IPA passes, so according to my understand, the first PLUGIN_OVERRIDE_GATE should be called before any of the IPA passes. To confirm, I've added a callback for PLUGIN_ALL_IPA_PASSES_END and I can confirm the first PLUGIN_OVERRIDE_GATE happens before that.