This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

namelist problem


$ cat test.f95
program test_namelist
      call test1
      contains
         subroutine test1()
             real :: array(6)
             namelist /list/array
             read (*, nml=list)
             write (*, nml=list)
end

$ gfortran test.f95
$ ./a.out
&list array(1:5)=1.5

output
$ &LIST
 ARRAY=  1.500000    ,  0.000000    , 2.5253750E-29, 1.4012985E-45,
1.5694543E-43,    131089.0    ,  /

Shouldn't this set all the elements of array(1:6)=1.5, instead of just
the first element? This looks like a bug to me.

Thanks,

Uttam


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]