Issue |
154333
|
Summary |
[flang] Default value of ROUND= specifier in OPEN statement
|
Labels |
question,
flang:runtime
|
Assignees |
|
Reporter |
DanielCChen
|
Consider the following code:
```
character(18) :: r_mode
real :: rd1, rd2
open(2, file='roundR4ReadEdit02.dat', action=""
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?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs