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

    <tr>
        <th>Summary</th>
        <td>
            [flang] The result value of the `SIZE=` specifier in READ
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            question,
            flang:frontend
      </td>
    </tr>

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

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

<pre>
    Consider the following code.
```
    character(13) c
    real r1(3), r2(3)
 integer i1, i2
 
    c = '1.2, 1.2, 1.2'
 
    write (2, '(2a)') c, ' '
 
    write (3, '(2a)') c, ','
 
    rewind 2
    rewind 3
 
    read (2, '(3F5.1)', advance='no', size=i1) r1
print*, i1
 
    read (3, '(3F5.1)', advance='no', size=i2) r2
print*, i2
 
    end
```

XLF returns 
```
12
11
```
Because we count the blanks but not the comma. So the first read is 3 records of  `1.2 ` that has 4 characters. The 2nd read is 3 records with the first two being `1.2 ` and the 3rd one `1.2` (without blank because of the comma appended.
gfortran is consistent with XLF.

ifort outputs
```
14
14
```
ifort seems count everything including blanks and the commas.

Flang outputs
```
9
14
```
It seems inconsistent to me.

I am clarifying with J3, but it seems comma should not be part of the input field.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJycVE2P4zYM_TXKhVhDpmwnOfiQTTbAFHvq9rDoTbboWK0ipfpIMP31hWynkwlmeigQRDYp8vE9k5Qh6JMlaln9ldWHlUxxdL49SKvJ7Pcj2VXn1Gu7dzZoRR7iSDA4Y9xN2xP0TlHB-I41fPnxHQBAP0ov-0ie4aYUDLfQLx5P0oAvGW6ymeEePN5f-A60jXQiD7rMLo3Zds8JTByA4bosMDsfj_XDvZvXkYDhZnJnH25QTmDruZLZDJ-Eif8OY7h_H-jppq0CfP8q3t2Q6qkgcayL8p58D1Jdpe2JiQPDtXWLNei_sylrsc2a8d3FaxsZ7iZxyg8gxP-EwAkCnyEe9Sernr4047uf34_gKSZvAzx5yxxclk_Wr9TLFAhuBL1LNk4N1Rlp_wzQpQjWzabenc-ygB9u7jjtQ5xJ6gACPPXOqwBuAGANLwvMB8RRRhhlgOqtA0MBv40EaNUH8TcdxweAeHPQUW7sh6TSqumK8AqcpcWVPQw3OYFLcWYA3ULODW8cQF4uZBWpPCenwfnopc1V9HmkQiQb5zJ-fj8Ws6g63wKX4iXF8Kxqdf97tM4RgegcFlnpSv41jpmLtr1JKj8tOt8ZTfWFBfRopD19Arr9CPPlDqjtA5Xo4ExLyheQZ-iN9Hp4zfATzV-mFs2fWr9VnHUKo0tGTQ3QEVxklmDWUdtLijBoMqpYqVaordjKFbXluq5x3fCyXo2tkFR1VSel4LzjVVOJtRRYl2oz4LYUYqVb5FjzTVmXTcXLutgKiQ02NTa96iq-ZRWns9SmMOZ6Lpw_rXQIidqyFhvBV0Z2ZMK0KBH_ShSidpYhTgsBhywfE7vBOxvzqCDmferbnOxLl06BVdzoEMNb-qijmTbvHFwfpk71FJKJcJUm_dtJrOE_Xn7_loe34RAu1OtB5zVp4ddvu8MqedOOMV4CEzuGR4bHk45j6orenRkeM-JyfLl49wf1keFxYhcYHheC1xb_CQAA__-598FK">