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

    <tr>
        <th>Summary</th>
        <td>
            [flang] Default value of ROUND= specifier in OPEN statement
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            question,
            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:
```
    character(18) :: r_mode
    real :: rd1, rd2

    open(2, file='roundR4ReadEdit02.dat', action='read')

 read(2, '(RC, f6.5, g7.5)', round="up") rd1, rd2

    inquire(2, round=r_mode)

print*, r_mode
    end
```

Flang outputs `NEAREST`, but both gfortran and XLF outputs `PROCESSOR_DEFINED`. 

The standard indeed says the default value of the `ROUND=` specifier is processor dependent when it is omitted from the OPEN statement. 
```
If this specifier is omitted in an OPEN statement that initiates a connection, the input/output rounding mode is processor dependent; it shall be one of the above modes.
```

However, is it by design, and that is different from other compilers?
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx0VF2PozYU_TXm5WojYyAJDzxkIagrVTOrzFbq28rgS3BlbNa-ZDT_vjIk2-m0KyFZuh_n-txzsAxBXy1ixYrPrGgSudDofNVIq9HU9Yg26Zx6q2png1bogUaEwRnjXrW9Qu8UsuzE-Int-f3jJwCAfpRe9oSeiWN6ZKKEWJedwH-fYtNW5VGanwmVMlGDVyLCbXk3o2XiKGJi0AZZ1jBx8G6x6pJfUKqz0sTFTkli4hCrZE_a2XsdSrWGyzviFtjg1sTxUq_Q-10Rz-shnuUdah2zIollZkJEEv93SW1_LNrjA_jRdif6GD57bYmJ01ryfgdo1Yf9MX5qjbRXcAvNCwVge_50Pl3OL99igaihWwg6RyNcB-fJSwvSKvjz9_Z9y9fLc31-eXm-fG_O7Zenc8P2fAcb_rcRIZC0SnoF2ipEBUG-hVVfhYNcDMFNmgXBDWuQ7fnl-Y-nJi5kzyHM2OtBowcdYPauxxCcB4UzWoWW4HVEC5pi2k2aCBUM3k0r1vPX81McTzihpe1O7_h_iRN1-PeMB4iOXD8gAI2SQFtNWhIGkNA7a3GzgqjXmdrOCzHRbgvaVIoWjkr8ggPLPkcGYZTGQIfg7M9tyM7dcO0Nu_-q95t7xVu0fh2RNUH3Bgrjn7Za1Kr7hQMoPQzoI4V1OY5G9NC7adYGfWBZm6gqU2VWygSr9FAUe14eRZ6MlTwUHces7wcshSwOaY5cil4WZT7k8oCJrgQXBT-mZZqJLM93h2O6Hwaeyn2fC5EKlnOcpDY7Y27TzvlrokNYsEqLPMuyxMgOTVgfBiF-LBi2bUaPMyGGaFCWnfxiSU8Y40WT-CpifeqWa2A5NzpQ-AedNJn1odl6iwaaj0Z7OOy99B_FThZvqpFoDvHhEC0T7VXTuHS73k1MtHHe_fg0e_cX9lH2lVpgor2zu1Xi7wAAAP__MOSNXA">