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: