https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98686
Bug ID: 98686 Summary: Namelist group objects shall be defined before appearing in namelist for -std=f2018 Product: gcc Version: fortran-dev Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: anlauf at gcc dot gnu.org Target Milestone: --- The following code is silently accepted even with -std=f95 ... -std=2018: implicit none namelist /NML/ x, m, q real :: x, m integer :: q x = 1.0 m = 2.0 q = 3 write(*, nml=NML) end It is properly rejected by NAG, and leads to fun with ifort, depending on the -stand setting.