The following should be illegal:

$ cat namelist-1.f90
program main
  integer, dimension(2) :: i
  i = 2
  call foo(i)
contains
  subroutine foo(i)
    integer :: i(:)
    namelist /bar/ i
    write (*,bar)
  end subroutine foo
end program main
$ gfortran namelist-1.f90
$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1/configure --prefix=/home/ig25
--enable-languages=c,f95 : (reconfigured) ../gcc-4.1/configure
--prefix=/home/ig25 --enable-languages=c,f95
Thread model: posix
gcc version 4.1.0 20050726 (experimental)

This is actually a testcase in gfortran.dg/namelist_14.f90 ,
which would need to be fixed.

-- 
           Summary: namelist can't contain an assumed size array
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: accepts-invalid, diagnostic
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23152

Reply via email to