llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.09k stars 11.99k forks source link

clang++ 18.1.8 crash when using alias to template with std::enable_if_t #116246

Open sparr opened 6 hours ago

sparr commented 6 hours ago

I apologize that I wasn't able to creduce the attachment source here. I'm still actively working on the source in question. I may be able to come back to this and improve this bug report later. I'll also try with version 19.

This crash happened when I converted code like this:

        template <typename ThisType = coord_point_ob>
        static const std::enable_if_t<Origin == origin::relative, ThisType> north{ Point::north };
        template <typename ThisType = coord_point_ob>
        static const std::enable_if_t<Origin == origin::relative, ThisType> north_east{ Point::north_east };

into code like this:

        template <typename ThisType = coord_point_ob>
        using RelativeType = std::enable_if_t<Origin == origin::relative, ThisType>;
        static const RelativeType north;
        static const RelativeType north_east;
Stack dump:
0.      Program arguments: /usr/bin/clang++ -Og -Xclang -fno-pch-timestamp -Wall -Wextra -Wformat-signedness -Wlogical-op -Wmissing-declarations -Wmissing-noreturn -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wpedantic -Wsuggest-override -Wunused-macros -Wzero-as-null-pointer-constant -Wno-unknown-warning-option -Wno-dangling-reference -Wno-c++20-compat -Wredundant-decls -g -fsigned-char -ferror-limit=1 -std=c++17 -Winvalid-pch -Werror -Isrc -isystem src/third-party -DGIT_VERSION -DIMTUI -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -include-pch pch/main-pch.hpp.pch -fpch-preprocess -c -MMD -MP -fcolor-diagnostics -o obj/coordinates.o src/coordinates.cpp
1.      src/coordinates.cpp:50:1: current parser token 'void'
2.      src/coordinates.cpp:18:19: LLVM IR generation of declaration 'real_coords::fromabs'
3.      src/coordinates.cpp:18:19: Generating code for declaration 'real_coords::fromabs'
 #0 0x0000767b35fc4d90 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /usr/src/debug/llvm/llvm-18.1.8.src/lib/Support/Unix/Signals.inc:723:22
 #1 0x0000767b35fc226d llvm::sys::RunSignalHandlers() /usr/src/debug/llvm/llvm-18.1.8.src/lib/Support/Signals.cpp:105:20
 #2 0x0000767b35fc226d llvm::sys::CleanupOnSignal(unsigned long) /usr/src/debug/llvm/llvm-18.1.8.src/lib/Support/Unix/Signals.inc:367:31
 #3 0x0000767b35ea88e9 HandleCrash /usr/src/debug/llvm/llvm-18.1.8.src/lib/Support/CrashRecoveryContext.cpp:73:5
 #4 0x0000767b35ea88e9 CrashRecoverySignalHandler /usr/src/debug/llvm/llvm-18.1.8.src/lib/Support/CrashRecoveryContext.cpp:390:62
 #5 0x0000767b3524c1d0 (/usr/lib/libc.so.6+0x3d1d0)
 #6 0x0000767b3f0d2df9 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2df9)
 #7 0x0000767b3f0d4da5 clang::CodeGen::CGDebugInfo::CreateRecordStaticField(clang::VarDecl const*, llvm::DIType*, clang::RecordDecl const*) (/usr/lib/libclang-cpp.so.18.1+0x16d4da5)
 #8 0x0000767b3f0d55e2 clang::CodeGen::CGDebugInfo::CollectRecordFields(clang::RecordDecl const*, llvm::DIFile*, llvm::SmallVectorImpl<llvm::Metadata*>&, llvm::DICompositeType*) (/usr/lib/libclang-cpp.so.18.1+0x16d55e2)
 #9 0x0000767b3f0ded10 clang::CodeGen::CGDebugInfo::CreateTypeDefinition(clang::RecordType const*) (/usr/lib/libclang-cpp.so.18.1+0x16ded10)
