https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106295
--- Comment #4 from anlauf at gcc dot gnu.org --- I think the fix for PR83036 (INQUIRE specifier NEXTREC is a 4-byte integer, should be 8), which changed the layout of struct st_parameter_inquire, could explain what you observe. I have no solution to your problem other than recommending not doing what you did: mix vastly different compiler versions with legacy code. You would have been warned if you used modern Fortran with modules. I bet that most other compilers require (recommend or advise) recompilation of legacy code without explaining in detail which intrinsic might be affected.