From 638e7f8e0c11dc410688fd9aed4db1f410672105 Mon Sep 17 00:00:00 2001 From: Paul Cassella Date: Sat, 7 Dec 2024 14:30:17 -0500 Subject: [PATCH] Add future for #26376, compiler hang during resolve --- Signed-off-by: Paul Cassella --- .../recursive-call-with-reindexed-array-slice.chpl | 11 +++++++++++ .../recursive-call-with-reindexed-array-slice.future | 2 ++ .../recursive-call-with-reindexed-array-slice.good | 0 .../recursive-call-with-reindexed-array-slice.timeout | 1 + 4 files changed, 14 insertions(+) create mode 100644 test/functions/resolution/recursive-call-with-reindexed-array-slice.chpl create mode 100644 test/functions/resolution/recursive-call-with-reindexed-array-slice.future create mode 100644 test/functions/resolution/recursive-call-with-reindexed-array-slice.good create mode 100644 test/functions/resolution/recursive-call-with-reindexed-array-slice.timeout diff --git a/test/functions/resolution/recursive-call-with-reindexed-array-slice.chpl b/test/functions/resolution/recursive-call-with-reindexed-array-slice.chpl new file mode 100644 index 000000000000..e5c7713dfb40 --- /dev/null +++ b/test/functions/resolution/recursive-call-with-reindexed-array-slice.chpl @@ -0,0 +1,11 @@ +var nums = [ 0, 0, 0 ]; + +proc tryit(nums) : bool { + if nums.size == 0 then return false; + if tryit(nums[1..].reindex(0..nums.size-2)) then + return true; + return false; +} + + +tryit(nums); diff --git a/test/functions/resolution/recursive-call-with-reindexed-array-slice.future b/test/functions/resolution/recursive-call-with-reindexed-array-slice.future new file mode 100644 index 000000000000..a6cb4e6e01fc --- /dev/null +++ b/test/functions/resolution/recursive-call-with-reindexed-array-slice.future @@ -0,0 +1,2 @@ +bug: compiler hangs in resolve phase +#26376 diff --git a/test/functions/resolution/recursive-call-with-reindexed-array-slice.good b/test/functions/resolution/recursive-call-with-reindexed-array-slice.good new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/test/functions/resolution/recursive-call-with-reindexed-array-slice.timeout b/test/functions/resolution/recursive-call-with-reindexed-array-slice.timeout new file mode 100644 index 000000000000..7273c0fa8c52 --- /dev/null +++ b/test/functions/resolution/recursive-call-with-reindexed-array-slice.timeout @@ -0,0 +1 @@ +25