#10 0x0000767b3f0e022b clang::CodeGen::CGDebugInfo::CreateType(clang::RecordType const*) (/usr/lib/libclang-cpp.so.18.1+0x16e022b)
#11 0x0000767b3f0d2ba0 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2ba0)
#12 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf)
#13 0x0000767b3f0d3855 clang::CodeGen::CGDebugInfo::CreateType(clang::TypedefType const*, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d3855)
#14 0x0000767b3f0d2b86 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2b86)
#15 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf)
#16 0x0000767b3f0d3523 clang::CodeGen::CGDebugInfo::CreateType(clang::TemplateSpecializationType const*, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d3523)
#17 0x0000767b3f0d2b93 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2b93)
#18 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf)
#19 0x0000767b3f0d3523 clang::CodeGen::CGDebugInfo::CreateType(clang::TemplateSpecializationType const*, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d3523)
#20 0x0000767b3f0d2b93 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2b93)
#21 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf)
#22 0x0000767b3f0d3855 clang::CodeGen::CGDebugInfo::CreateType(clang::TypedefType const*, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d3855)
#23 0x0000767b3f0d2b86 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2b86)
#24 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf)
#25 0x0000767b3f0d3b67 clang::CodeGen::CGDebugInfo::CreateType(clang::FunctionType const*, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d3b67)
#26 0x0000767b3f0d2b58 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2b58)
#27 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf)
#28 0x0000767b3f0d5731 clang::CodeGen::CGDebugInfo::getOrCreateInstanceMethodType(clang::QualType, clang::FunctionProtoType const*, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d5731)
#29 0x0000767b3f0df408 clang::CodeGen::CGDebugInfo::CreateCXXMemberFunction(clang::CXXMethodDecl const*, llvm::DIFile*, llvm::DIType*) (/usr/lib/libclang-cpp.so.18.1+0x16df408)
#30 0x0000767b3f0dfd82 clang::CodeGen::CGDebugInfo::CollectCXXMemberFunctions(clang::CXXRecordDecl const*, llvm::DIFile*, llvm::SmallVectorImpl<llvm::Metadata*>&, llvm::DIType*) (/usr/lib/libclang-cpp.so.18.1+0x16dfd82)
#31 0x0000767b3f0ded2c clang::CodeGen::CGDebugInfo::CreateTypeDefinition(clang::RecordType const*) (/usr/lib/libclang-cpp.so.18.1+0x16ded2c)
#32 0x0000767b3f0e022b clang::CodeGen::CGDebugInfo::CreateType(clang::RecordType const*) (/usr/lib/libclang-cpp.so.18.1+0x16e022b)
#33 0x0000767b3f0d2ba0 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2ba0)
#34 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf)
#35 0x0000767b3f0e04d9 clang::CodeGen::CGDebugInfo::collectFunctionDeclProps(clang::GlobalDecl, llvm::DIFile*, llvm::StringRef&, llvm::StringRef&, llvm::DIScope*&, llvm::MDTupleTypedArrayWrapper<llvm::DINode>&, llvm::DINode::DIFlags&) (/usr/lib/libclang-cpp.so.18.1+0x16e04d9)
#36 0x0000767b3f0e3afd clang::CodeGen::CGDebugInfo::emitFunctionStart(clang::GlobalDecl, clang::SourceLocation, clang::SourceLocation, clang::QualType, llvm::Function*, bool) (/usr/lib/libclang-cpp.so.18.1+0x16e3afd)
#37 0x0000767b3f2f5a6d clang::CodeGen::CodeGenFunction::StartFunction(clang::GlobalDecl, clang::QualType, llvm::Function*, clang::CodeGen::CGFunctionInfo const&, clang::CodeGen::FunctionArgList const&, clang::SourceLocation, clang::SourceLocation) (/usr/lib/libclang-cpp.so.18.1+0x18f5a6d)
#38 0x0000767b3f2f8621 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/usr/lib/libclang-cpp.so.18.1+0x18f8621)
#39 0x0000767b3f33645d clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/lib/libclang-cpp.so.18.1+0x193645d)
#40 0x0000767b3f333459 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/lib/libclang-cpp.so.18.1+0x1933459)
#41 0x0000767b3f333d83 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (/usr/lib/libclang-cpp.so.18.1+0x1933d83)
#42 0x0000767b3f33c6f2 (/usr/lib/libclang-cpp.so.18.1+0x193c6f2)
#43 0x0000767b3f3997f3 (/usr/lib/libclang-cpp.so.18.1+0x19997f3)
#44 0x0000767b3f2b2557 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (/usr/lib/libclang-cpp.so.18.1+0x18b2557)
#45 0x0000767b3df8cfa2 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/libclang-cpp.so.18.1+0x58cfa2)
#46 0x0000767b3fa58411 clang::FrontendAction::Execute() (/usr/lib/libclang-cpp.so.18.1+0x2058411)
#47 0x0000767b3f9f9057 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/libclang-cpp.so.18.1+0x1ff9057)
#48 0x0000767b3fab06bd clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/libclang-cpp.so.18.1+0x20b06bd)
#49 0x00005d6d1fa5c3a4 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang+++0x133a4)
#50 0x00005d6d1fa6070a (/usr/bin/clang+++0x1770a)
#51 0x0000767b3f72e445 (/usr/lib/libclang-cpp.so.18.1+0x1d2e445)
#52 0x0000767b35ea8d3a llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /usr/src/debug/llvm/llvm-18.1.8.src/lib/Support/CrashRecoveryContext.cpp:428:1
#53 0x0000767b3f730dd6 (/usr/lib/libclang-cpp.so.18.1+0x1d30dd6)
#54 0x0000767b3f6ebff9 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/lib/libclang-cpp.so.18.1+0x1cebff9)
#55 0x0000767b3f6ec3fc clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/usr/lib/libclang-cpp.so.18.1+0x1cec3fc)
#56 0x0000767b3f70a824 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/lib/libclang-cpp.so.18.1+0x1d0a824)
#57 0x00005d6d1fa63045 clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang+++0x1a045)
#58 0x00005d6d1fa53fd5 main (/usr/bin/clang+++0xafd5)
#59 0x0000767b35234e08 __libc_start_call_main /usr/src/debug/glibc/glibc/csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#60 0x0000767b35234ecc call_init /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:128:20
#61 0x0000767b35234ecc __libc_start_main /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:347:5
#62 0x00005d6d1fa54035 _start (/usr/bin/clang+++0xb035)
clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 18.1.8
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/coordinates-5716ea.cpp
clang++: note: diagnostic msg: /tmp/coordinates-5716ea.sh
clang++: note: diagnostic msg: 

