[PATCH] D84504: [flang]Verify C7107, C7108, C7109 from - Clause 7 constraint checks for f18.

sameeran joshi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 24 04:20:51 PDT 2020


sameeranjoshi marked an inline comment as done.
sameeranjoshi added inline comments.


================
Comment at: flang/test/Semantics/boz-literal-constants.f90:35
+  data f / Z"AA" / ! OK
+  ! ERROR: BOZ literal should appear in a DATA statement only as a value for an integer object, but 'rescmplx' is 'COMPLEX(4)'"
+  data rescmplx / B"010101" /
----------------
Seems like this `8.6.7(11)` was missing a test.
Current llvm-trunk flang outputs below error:
```
"DATA statement value could not be converted to the type 'COMPLEX(4)' of the object 'rescmplx'"
```
Is the error (with this patch) expected to be printed here(i.e is that getting ignored due to above error)?


================
Comment at: flang/test/Semantics/boz-literal-constants.f90:49
+
+  !ERROR: Typeless (BOZ) not allowed for 'i=' argument
+  dbl = DSHIFTL(B"0101",B"0101",2)
----------------
Is error below a more proper one?
```
Typeless (BOZ) not allowed for both 'i=' & 'j=' arguments.
```
16.9.65(3)
> J shall be of type integer or a boz-literal-constant. If both I and J are of type integer, they shall have the same kind type parameter. I and J shall not both be boz-literal-constants

restricts variables I and J when both are `boz-literal-constants`, whereas the current error with flang trunk assumes 'i' to be wrong, and which might not give proper information to the user.



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84504/new/

https://reviews.llvm.org/D84504





More information about the llvm-commits mailing list