[flang-commits] [PATCH] D84290: [Flang] Fix for the scenario when type guard has intrinsic type specification and Selector is NOT unlimited Polymorphic.

Inderjeet via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Jul 27 06:50:55 PDT 2020


inderjeet-hcl marked 2 inline comments as done.
inderjeet-hcl added a comment.

Kindly check reply inline.



================
Comment at: flang/lib/Semantics/check-select-type.cpp:77
+    const parser::TypeGuardStmt &typeGuardStmt{stmt.statement};
+    const auto &guard{std::get<parser::TypeGuardStmt::Guard>(typeGuardStmt.t)};
     return std::visit(
----------------
sameeranjoshi wrote:
> Can you please use `GetGuardFromStmt` here? 
ok, I will update source code.


================
Comment at: flang/test/Semantics/selecttype01.f90:131
   select type (a => x)
+  !ERROR : Intrinsic type specification must not be specified
   type is (integer)
----------------
sameeranjoshi wrote:
> Is this error correct? 
> I see `check-flang` failing for both the files.
> Did you verify `check-flang` before submitting this patch?
> 
sorry, I was not aware of the option check-flang. I will test it before submitting updated files.

Error seems correct, selector should be unlimited Polymorphic in case of Intrinsic type specification.
Function ReportConflictingTypeCases is generating 'INTEGER*4' in error message instead of 'integer' which is specified in test case. Do you have any idea how to update function ReportConflictingTypeCases to display correct name ?


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

https://reviews.llvm.org/D84290





More information about the flang-commits mailing list