From b9a78a84cfee93db9f5bc59dfda135f43e38a9b3 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 7 Jun 2016 21:28:45 -0700 Subject: 3037 By disabling lookups on the product of 'create-array', I'd messed it up so we were treating the product as a raw address and ignoring default-space. Just remove that exception. --- 035lookup.cc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to '035lookup.cc') 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 [ -- cgit 1.4.1-2-gfad0