28165, "jabraham17", "[Bug]: '--debug-safe-optimizations-only' may cause crash due to uniquifyName failing", "2025-12-09T23:06:55Z"
Recently, I tried building Arkouda with COMM=gasnet and --debug-safe-optimizations-only. This caused a compiler crash from code in FileSystem
$CHPL_HOME/modules/standard/FileSystem.chpl:505: internal error: name conflict with a non-renameable symbol [codegen/codegen.cpp:1199]
That line number is for dirname in listDir(path=src, dirs=true, files=false, listlinks=true) in copyTreeHelper.
I don't have a smaller reproducer right now, but I strongly suspect a bad combination of flags to be at fault.
Namely, --debug-safe-optimizations-only turns off a ton of Chapel optimization flags that are usually on-by-default. When developing --debug-safe-optimizations-only, I found several bugs (e.g. [Bug]: `--fast-followers` can leave behind unresolved code · Issue #27975 · chapel-lang/chapel · GitHub) that are related to turning off optimization flags. These kinds of bugs are likely caused by Chapel production passes not being full self-contained, they require other flags to work. These are usually edge cases and we should solve them.