diff --git a/pyopencl/array.py b/pyopencl/array.py
index d48eece60b78e21294e4ec97eef89cc66a779699..a991b237fc1f5d73fe45384090a74fde59f07233 100644
--- a/pyopencl/array.py
+++ b/pyopencl/array.py
@@ -530,7 +530,8 @@ class Array:
                     if shape:
                         strides = [dtype.itemsize]
                         for s in shape[:0:-1]:
-                            strides.append(strides[-1]*s)
+                            # NOTE: https://github.com/inducer/compyte/pull/36
+                            strides.append(strides[-1]*_builtin_max(1, s))
                         strides = tuple(strides[::-1])
                     else:
                         strides = ()