[PATCH] D78424: [flang] Added Semantic Checks for 2 Data constraints and fixed the semantic errors in 3 test cases

Anchu Rajendran S via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 22:14:50 PDT 2020


anchu-rajendran added a comment.

In D78424#1993281 <https://reviews.llvm.org/D78424#1993281>, @kiranchandramohan wrote:

> Thanks for addressing the comments.
>
> Also check the following.
>
>   type t1
>    integer, allocatable :: arr(:)
>   end type
>   type(t1) d1
>   data d1/t1((/0,1/))/
>   


The current revision does not catch this error. I dont think this case is covered under the Constraint C876 (or C877)
C876 says a variable whose designator appears as a data-stmt-object shall not be an allocatable variable . This means `d1` cannot be an allocatable (and it does not say anything about the fields of `d1`). In this case, `d1` is not.


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