https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119136
--- Comment #5 from anlauf at gcc dot gnu.org --- F2023 still has: 12.12 Restrictions on input/output statements (2) An input/output statement that is executed while another input/output statement is being executed is a recursive input/output statement. A recursive input/output statement shall not identify an external unit that is identified by another input/output statement being executed except that a child data transfer statement may identify its parent data transfer statement external unit.