Open jabraham17 opened 3 months ago
Noting that I hit this while working on https://github.com/chapel-lang/chapel/pull/24924. One workaround is to extract the default argument out as a separate helper function.
proc helper(a: []) do return min reduce a;
proc foo(a: [], m = helper(a)) {
...
}
Summary of Problem
Description: Using a distributed array in a reduce expression that is the default argument for a function causes the compiler to segfault
Is this a blocking issue with no known work-arounds? I don't have a good workaround that keeps the code looking clean
Steps to Reproduce
Source Code:
Compile command:
chpl foo.chpl
Associated Future Test(s):
test/functions/default-arguments/default-arg-reduce-distributed.chpl
Configuration Information
chpl --version
: chpl version 2.1.0 pre-release (281481ec66)$CHPL_HOME/util/printchplenv --anonymize
:gcc --version
orclang --version
: built with LLVM version 18.1.4