[flang-commits] [PATCH] D103098: [flang] Fix recent regression (proc. dummy arg on ENTRY)

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue May 25 09:29:22 PDT 2021


klausler created this revision.
klausler added a reviewer: jeanPerier.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.

A recent fix for problems with ENTRY statement handling didn't
get the case of a procedure dummy argument on an ENTRY statement
in an executable part right; the code presumed that those dummy
arguments would be objects, not entities that might be objects or
procedures.  Fix.


https://reviews.llvm.org/D103098

Files:
  flang/lib/Semantics/resolve-names.cpp


Index: flang/lib/Semantics/resolve-names.cpp
===================================================================
--- flang/lib/Semantics/resolve-names.cpp
+++ flang/lib/Semantics/resolve-names.cpp
@@ -3082,11 +3082,11 @@
                       dummy->name(), "Previous declaration of '%s'"_en_US);
                 }},
             dummy->details());
-      } else if (inExecutionPart_) {
-        dummy = &MakeSymbol(*dummyName, ObjectEntityDetails{true});
-        ApplyImplicitRules(*dummy);
       } else {
         dummy = &MakeSymbol(*dummyName, EntityDetails{true});
+        if (inExecutionPart_) {
+          ApplyImplicitRules(*dummy);
+        }
       }
       entryDetails.add_dummyArg(*dummy);
     } else {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103098.347707.patch
Type: text/x-patch
Size: 722 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210525/fff65cba/attachment.bin>


More information about the flang-commits mailing list