[PATCH] D101126: [flang] Check for attributes specific to dummy arguments
Tim Keith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 23 07:19:17 PDT 2021
tskeith accepted this revision.
tskeith added inline comments.
This revision is now accepted and ready to land.
================
Comment at: flang/test/Semantics/resolve58.f90:78
+ real, optional :: local3
+ !ERROR: OPTIONAL attribute can only be used for dummy arguments
+ procedure(), optional :: p2
----------------
There are already checks for the VALUE attribute, but the message is worded differently. It would be better if they were consistent.
```
t.f90:2:21: error: VALUE attribute may apply only to a dummy argument
integer, value :: x
^
t.f90:3:24: error: OPTIONAL attribute can only be used for dummy arguments
integer, optional :: y
^
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101126/new/
https://reviews.llvm.org/D101126
More information about the llvm-commits
mailing list