I ran into an internal error.

Minimal reproducer is

proc f() : (int, int) {
  return f();
}
proc main() {
  f();
}

output:
repro.chpl:2: internal error: number of actuals does not match number of
formals [callDestructors.cpp:1120]

(Also at https://gist.github.com/swenson/34490cd907cc8330614e)


I did some debugging, and the function where the asserting is reads:

...
void insertReferenceTemps(CallExpr* call) {
  for_formals_actuals(formal, actual, call)
...

It appears as though the tuple is created to contain the return value, and
when the destructor is invoked, it has to pass the implicit self (_ref),
which is what I think insertReferenceTemps is doing. However,
for_formals_actuals only works if the implicit self has already been
inserted?

I have a workaround that patches for_formals_actuals, but I'd be afraid it
introduces more bugs than it cures, so I'm trying to figure out why this is
only occurring here, and not for every destructor call. Any pointers would
be appreciated. :)

--Christopher
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Chapel-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-bugs

Reply via email to