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

    <tr>
        <th>Summary</th>
        <td>
            [flang] flang-new vs gfortran (advance= specifier)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          k-arrows
      </td>
    </tr>
</table>

<pre>
    Test codes:
https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gfortran.dg/advance_5.f90
https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gfortran.dg/advance_6.f90

If you use gfortran, the result is the following:
```console
$ gfortran advance_5.f90
$ ./a.out
$

$ gfortran advance_6.f90
$ ./a.out
$
```
On the other hand, if you use flang-new, the result is the following:
```console
$ flang-new -flang-experimental-exec advance_5.f90
$ ./a.out
Fortran STOP: code 1

$ flang-new -flang-experimental-exec advance_6.f90
$ ./a.out

fatal Fortran runtime error(./advance_6.f90:66): End of file during input
Aborted
```

Tested version:
```console
$ gfortran --version
GNU Fortran (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

$ flang-new --version
flang-new version 16.0.0 (https://github.com/llvm/llvm-project.git 83d4851436904c005ff0831e38e1814a0a8f00ac)
Target: x86_64-unknown-linux-gnu
Thread model: posix
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VEtv4zYQ_jXUhZBAUu-DDm5dFb00BZqcA0oaStzQpMGH7Vz2ty8k-ZHNBtkECyxg0JoZcub7Pg6HOydHDdCg_A-UbyMe_GRs8xRza83RRZ0Znpt7cB73ZgCH0g0iW0Q2k_f7xWItYu0o_RS6pDe72ej7eCetNXY1EGs7ZTrE2h13Hm5eD867ID3MHmGst1wnw4hYy4cD1z085omoye8sWNwKrus_Aj-bgIMDfDmB2J_YT4AtuKA8lm6xhFHKHKUerxKhgqy_3mhnFJy9LLtmwm_wnOPJjCgxwV9dLyG9maH4YIYLptW80wt24yeweOJ6mLnJG2WhuB5jDcdf53xNheP1E057sHIH2nMVwwn6D6rRnpn_f3_3H0o3S19i-lqgT5T7iXTLKrjnCl9K26C93AGGteeq5IcOSjdFgVg94_tLD9gILKQCPAQr9Yil3l_SbzpjPQxv3s66zo8PBnwA66TRn-muOL4cWmJ___twZYBY9dAF7QOmNEkTEtOwmPQrYwnJEKvPgXd0_T77LXB2Y1okJCFzqXferlKHy1-8t-YL9D4ZpcdVOmRVTrO0qEnWE5ILQaqUQloBrWjGCa8EIbyfRV5l4nYEPwt-qorHIouDftLmqGMldTjFow7nfZMFPuCdGUDNu_fGydMrSaOhSYc6rXkEDS1KlpWEkiqamoF0rOuKvBR1zSueVVmac8brUpQpF4xGsmGEMcpSSkpCsyoBAgAF5yxjJC-zHGUEdlyqZGacGDtG0rkATV6XBY0U70C5yyy2zSJLF0aHMqKk8-52zEuvlqm9CI_y7YurObhbEyBWnVsTpVvs9tBLIeeZWEfBquZzV4NYu8B1iLUL4m8BAAD___Ii5tI">