[flang-commits] [flang] ffdb5f9 - [flang] add missing unreachable in D139179

Jean Perier via flang-commits flang-commits at lists.llvm.org
Fri Dec 2 05:50:25 PST 2022


Author: Jean Perier
Date: 2022-12-02T05:46:22-08:00
New Revision: ffdb5f951c8fde9540d7c52d3403bf8520e764a4

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

LOG: [flang] add missing unreachable in D139179

Fix bot failure https://lab.llvm.org/buildbot/#/builders/160/builds/13647
caused by https://reviews.llvm.org/D139179.

Even if the switch is fully covering, adding an unreachable after is
required to cover all path since the switch argument could be a broken
value that does not belong to the enum.

Added: 
    

Modified: 
    flang/lib/Lower/ConvertExprToHLFIR.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/ConvertExprToHLFIR.cpp b/flang/lib/Lower/ConvertExprToHLFIR.cpp
index 6eeafffe7942..5a29f9d73412 100644
--- a/flang/lib/Lower/ConvertExprToHLFIR.cpp
+++ b/flang/lib/Lower/ConvertExprToHLFIR.cpp
@@ -479,6 +479,7 @@ struct BinaryOp<Fortran::evaluate::LogicalOperation<KIND>> {
       // lib/evaluate expression for .NOT. is Fortran::evaluate::Not<KIND>.
       llvm_unreachable(".NOT. is not a binary operator");
     }
+    llvm_unreachable("unhandled logical operation");
   }
 };
 


        


More information about the flang-commits mailing list