<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/151756>151756</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [flang] NML: multiple name-value subsequences stopped reading the next item.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            flang:runtime
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          DanielCChen
      </td>
    </tr>
</table>

<pre>
    Consider the following code:
```
module m
   type base
      integer(4)   :: i(3) = (/ 9, 9, 9 /)
   end type

   type, extends(base) :: child
 real(4)      :: r(3) = (/ 9.0, 9.0, 9.0 /)
   end type

   type, extends(child) :: gen3
      character(3) :: c(3) = (/ 'xxx', 'xxx', 'xxx' /)
   end type
end module

program input104a
   use m

   integer :: stat
   character(150) :: msg = 'original'
   procedure(logical) :: precision_r4
   type(child)               :: b1
   type(child), pointer :: b2
   type(gen3)                :: b3
   type(gen3), allocatable   :: b4

   namelist /n1/ b1, b2, b3, b4

   allocate(b2,b4)

   open (1, file='input104a.1', form='formatted', access='sequential', blank='zero' )

 read (1, n1, iostat = stat, iomsg = msg)
   if ( ( stat /= 0 ) .or. ( msg /= 'original' ) ) ERROR STOP 1

   print *, b1
   print *, b2
   print *, b3
   print *, b4

end program
```

The input file `input104a.1` is
```
 &n1
 b1= 2, 4, 6, 8.0, 10.0,
 b1%i=    ,
 b2=1,12,1*,
 b2= ,
 b3%c= 'abc', b3= 3,6,9,12.0,15.0,18.0,
 b4= , , , 4.0, 8.0, 12.0, ,
 /
```

It seems line `b1%i=   ,` and `b2=,` stopped Flang from reading the next name-list-group-object.

Flang outputs:
```
> a.out
 2 4 6 8. 10. 9.
 9 9 9 9. 9. 9.
 9 9 9 9. 9. 9. xxxxxxxxx
 9 9 9 9. 9. 9. xxxxxxxxx
```

Expected output is (after I removed those mentioned two lines from the input file.)
```
> a.out
 2 4 6 8. 10. 9.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