New Issue: Seg fault when passing an 'in' task intent copy to a procedure expecting it by 'ref'

19739, "bradcray", "Seg fault when passing an 'in' task intent copy to a procedure expecting it by 'ref'", "2022-05-02T22:46:59Z"

Summary of Problem

When passing an array temp created using an in task intent to a procedure expecting it by ref, I'm getting a seg fault where I don't believe I should.

Steps to Reproduce

Source Code:

proc main() {
  var A: [1..10] real;
  forall i in 1..10 do
    A[i] = i;

  ref B = A[1..3];
  begin with (in B)
    foo(B);
}

proc foo(X: [?D]) {
  X[2] = - X[2];
  writeln(X);
}

Associated Future Test(s):
/Users/bradc/chapel3/chapel/test/parallel/taskPar/taskIntents/inCopyPassedToRef2.chpl #19736
test/studies/shootout/reverse-complement/bradc/revcomp-blc-begin-ref.chpl #19736

Configuration Information

  • Output of chpl --version: chpl version 1.27.0 pre-release (e7ad193c48)