Issue |
154557
|
Summary |
[flang] Incorrect SIGN= default value.
|
Labels |
flang:runtime
|
Assignees |
|
Reporter |
DanielCChen
|
Consider the following code:
```
character*17 sign_mode
open(5, file='sign03.tmp')
inquire (5, sign=sign_mode)
close(5)
print*, sign_mode
if (sign_mode .ne. "PROCESSOR_DEFINED") ERROR STOP 1
end
```
Flang outputs `SUPPRESS`, but the standard explicitly says
```
If this specifier is omitted in an OPEN statement that initiates a connection, the default value is PROCESSOR_DEFINED.
```
And further explains the reason being
```
When the sign mode is PROCESSOR_DEFINED, the processor has the option of producing a plus sign or not in such positions, subject
to 13.7.2(5).
```
Because `SUPPRESS` is not subject to `13.7.2(5)`, the default value of `SIGN=` should be set to `PROCESSOR_DEFINED`.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs