[flang-commits] [PATCH] D113307: flang] Fix crash in semantic error recovery situation
    Peter Klausler via Phabricator via flang-commits 
    flang-commits at lists.llvm.org
       
    Fri Nov  5 12:28:43 PDT 2021
    
    
  
klausler created this revision.
klausler added a reviewer: PeteSteinfeld.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.
[A CHECK() in semantics is triggering when analyzing a program
with an undefined derived type pointer because the CHECK is
expecting a new error message to have been issued in a function
but not allowing for the case that a diagnostic could have been
produced earlier.  Adjust the predicate.
https://reviews.llvm.org/D113307
Files:
  flang/lib/Semantics/expression.cpp
Index: flang/lib/Semantics/expression.cpp
===================================================================
--- flang/lib/Semantics/expression.cpp
+++ flang/lib/Semantics/expression.cpp
@@ -1916,7 +1916,7 @@
           "Base of procedure component reference is not a derived-type object"_err_en_US);
     }
   }
-  CHECK(!GetContextualMessages().empty());
+  CHECK(context_.AnyFatalError());
   return std::nullopt;
 }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113307.385152.patch
Type: text/x-patch
Size: 423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211105/6d330aba/attachment.bin>
    
    
More information about the flang-commits
mailing list