https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107068
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Component|fortran |libfortran Last reconfirmed| |2022-09-28 --- Comment #2 from anlauf at gcc dot gnu.org --- Confirmed. Renaming the second variable (e.g. flp -> xlp) works around the problem, as well as interchanging the lines in the namelist input. It appears that while scanning the namelist input we first see the T, then F, for which we try to determine if it means .false. or is part of a variable name, and then possibly screw up because we see a comma when referring to an element of rank-2 array flp. There is also no error when using a rank-1 array for flp and referring to flp(2) etc.