Skip to content

Commit

Permalink
fix incomplete pattern match
Browse files Browse the repository at this point in the history
  • Loading branch information
langston-barrett authored and Ptival committed Oct 31, 2019
1 parent d66286a commit 0aac9d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/SAWScript/Crucible/LLVM/Override.hs
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ matchArg opts sc cc cs prepost actual expectedTy expected =
(_, Crucible.PtrType _, SetupField () _ _) -> resolveAndMatch
(_, _, SetupGlobalInitializer () _) -> resolveAndMatch

((Crucible.LLVMValInt blk off), _, _) ->
(Crucible.LLVMValInt blk off, _, _) ->
case expected of
SetupVar var | Just Refl <- testEquality (W4.bvWidth off) Crucible.PtrWidth ->
do assignVar cc (cs ^. MS.csLoc) var (Crucible.LLVMPointer blk off)
Expand All @@ -892,6 +892,9 @@ matchArg opts sc cc cs prepost actual expectedTy expected =
addAssert pred_ =<<
notEqual prepost opts (cs ^. MS.csLoc) cc sc cs expected actual

_ -> failure (cs ^. MS.csLoc) =<<
mkStructuralMismatch opts cc sc cs actual expected expectedTy

_ -> failure (cs ^. MS.csLoc) =<<
mkStructuralMismatch opts cc sc cs actual expected expectedTy

Expand Down

0 comments on commit 0aac9d7

Please sign in to comment.