[Chapel Merge] Resolve a compiler hang when reporting a split init error

Branch: refs/heads/main
Revision: 3478ab833ea97669fdf21e450e5e177560d60d4b
Author: mppf
Link: Resolve a compiler hang when reporting a split init error by mppf · Pull Request #21692 · chapel-lang/chapel · GitHub
Log Message:
Resolve a compiler hang when reporting a split init error (#21692)

This PR is intended to resolve a compiler hang discussed in this
Discourse
thread
.

There were two problems:

  1. There was an error in the code looking for a user variable that led
    to infinite looping.
  2. Split init checking was firing for passing a generic type to a
    function, but passing a generic type to a type formal is OK

This PR fixes those problems and adds the reproducer as a test.

Reviewed by @vasslitvinov - thanks!

  • full local futures testing

Compare: Comparing e94f7dfe1e7efe33fd7f7cf4cf1ec620b959c2ae...3478ab833ea97669fdf21e450e5e177560d60d4b · chapel-lang/chapel · GitHub

Diff:
M compiler/AST/symbol.cpp
M compiler/codegen/cg-expr.cpp
M compiler/include/TemporaryConversionThunk.h
M compiler/llvm/clangUtil.cpp
M compiler/main/driver.cpp
M compiler/optimizations/gpuTransforms.cpp
M compiler/resolution/functionResolution.cpp
M compiler/resolution/wrappers.cpp
M frontend/include/chpl/framework/Context.h
M frontend/include/chpl/framework/error-classes-list.h
M frontend/include/chpl/framework/query-impl.h
D frontend/include/chpl/framework/resolution-error-classes-list.h
R063 frontend/include/chpl/framework/parser-error-classes-list.h frontend/include/chpl/parsing/parser-error-classes-list.h
M frontend/include/chpl/resolution/ResolvedVisitor.h
A frontend/include/chpl/resolution/resolution-error-classes-list.h
M frontend/include/chpl/resolution/resolution-types.h
M frontend/include/chpl/resolution/scope-types.h
M frontend/include/chpl/util/terminal.h
M frontend/lib/framework/CMakeLists.txt
M frontend/lib/framework/ErrorBase.cpp
M frontend/lib/parsing/CMakeLists.txt
M frontend/lib/parsing/ParserContext.h
R094 frontend/lib/framework/parser-error-classes-list.cpp frontend/lib/parsing/parser-error-classes-list.cpp
M frontend/lib/resolution/CMakeLists.txt
M frontend/lib/resolution/Resolver.cpp
M frontend/lib/resolution/call-init-deinit.cpp
M frontend/lib/resolution/copy-elision.cpp
M frontend/lib/resolution/default-functions.cpp
R097 frontend/lib/framework/resolution-error-classes-list.cpp frontend/lib/resolution/resolution-error-classes-list.cpp
M frontend/lib/resolution/resolution-queries.cpp
M frontend/lib/resolution/resolution-types.cpp
M frontend/lib/resolution/return-type-inference.cpp
M frontend/lib/resolution/scope-queries.cpp
M frontend/lib/resolution/scope-types.cpp
M frontend/lib/resolution/split-init.cpp
M frontend/lib/types/CompositeType.cpp
M frontend/lib/types/TupleType.cpp
M frontend/lib/util/terminal.cpp
M frontend/util/linters/fieldsUsed.cpp
M modules/dists/StencilDist.chpl
M modules/internal/ChapelArray.chpl
M modules/internal/ChapelBase.chpl
M modules/internal/ChapelHashtable.chpl
M modules/internal/DefaultAssociative.chpl
M modules/internal/DefaultRectangular.chpl
M modules/standard/IO.chpl
M runtime/include/gpu/cuda/chpl-gpu-gen-includes.h
M runtime/include/gpu/rocm/chpl-gpu-gen-includes.h
M runtime/src/gpu/cuda/gpu-cuda.c
M runtime/src/gpu/rocm/gpu-rocm.c
M test/GRAPHFILES
M test/constrained-generics/hashtable/MyHashtable.chpl
M test/gpu/native.skipif
D test/gpu/native/amd/NOTEST
A test/gpu/native/amd/SKIPIF
M test/gpu/native/amd/extern_kernel_launch.chpl
A test/gpu/native/amd/extern_kernel_launch.good
A test/gpu/native/amd/simple.chpl
A test/gpu/native/amd/simple.good
D test/gpu/native/llvmIntrinsicAttributes/.gitignore
D test/gpu/native/llvmIntrinsicAttributes/CLEANFILES
D test/gpu/native/llvmIntrinsicAttributes/README
D test/gpu/native/llvmIntrinsicAttributes/llvmIntrinsicAttributes.chpl
D test/gpu/native/llvmIntrinsicAttributes/llvmIntrinsicAttributes.compopts
D test/gpu/native/llvmIntrinsicAttributes/llvmIntrinsicAttributes.cu
D test/gpu/native/llvmIntrinsicAttributes/llvmIntrinsicAttributes.precomp
D test/gpu/native/llvmIntrinsicAttributes/llvmIntrinsicAttributes.prediff
D test/gpu/native/llvmIntrinsicAttributes/llvmIntrinsicAttributes.skipif
A test/library/standard/BigInteger/bigintops.chpl
A test/library/standard/BigInteger/bigintops.compopts
A test/library/standard/BigInteger/bigintops.good
A test/library/standard/BigInteger/bigintops.graph
A test/library/standard/BigInteger/bigintops.perfcompopts
A test/library/standard/BigInteger/bigintops.perfexecopts
A test/library/standard/BigInteger/bigintops.perfkeys
M test/studies/comd/elegant/arrayOfStructs/util/AccumStencilDist.chpl
A test/types/records/split-init/split-init-error-bug/Foo.chpl
A test/types/records/split-init/split-init-error-bug/Foo.notest
A test/types/records/split-init/split-init-error-bug/FooUser.chpl
A test/types/records/split-init/split-init-error-bug/FooUser.notest
A test/types/records/split-init/split-init-error-bug/Reproducer.chpl
A test/types/records/split-init/split-init-error-bug/Reproducer.good
M util/chplenv/compile_link_args_utils.py
M util/devel/chplspell-dictionary.fileids.json
https://github.com/chapel-lang/chapel/pull/21692.diff