https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105171
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think there might be a way to check if the option -frandom-seed was passed and that might be a better option for your usage anyways. You should check the options handling code.