@@ -139,8 +139,11 @@ function test_cases()
139139 [Ptr{UInt8}, Ptr{UInt8}],
140140 allocs,
141141 ),
142- Testcase (" dynamic scope 1" , 5 , (taped_globals_tester_1,), nothing , [5 ], allocs),
143- Testcase (" dynamic scope 2" , 6 , (taped_globals_tester_1,), nothing , [6 ], none),
142+ Testcase (" globals tester 1" , 5 , (taped_globals_tester_1,), nothing , [5 ], allocs),
143+ Testcase (" globals tester 2" , 6 , (taped_globals_tester_1,), nothing , [6 ], none),
144+ Testcase (
145+ " globals tester 3" , 6 , (while_loop_with_globals,), nothing , fill (6 , 9 ), allocs
146+ ),
144147 Testcase (
145148 " nested (static)" , nothing , (static_nested_outer,), nothing , [true , false ], none
146149 ),
@@ -291,6 +294,15 @@ function taped_globals_tester_1()
291294 return nothing
292295end
293296
297+ function while_loop_with_globals ()
298+ t = 1
299+ while t < 10
300+ produce (get_taped_globals (Int))
301+ t = 1 + t
302+ end
303+ return nothing
304+ end
305+
294306@noinline function nested_inner ()
295307 produce (true )
296308 return 1
0 commit comments