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

            Bug ID: 109099
           Summary: Assignment in NAMELIST input does not fill in
                    row-column order
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: urbanjost at comcast dot net
  Target Milestone: ---

program testit
integer, allocatable :: x(:,:); namelist / group / x
character(len=80) :: input(3)
   allocate( x(3,4),source=999)
   input=[&
   "&group          ",&
   " x(2,3)=1,2,3,4,",&
   "/               "]
   read( input, nml=group)
   write(*,group)
end program testit


gfortran 12.2 generating
 &GROUP X= 7*999 ,1 ,2 ,999 ,3 , 4 , /
should be
 &GROUP X = 7*999, 1, 2, 3, 4, 999 /

The values on the RHS are not stored in row-column order starting at the
specified address, instead they are stored in row-column order till the end of
the column and then continued at the same row as the address instead of the top
row. So if the row of the starting address is one it looks OK. They way I read
the description of NAMELIST group input it should just fill in a contigious
section of values (?)

Reply via email to