From a8958f2c7eeebafa198d45359146a2e1649107a1 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Sat, 10 Feb 2018 20:58:11 -0600
Subject: [PATCH] Check value of enforce_variable_access_ordered option

---
 loopy/check.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/loopy/check.py b/loopy/check.py
index 7f56a76ee..0a52044a6 100644
--- a/loopy/check.py
+++ b/loopy/check.py
@@ -452,6 +452,14 @@ def check_variable_access_ordered(kernel):
     * an explicit statement that no ordering is necessary (expressed
       through :attr:`loopy.Instruction.no_sync_with`)
     """
+    if kernel.options.enforce_variable_access_ordered not in [
+            "no_check",
+            True,
+            False]:
+        raise LoopyError("invalid value for option "
+                "'enforce_variable_access_ordered': %s"
+                % kernel.options.enforce_variable_access_ordered)
+
     if kernel.options.enforce_variable_access_ordered == "no_check":
         return
 
-- 
GitLab