********************

coordinates.zip

EugeneZelenko commented 6 hours ago

Could you please try 19 or main branch? https://godbolt.org should be helpful.

llvmbot commented 6 hours ago

@llvm/issue-subscribers-clang-codegen

Author: Clarence "Sparr" Risher (sparr)

I apologize that I wasn't able to creduce the attachment source here. I'm still actively working on the source in question. I may be able to come back to this and improve this bug report later. I'll also try with version 19. This crash happened when I converted code like this: ```c++ template <typename ThisType = coord_point_ob> static const std::enable_if_t<Origin == origin::relative, ThisType> north{ Point::north }; template <typename ThisType = coord_point_ob> static const std::enable_if_t<Origin == origin::relative, ThisType> north_east{ Point::north_east }; ``` into code like this: ```c++ template <typename ThisType = coord_point_ob> using RelativeType = std::enable_if_t<Origin == origin::relative, ThisType>; static const RelativeType north; static const RelativeType north_east; ``` ``` Stack dump: 0. Program arguments: /usr/bin/clang++ -Og -Xclang -fno-pch-timestamp -Wall -Wextra -Wformat-signedness -Wlogical-op -Wmissing-declarations -Wmissing-noreturn -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wpedantic -Wsuggest-override -Wunused-macros -Wzero-as-null-pointer-constant -Wno-unknown-warning-option -Wno-dangling-reference -Wno-c++20-compat -Wredundant-decls -g -fsigned-char -ferror-limit=1 -std=c++17 -Winvalid-pch -Werror -Isrc -isystem src/third-party -DGIT_VERSION -DIMTUI -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -include-pch pch/main-pch.hpp.pch -fpch-preprocess -c -MMD -MP -fcolor-diagnostics -o obj/coordinates.o src/coordinates.cpp 1. src/coordinates.cpp:50:1: current parser token 'void' 2. src/coordinates.cpp:18:19: LLVM IR generation of declaration 'real_coords::fromabs' 3. src/coordinates.cpp:18:19: Generating code for declaration 'real_coords::fromabs' #0 0x0000767b35fc4d90 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /usr/src/debug/llvm/llvm-18.1.8.src/lib/Support/Unix/Signals.inc:723:22 #1 0x0000767b35fc226d llvm::sys::RunSignalHandlers() /usr/src/debug/llvm/llvm-18.1.8.src/lib/Support/Signals.cpp:105:20 #2 0x0000767b35fc226d llvm::sys::CleanupOnSignal(unsigned long) /usr/src/debug/llvm/llvm-18.1.8.src/lib/Support/Unix/Signals.inc:367:31 #3 0x0000767b35ea88e9 HandleCrash /usr/src/debug/llvm/llvm-18.1.8.src/lib/Support/CrashRecoveryContext.cpp:73:5 #4 0x0000767b35ea88e9 CrashRecoverySignalHandler /usr/src/debug/llvm/llvm-18.1.8.src/lib/Support/CrashRecoveryContext.cpp:390:62 #5 0x0000767b3524c1d0 (/usr/lib/libc.so.6+0x3d1d0) #6 0x0000767b3f0d2df9 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2df9) #7 0x0000767b3f0d4da5 clang::CodeGen::CGDebugInfo::CreateRecordStaticField(clang::VarDecl const*, llvm::DIType*, clang::RecordDecl const*) (/usr/lib/libclang-cpp.so.18.1+0x16d4da5) #8 0x0000767b3f0d55e2 clang::CodeGen::CGDebugInfo::CollectRecordFields(clang::RecordDecl const*, llvm::DIFile*, llvm::SmallVectorImpl<llvm::Metadata*>&, llvm::DICompositeType*) (/usr/lib/libclang-cpp.so.18.1+0x16d55e2) #9 0x0000767b3f0ded10 clang::CodeGen::CGDebugInfo::CreateTypeDefinition(clang::RecordType const*) (/usr/lib/libclang-cpp.so.18.1+0x16ded10) #10 0x0000767b3f0e022b clang::CodeGen::CGDebugInfo::CreateType(clang::RecordType const*) (/usr/lib/libclang-cpp.so.18.1+0x16e022b) #11 0x0000767b3f0d2ba0 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2ba0) #12 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf) #13 0x0000767b3f0d3855 clang::CodeGen::CGDebugInfo::CreateType(clang::TypedefType const*, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d3855) #14 0x0000767b3f0d2b86 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2b86) #15 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf) #16 0x0000767b3f0d3523 clang::CodeGen::CGDebugInfo::CreateType(clang::TemplateSpecializationType const*, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d3523) #17 0x0000767b3f0d2b93 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2b93) #18 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf) #19 0x0000767b3f0d3523 clang::CodeGen::CGDebugInfo::CreateType(clang::TemplateSpecializationType const*, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d3523) #20 0x0000767b3f0d2b93 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2b93) #21 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf) #22 0x0000767b3f0d3855 clang::CodeGen::CGDebugInfo::CreateType(clang::TypedefType const*, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d3855) #23 0x0000767b3f0d2b86 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2b86) #24 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf) #25 0x0000767b3f0d3b67 clang::CodeGen::CGDebugInfo::CreateType(clang::FunctionType const*, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d3b67) #26 0x0000767b3f0d2b58 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2b58) #27 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf) #28 0x0000767b3f0d5731 clang::CodeGen::CGDebugInfo::getOrCreateInstanceMethodType(clang::QualType, clang::FunctionProtoType const*, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d5731) #29 0x0000767b3f0df408 clang::CodeGen::CGDebugInfo::CreateCXXMemberFunction(clang::CXXMethodDecl const*, llvm::DIFile*, llvm::DIType*) (/usr/lib/libclang-cpp.so.18.1+0x16df408) #30 0x0000767b3f0dfd82 clang::CodeGen::CGDebugInfo::CollectCXXMemberFunctions(clang::CXXRecordDecl const*, llvm::DIFile*, llvm::SmallVectorImpl<llvm::Metadata*>&, llvm::DIType*) (/usr/lib/libclang-cpp.so.18.1+0x16dfd82) #31 0x0000767b3f0ded2c clang::CodeGen::CGDebugInfo::CreateTypeDefinition(clang::RecordType const*) (/usr/lib/libclang-cpp.so.18.1+0x16ded2c) #32 0x0000767b3f0e022b clang::CodeGen::CGDebugInfo::CreateType(clang::RecordType const*) (/usr/lib/libclang-cpp.so.18.1+0x16e022b) #33 0x0000767b3f0d2ba0 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2ba0) #34 0x0000767b3f0d2fdf clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile*) (/usr/lib/libclang-cpp.so.18.1+0x16d2fdf) #35 0x0000767b3f0e04d9 clang::CodeGen::CGDebugInfo::collectFunctionDeclProps(clang::GlobalDecl, llvm::DIFile*, llvm::StringRef&, llvm::StringRef&, llvm::DIScope*&, llvm::MDTupleTypedArrayWrapper<llvm::DINode>&, llvm::DINode::DIFlags&) (/usr/lib/libclang-cpp.so.18.1+0x16e04d9) #36 0x0000767b3f0e3afd clang::CodeGen::CGDebugInfo::emitFunctionStart(clang::GlobalDecl, clang::SourceLocation, clang::SourceLocation, clang::QualType, llvm::Function*, bool) (/usr/lib/libclang-cpp.so.18.1+0x16e3afd) #37 0x0000767b3f2f5a6d clang::CodeGen::CodeGenFunction::StartFunction(clang::GlobalDecl, clang::QualType, llvm::Function*, clang::CodeGen::CGFunctionInfo const&, clang::CodeGen::FunctionArgList const&, clang::SourceLocation, clang::SourceLocation) (/usr/lib/libclang-cpp.so.18.1+0x18f5a6d) #38 0x0000767b3f2f8621 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/usr/lib/libclang-cpp.so.18.1+0x18f8621) #39 0x0000767b3f33645d clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/lib/libclang-cpp.so.18.1+0x193645d) #40 0x0000767b3f333459 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/usr/lib/libclang-cpp.so.18.1+0x1933459) #41 0x0000767b3f333d83 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (/usr/lib/libclang-cpp.so.18.1+0x1933d83) #42 0x0000767b3f33c6f2 (/usr/lib/libclang-cpp.so.18.1+0x193c6f2) #43 0x0000767b3f3997f3 (/usr/lib/libclang-cpp.so.18.1+0x19997f3) #44 0x0000767b3f2b2557 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (/usr/lib/libclang-cpp.so.18.1+0x18b2557) #45 0x0000767b3df8cfa2 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/libclang-cpp.so.18.1+0x58cfa2) #46 0x0000767b3fa58411 clang::FrontendAction::Execute() (/usr/lib/libclang-cpp.so.18.1+0x2058411) #47 0x0000767b3f9f9057 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/libclang-cpp.so.18.1+0x1ff9057) #48 0x0000767b3fab06bd clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/libclang-cpp.so.18.1+0x20b06bd) #49 0x00005d6d1fa5c3a4 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang+++0x133a4) #50 0x00005d6d1fa6070a (/usr/bin/clang+++0x1770a) #51 0x0000767b3f72e445 (/usr/lib/libclang-cpp.so.18.1+0x1d2e445) #52 0x0000767b35ea8d3a llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /usr/src/debug/llvm/llvm-18.1.8.src/lib/Support/CrashRecoveryContext.cpp:428:1 #53 0x0000767b3f730dd6 (/usr/lib/libclang-cpp.so.18.1+0x1d30dd6) #54 0x0000767b3f6ebff9 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/lib/libclang-cpp.so.18.1+0x1cebff9) #55 0x0000767b3f6ec3fc clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/usr/lib/libclang-cpp.so.18.1+0x1cec3fc) #56 0x0000767b3f70a824 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/lib/libclang-cpp.so.18.1+0x1d0a824) #57 0x00005d6d1fa63045 clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang+++0x1a045) #58 0x00005d6d1fa53fd5 main (/usr/bin/clang+++0xafd5) #59 0x0000767b35234e08 __libc_start_call_main /usr/src/debug/glibc/glibc/csu/../sysdeps/nptl/libc_start_call_main.h:74:3 #60 0x0000767b35234ecc call_init /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:128:20 #61 0x0000767b35234ecc __libc_start_main /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:347:5 #62 0x00005d6d1fa54035 _start (/usr/bin/clang+++0xb035) clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation) clang version 18.1.8 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin clang++: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang++: note: diagnostic msg: /tmp/coordinates-5716ea.cpp clang++: note: diagnostic msg: /tmp/coordinates-5716ea.sh clang++: note: diagnostic msg: ******************** ``` [coordinates.zip](https://github.com/user-attachments/files/17750940/coordinates.zip)