I was going through the specification of Chapel and was reading on Task Level Parallelism, in particular the synchronization variables (sync and single) and the logical state of them and how they go about. I came across this example given in the specification on this Link
var count$: sync int=0;
cobegin{
count$+=1
count$+=1
count$+=1
}
On running the above code, I get an error but the specification does not talk about it and expects the program to run properly. Why do I get this behaviour?
In the specification, the count$ += 1 lines each have a semicolon at the end:
which works for me.
Without the semicolons, the syntax error is expected.
However, the
internal error: assertion error [AST/build.cpp:2374](orinternal error: AST-BUI-2374 ...is unexpected. As its discoverer, would you like to open an issue in the issue tracker: https://github.com/chapel-lang/chapel/issues ?