https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109453
--- Comment #5 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- Correction, this must be a duplicate of something. With gfortran gcc version 12.2.1 20221121 I get the error. With gfortran gcc version 12.2.1 20230327 it is fixed. As far as I can tell it has been fixed back to version 10 recently. I dont have nything farther back. I am not sure which PR resolved it though. The fix has not made it out to Fedora 37 release yet.