External Issue: [Bug]:

28916, "nldias", "[Bug]:", "2026-06-02T11:08:23Z"

Summary of Problem

Description:

Compiling the syntactically correct program below crashes the compiler.

Is this issue currently blocking your progress?

No: changing "const in" to "const ref" lets the program compile and run fine.

Steps to Reproduce

Source Code:

iter stoi(const in s: [] string): int {
   for scol in s do {
      yield scol:int;
   }
}
var choice = "3,5";
var fruit = ["Apples", "Bananas", "Oranges", "Peaches", "Pineapples", "Figs"];
var scols = choice.split(",");
for i in stoi(scols) do {
   writeln(fruit[i-1]);
}

Compile command:
chpl baditer.chpl

Execution command:

./baditer
If an input file is required, include it as well.

Associated Future Test(s):

N/A

Configuration Information

  • Output of chpl --version:
chpl version 2.8.0
  built with LLVM version 18.1.3
  available LLVM targets: xtensa, m68k, xcore, x86-64, x86, wasm64, wasm32, ve, systemz, sparcel, sparcv9, sparc, riscv64, riscv32, ppc64le, ppc64, ppc32le, ppc32, nvptx64, nvptx, msp430, mips64el, mips64, mipsel, mips, loongarch64, loongarch32, lanai, hexagon, bpfeb, bpfel, bpf, avr, thumbeb, thumb, armeb, arm, amdgcn, r600, aarch64_32, aarch64_be, aarch64, arm64_32, arm64
Copyright 2020-2026 Hewlett Packard Enterprise Development LP
Copyright 2004-2019 Cray Inc.
(See LICENSE file for more details)
  • Output of $CHPL_HOME/util/printchplenv --anonymize:
CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: llvm
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: bundled
CHPL_TARGET_MEM: jemalloc
CHPL_ATOMICS: cstdlib
CHPL_GMP: bundled
CHPL_HWLOC: bundled
CHPL_RE2: bundled
CHPL_LLVM: system *
CHPL_AUX_FILESYS: none
  • Back-end compiler and version,
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin