Merge pull request #19988 from bradcray/keep-proc-called-modules-alive-for-error
Keep "called" modules alive for the sake of generating errors for them
[developed by @mppf, tested, reviewed, and PR'd by me; reviewed by @lydia-duncan]
Prior to this PR, a module that was "called" but otherwise dead was
dead-code eliminated, causing the compiler error that we'd generate
further along in compilation to refer to dead code. This PR keeps
such called modules alive for the sake of generating a legal error.
It seems that we could also generate the error here, but this
approach has the benefit of emitting all instances of this error
in a single place.
Beyond putting Michael's suggested code change into a PR, I captured
the tests that were filed to highlight this issue from #19932.
Modified Files: A test/modules/errors/callModLikeProc.chpl