[Chapel Merge] Fix a compiler assert and more

Branch: refs/heads/main
Revision: dfaa4cd
Author: vasslitvinov
Link: Fix a compiler assert and more by vasslitvinov · Pull Request #19503 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19503 from vasslitvinov/fix-reciter-compiler-crash

Fix a compiler assert and more

Resolves #19301.

This PR fixes an assertion failure reported in 19301,
making the compiler handle that case safely.

While there:

Report more information upon the compiler error that parallel loops
over recursive iterators are not implemented unless all shadow
variables have [const] ref intents. Specifically, report the names
and intents of the non-compliant shadow variables.

Report the path - in addition to the error message already reported -
when FileSystem.listdir() encounters certain errors.

r: @mppf

Modified Files:
A test/library/standard/FileSystem/filerator/listdir-errors.chpl

A test/library/standard/FileSystem/filerator/listdir-errors.good
A test/parallel/forall/vass/reciter/forall-reciter-alt.chpl
A test/parallel/forall/vass/reciter/forall-reciter-alt.good
A test/parallel/forall/vass/reciter/forall-reciter-alt.prediff
M compiler/include/symbol.h
M compiler/optimizations/forallOptimizations.cpp
M compiler/resolution/lowerForalls.cpp
M modules/standard/FileSystem.chpl
M test/parallel/forall/vass/reciter/forall-reciter-todo.bad

Compare: https://github.com/chapel-lang/chapel/compare/e472a3245eef...dfaa4cd05e70