summary refs log tree commit diff stats
path: root/tests/parallel/tpi.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/parallel/tpi.nim')
-rw-r--r--tests/parallel/tpi.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/parallel/tpi.nim b/tests/parallel/tpi.nim
index dcb9b8fc5..cd965d585 100644
--- a/tests/parallel/tpi.nim
+++ b/tests/parallel/tpi.nim
@@ -1,4 +1,5 @@
 discard """
+  matrix: "--mm:refc"
   output: '''3.141792613595791
 3.141792613595791'''
 """
@@ -9,9 +10,9 @@ proc term(k: float): float = 4 * math.pow(-1, k) / (2*k + 1)
 
 proc piU(n: int): float =
   var ch = newSeq[FlowVar[float]](n+1)
-  for k in 0..n:
+  for k in 0..ch.high:
     ch[k] = spawn term(float(k))
-  for k in 0..n:
+  for k in 0..ch.high:
     result += ^ch[k]
 
 proc piS(n: int): float =