From 8d4ea7263f4f5c0ad2ba06749a04198c84e58689 Mon Sep 17 00:00:00 2001 From: Troels Henriksen Date: Thu, 2 Feb 2023 12:17:21 +0100 Subject: [PATCH] Catch this error. --- src/Futhark/Pass/Flatten.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Futhark/Pass/Flatten.hs b/src/Futhark/Pass/Flatten.hs index 31658db74a..24e487d1d2 100644 --- a/src/Futhark/Pass/Flatten.hs +++ b/src/Futhark/Pass/Flatten.hs @@ -359,6 +359,8 @@ transformDistBasicOp segments env (inps, res, pe, aux, e) = i <- letExp "i" =<< toExp (pe64 o' + flat_i) pure (i, v') pure $ insertIrregular shape flags offsets (distResTag res) elems' env + | otherwise -> + error "Flattening update: destination is not input." _ -> error $ "Unhandled BasicOp:\n" ++ prettyString e where scalarCase =