https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88169

--- Comment #11 from kargl at gcc dot gnu.org ---
(In reply to Neil Carlson from comment #9)
> Actually I think the usage in comment 8 is an intentional extension. There
> is a test in the dg test suite that does exactly this if I remember
> correctly. The test was namelist_use.f90. I was told that gfortran will give
> an error if compiled with something like -std=f95. See
> https://github.com/nncarlson/gfortran.dg/issues/3

Yep.  Just found the code in gfc_match_namelist.c that 
indeed accepts the code (-std=gnu is the default standard)
in comment 8.  A quick test with -std=f2003 gives

 gfcx -o z -std=f2003 a.f90 && ./z
a.f90:11:17:

   11 |    namelist /foo/ i
      |                 1
Error: GNU Extension: Namelist group name 'foo' at (1) already is
USE associated and cannot be respecified.

So, AFAICT, the patch in comment 7 fixes the issue.

Reply via email to