[flang][NFC] Document ALLOCATE/DEALLOCATE error semantics (#153027)
This compiler stops an ALLOCATE/DEALLOCATE statement with multiple variables after encountering a recoverable error to avoid the risk of ambiguity in the case of multiple errors. Document.
This commit is contained in:
parent
442ae603c5
commit
7a13a756d6
@ -900,6 +900,16 @@ print *, [(j,j=1,10)]
|
||||
since these default values need to be available to process incomplete
|
||||
structure constructors.
|
||||
|
||||
* When an `ALLOCATE` or `DEALLOCATE` statement with multiple variables
|
||||
has a `STAT=` specifier that allows the program to continue execution
|
||||
after an error, the variables after the one with the error are left
|
||||
deallocated (or allocated). This interpretation allows the program to
|
||||
identify the variable that encountered the problem while avoiding any
|
||||
ambiguity in the case of multiple errors with distinct status codes.
|
||||
Some compilers work differently; for maximum portability, avoid
|
||||
`ALLOCATE` and `DEALLOCATE` statements with error recovery for
|
||||
multiple variables.
|
||||
|
||||
## De Facto Standard Features
|
||||
|
||||
* `EXTENDS_TYPE_OF()` returns `.TRUE.` if both of its arguments have the
|
||||
|
Loading…
x
Reference in New Issue
Block a user