[PATCH] D78424: [flang] Added Semantic Checks for 2 Data constraints and fixed the semantic errors in 3 test cases
Kiran Chandramohan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 20 15:12:52 PDT 2020
kiranchandramohan added a comment.
Thanks for addressing the comments.
Also check the following.
type t1
integer, allocatable :: arr(:)
end type
type(t1) d1
data d1/t1((/0,1/))/
Besides the constraints for the data statement, there are several other points mentioned in the data statement section. Like point 8 in 8.6.7 (test below) which says that the number of variables and data-statement-constants shall be the same. Are these outside the scope of your work? If so, please create a ticket somewhere so that we can come back to it later.
program mn
character(len=3) :: n1, n2
data n1, n2 / 'f18' /
end
================
Comment at: flang/lib/Semantics/check-data.cpp:44
+ "Data Object must not be accessed by host association"_err_en_US);
+ } else if (IsUseAssociated(*symbol, scope)) {
+ context_.Say(name.source,
----------------
kiranchandramohan wrote:
> Should this check fire for the data statement in the following program where the type is defined in a module but the variable itself is not?
> ```
> module dt
> type d
> real r
> end type
> end module
> program test
> use dt
> type(d) :: d1
> data d1%r/2.5/
> end program
> ```
I wasn't sure whether using the type from the module makes the variable d1 a use associated variable. What is your conclusion?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78424/new/
https://reviews.llvm.org/D78424
More information about the llvm-commits
mailing list