about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--035lookup.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/035lookup.cc b/035lookup.cc
index e56078bc..bab280b6 100644
--- a/035lookup.cc
+++ b/035lookup.cc
@@ -261,14 +261,18 @@ def main [
 +mem: storing 15 in location 4
 +mem: storing 16 in location 5
 
-:(before "Update CREATE_ARRAY product in Check")
-// 'create-array' does not support indirection. Static arrays are meant to be
-// allocated on the 'stack'.
-assert(!has_property(product, "lookup"));
-:(before "Update CREATE_ARRAY product in Run")
-// 'create-array' does not support indirection. Static arrays are meant to be
-// allocated on the 'stack'.
-assert(!has_property(product, "lookup"));
+:(scenario create_array_indirect)
+def main [
+  1000:number/raw <- copy 1  # pretend refcount
+  1:address:array:number:3 <- copy 1000/unsafe  # pretend allocation
+  1:address:array:number:3/lookup <- create-array
+]
++mem: storing 3 in location 1001
+
+:(after "Update CREATE_ARRAY product in Check")
+if (!canonize_type(product)) break;
+:(after "Update CREATE_ARRAY product in Run")
+canonize(product);
 
 :(scenario index_indirect)
 def main [