Issue 63289
Summary Assertion failure compiling polly/lib/External/isl/isl_dim_map.c
Labels new issue
Assignees
Reporter rorth
    Between 20230608 and 20230613, `polly/lib/External/isl/isl_dim_map.c` compilation in a 2-stage build on Solaris/sparcv9 started to fail with
```
FAILED: tools/polly/lib/External/CMakeFiles/PollyISL.dir/isl/isl_dim_map.c.o
[...]
Assertion failed: isa<To>(Val) && "cast<Ty>() argument of incompatible type!", file /vol/llvm/src/llvm-project/dist/llvm/include/llvm/Support/Casting.h, line 578, function cast
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /var/llvm/dist-sparcv9-release-stage2-A-flang/./bin/clang -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LIBCPP_ENABLE_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/llvm/dist-sparcv9-release-stage2-A-flang/tools/clang/stage2-bins/tools/polly/lib/External -I/vol/llvm/src/llvm-project/dist/polly/lib/External -I/vol/llvm/src/llvm-project/dist/polly/lib/External/isl -I/vol/llvm/src/llvm-project/dist/polly/lib/External/isl/include -I/vol/llvm/src/llvm-project/dist/polly/lib/External/isl/imath -I/var/llvm/dist-sparcv9-release-stage2-A-flang/tools/clang/stage2-bins/tools/polly/lib/External/isl -I/var/llvm/dist-sparcv9-release-stage2-A-flang/tools/clang/stage2-bins/tools/polly/include -I/vol/llvm/src/llvm-project/dist/polly/lib/External/pet/include -I/var/llvm/dist-sparcv9-release-stage2-A-flang/tools/clang/stage2-bins/tools/polly/lib/External/isl/include -I/vol/llvm/src/llvm-project/dist/polly/include -I/var/llvm/dist-sparcv9-release-stage2-A-flang/tools/clang/stage2-bins/include -I/vol/llvm/src/llvm-project/dist/llvm/include -I/vol/llvm/src/llvm-project/dist/llvm/include/llvm/Support/Solaris -fPIC -fno-semantic-interposition -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -UNDEBUG -w -std=gnu99 -MD -MT tools/polly/lib/External/CMakeFiles/PollyISL.dir/isl/isl_dim_map.c.o -MF tools/polly/lib/External/CMakeFiles/PollyISL.dir/isl/isl_dim_map.c.o.d -o tools/polly/lib/External/CMakeFiles/PollyISL.dir/isl/isl_dim
1.      <eof> parser at end of file
2.      Optimizer
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  clang-17  0x0000000107aaf070 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 28
1  clang-17 0x0000000107aaf470 PrintStackTraceSignalHandler(void*) + 12
2  clang-17 0x0000000107aada8c llvm::sys::RunSignalHandlers() + 48
3  clang-17 0x0000000107aae684 llvm::sys::CleanupOnSignal(unsigned long) + 168
4 clang-17  0x0000000107a166e4 CrashRecoverySignalHandler(int) + 284
5 libc.so.1 0xffffffff7eec5450 __sighndlr + 12
6  libc.so.1 0xffffffff7eeb7cf8 call_user_handler + 1024
7  libc.so.1 0xffffffff7eeb80e8 sigacthandler + 208
8  libc.so.1 0xffffffff7eeca510 __lwp_sigqueue + 8
9  libc.so.1 0xffffffff7ede4afc abort + 180
10 libc.so.1 0xffffffff7ede59a4 _assert_c99 + 100
11 clang-17 0x00000001092fd038 llvm::LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(llvm::VFRange&, llvm::SmallPtrSetImpl<llvm::Instruction*>&) + 1159612 clang-17 0x00000001092fd5f0 llvm::LoopVectorizationPlanner::buildVPlansWithVPRecipes(llvm::ElementCount, llvm::ElementCount) + 732
13 clang-17  0x0000000109313468 llvm::LoopVectorizationPlanner::plan(llvm::ElementCount, unsigned int) + 2024
14 clang-17  0x0000000109314048 llvm::LoopVectorizePass::processLoop(llvm::Loop*) + 2292
15 clang-17 0x0000000109317514 llvm::LoopVectorizePass::runImpl(llvm::Function&, llvm::ScalarEvolution&, llvm::LoopInfo&, llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::BlockFrequencyInfo*, llvm::TargetLibraryInfo*, llvm::DemandedBits&, llvm::AssumptionCache&, llvm::LoopAccessInfoManager&, llvm::OptimizationRemarkEmitter&, llvm::ProfileSummaryInfo*) + 760
16 clang-17  0x0000000109318094 llvm::LoopVectorizePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 1028
17 clang-17 0x0000000108f1c8a4 llvm::detail::PassModel<llvm::Function, llvm::LoopVectorizePass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 16
18 clang-17 0x0000000105103f08 llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) + 328
19 clang-17 0x0000000107496b68 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 1104
20 clang-17 0x00000001050e44d0 llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 16
21 clang-17  0x0000000107494ef8 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 564
22 clang-17 0x0000000107d12680 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&) + 5644
23 clang-17 0x0000000107d16c2c clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) + 7992
24 clang-17 0x0000000108d2bf2c clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 1772
25 clang-17  0x000000010a1a6d1c clang::ParseAST(clang::Sema&, bool, bool) + 908
26 clang-17  0x0000000108552458 clang::ASTFrontendAction::ExecuteAction() + 116
27 clang-17 0x0000000108d2c208 clang::CodeGenAction::ExecuteAction() + 100
28 clang-17 0x0000000108554394 clang::FrontendAction::Execute() + 200
29 clang-17 0x00000001084e17e8 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 888
30 clang-17  0x00000001086323f0 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1312
31 clang-17  0x0000000104cded7c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 4700
32 clang-17  0x0000000104cd9d1c ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) + 636
33 clang-17  0x0000000104cd9f88 int llvm::function_ref<int (llvm::SmallVectorImpl<char const*>&)>::callback_fn<clang_main(int, char**, llvm::ToolContext const&)::'lambda'(llvm::SmallVectorImpl<char const*>&)>(long, llvm::SmallVectorImpl<char const*>&) + 8
34 clang-17 0x000000010836d6d4 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) + 20
35 clang-17 0x0000000107a1683c llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 184
36 clang-17  0x0000000108370200 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const + 340
37 clang-17  0x0000000108339838 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const + 164
38 clang-17 0x000000010833a14c clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const + 256
39 clang-17  0x0000000108342464 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) + 172
40 clang-17  0x0000000104cdbf60 clang_main(int, char**, llvm::ToolContext const&) + 7512
41 clang-17  0x0000000104cea92c main + 28
42 clang-17  0x0000000104cd4284 _start + 100
clang: error: clang frontend command failed with exit code 134 (use -v to see invocation)
clang version 17.0.0
Target: sparcv9-sun-solaris2.11
Thread model: posix
InstalledDir: /var/llvm/dist-sparcv9-release-stage2-A-flang/./bin
```
[isl_dim_map-e8e270.sh.txt](https://github.com/llvm/llvm-project/files/11735661/isl_dim_map-e8e270.sh.txt)
[isl_dim_map-e8e270.c.txt](https://github.com/llvm/llvm-project/files/11735669/isl_dim_map-e8e270.c.txt)

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to