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

peter klausler via flang-commits flang-commits at lists.llvm.org
Tue May 25 10:37:31 PDT 2021


Author: peter klausler
Date: 2021-05-25T10:37:22-07:00
New Revision: d3495ffa5ebaa0956adce1574454b387769931f6

URL: https://github.com/llvm/llvm-project/commit/d3495ffa5ebaa0956adce1574454b387769931f6
DIFF: https://github.com/llvm/llvm-project/commit/d3495ffa5ebaa0956adce1574454b387769931f6.diff

LOG: [flang] Fix recent regression (proc. dummy arg on ENTRY)

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.

Differential Revision: https://reviews.llvm.org/D103098

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/flang/lib/Semantics/resolve-names.cpp b/flang/lib/Semantics/resolve-names.cpp
index 2820ab62922e8..7b4da25f94d55 100644
--- a/flang/lib/Semantics/resolve-names.cpp
+++ b/flang/lib/Semantics/resolve-names.cpp
@@ -3082,11 +3082,11 @@ void SubprogramVisitor::Post(const parser::EntryStmt &stmt) {
                       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 {


        


More information about the flang-commits mailing list