[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
Mon Apr 20 02:39:04 PDT 2020
anchu-rajendran marked 14 inline comments as done.
anchu-rajendran added inline comments.
================
Comment at: flang/lib/Semantics/check-data.cpp:49
+ if (const auto *details{
+ (*symbol).detailsIf<semantics::ObjectEntityDetails>()}) {
+ if (details->commonBlock()) {
----------------
tskeith wrote:
> `symbol->detailsIf`
Thank you for your review comments! I have made the suggested modifications.
================
Comment at: flang/lib/Semantics/check-data.cpp:49
+ if (const auto *details{
+ (*symbol).detailsIf<semantics::ObjectEntityDetails>()}) {
+ if (details->commonBlock()) {
----------------
anchu-rajendran wrote:
> tskeith wrote:
> > `symbol->detailsIf`
> Thank you for your review comments! I have made the suggested modifications.
The code has been changed to check all symbols so the related semantic errors with derived types can be caught.
================
Comment at: flang/test/Semantics/data04.f90:1
+! RUN: %B/test/Semantics/test_errors.sh %s %flang %t
+!Testing data constraints : C876, C877
----------------
kiranchandramohan wrote:
> Can you add some tests with derived types?
Thank you for your suggestions! I have added extra code for handling derived types and tests with derived types for checking constraints related to automatic arrays, use association, allocatable variables and common blocks.
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