- Annotate the sources with constraint numbers.
- Add tests for
*C7107 (R765) digit shall have one of the values 0 or 1. *C7108 (R766) digit shall have one of the values 0 through 7. *C7109 (R764) A boz-literal-constant shall appear only as a data-stmt-constant in a DATA statement, or where explicitly allowed in 16.9 as an actual argument of an intrinsic procedure.
Details
Diff Detail
Event Timeline
flang/test/Semantics/boz-literal-constants.f90 | ||
---|---|---|
35 | Seems like this 8.6.7(11) was missing a test. "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)? | |
49 | Is error below a more proper one? Typeless (BOZ) not allowed for both 'i=' & 'j=' arguments. 16.9.65(3)
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. |
Thanks for working on this!
Please update the messages and the test results. Also, please add a reference to C7109 in the source code where that constraint is enforced.
flang/test/Semantics/boz-literal-constants.f90 | ||
---|---|---|
35 | I suspect that the error message produced in this instance changed when I committed the fix for D83917. In that change, I give the normally typeless BOZ literal constants the type INTEGER. The new error message seems OK to me, but you should update the test results. | |
49 | I would say: Typeless (BOZ) not allowed for either 'i=' & 'j=' arguments. |
flang/test/Semantics/boz-literal-constants.f90 | ||
---|---|---|
49 | I think @sameeranjoshi's version of this message is right. They can't both be BOZ literals but either one can be. |
flang/test/Semantics/boz-literal-constants.f90 | ||
---|---|---|
49 | Good catch, Tim. I just re-read the standard, and you're correct. |
Seems like this 8.6.7(11) was missing a test.
Current llvm-trunk flang outputs below error:
Is the error (with this patch) expected to be printed here(i.e is that getting ignored due to above error)?