chapel icon indicating copy to clipboard operation
chapel copied to clipboard

[Bug]: undefined outer variable in task parallel block causes internal error

Open jabraham17 opened this issue 7 months ago • 0 comments

The following code causes an internal error

  coforall i in 1..10 with (ref sum2) {
    sum2 += i;
  }

It does not matter what the intent is, it still hits the internal error. This seems to be specific to task intents, because I get the same behavior with begin and cobegin. However, changing coforall to forall or foreach correctly gives the error "could not find the outer variable for 'sum2'".

Also note, if you remove sum2 += i from the loop (so the loop body is empty), then you also correctly get "could not find the outer variable for 'sum2'".

jabraham17 avatar Jul 25 '24 19:07 jabraham17