MagentaTreehouse wrote:

Tested locally,

(1) This first example from the issue still doesn't compile:

```c++
template <class T, T>
struct A {};

template <class T>
using AA = A<T, T{}>;

AA<int> a;
AA b{a};
```

(2) The original Sema crash example now crashes in CodeGen. We should enable 
CodeGen for the test as well.

<details>

<summary>Stack dump</summary>

```console
clang-23: 
/home/treehouse/build/llvm/Clang_21-Release/tools/clang/include/clang/AST/TypeNodes.inc:80:
 TypeInfo clang::ASTContext::getTypeInfoImpl(const Type *) const: Assertion 
`!T->isDependentType() && "should not see dependent types here"' failed.
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: 
/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23 -cc1 -triple 
x86_64-unknown-linux-gnu -emit-obj -dumpdir a- -disable-free 
-clear-ast-before-backend -main-file-name test.cpp -mrelocation-model pic 
-pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on 
-fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 
-tune-cpu generic -debugger-tuning=gdb 
-fdebug-compilation-dir=/home/treehouse/llvm-project 
-fcoverage-compilation-dir=/home/treehouse/llvm-project -resource-dir 
/home/treehouse/build/llvm/Clang_21-Release/lib/clang/23 -internal-isystem 
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14 -internal-isystem 
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/x86_64-linux-gnu/c++/14 
-internal-isystem 
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/backward 
-internal-isystem 
/home/treehouse/build/llvm/Clang_21-Release/lib/clang/23/include 
-internal-isystem /usr/local/include -internal-isystem 
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include 
-internal-externc-isystem /usr/include/x86_64-linux-gnu 
-internal-externc-isystem /include -internal-externc-isystem /usr/include 
-std=c++20 -fdeprecated-macro -ferror-limit 19 -fmessage-length=212 
-fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf 
-fcxx-exceptions -fexceptions -fcolor-diagnostics -faddrsig -fdwarf2-cfi-asm -o 
/tmp/test-02fd6e.o -x c++ test.cpp
1.      test.cpp:11:1: current parser token 'int'
2.      test.cpp:9:4: LLVM IR generation of declaration 'b'
3.      test.cpp:9:4: Generating code for declaration 'b'
 #0 0x0000647449f8c6c8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x45cf6c8)
 #1 0x0000647449f89607 llvm::sys::RunSignalHandlers() 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x45cc607)
 #2 0x0000647449f8db71 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x0000647449f8d9c8 SignalHandlerTerminate(int, siginfo_t*, void*) 
Signals.cpp:0:0
 #4 0x00007e3d61245330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #5 0x00007e3d6129eb2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
 #6 0x00007e3d6124527e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
 #7 0x00007e3d612288ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
 #8 0x00007e3d6122881b (/lib/x86_64-linux-gnu/libc.so.6+0x2881b)
 #9 0x00007e3d6123b517 (/lib/x86_64-linux-gnu/libc.so.6+0x3b517)
#10 0x000064744d1c5cd7 clang::ASTContext::getTypeInfoImpl(clang::Type const*) 
const (/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x7808cd7)
#11 0x000064744d1c6b4e clang::ASTContext::getTypeInfo(clang::Type const*) const 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x7809b4e)
#12 0x000064744d1c5535 clang::ASTContext::getTypeInfoImpl(clang::Type const*) 
const (/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x7808535)
#13 0x000064744d1c6b4e clang::ASTContext::getTypeInfo(clang::Type const*) const 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x7809b4e)
#14 0x000064744d1c6245 clang::ASTContext::getPreferredTypeAlign(clang::Type 
const*) const 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x7809245)
#15 0x000064744d1c4948 clang::ASTContext::getDeclAlign(clang::Decl const*, 
bool) const (/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x7807948)
#16 0x000064744a1ee518 
clang::CodeGen::CodeGenModule::GetOrCreateLLVMGlobal(llvm::StringRef, 
llvm::Type*, clang::LangAS, clang::VarDecl const*, 
clang::CodeGen::ForDefinition_t) 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x4831518)
#17 0x000064744a1f27d9 
clang::CodeGen::CodeGenModule::GetAddrOfGlobalVar(clang::VarDecl const*, 
llvm::Type*, clang::CodeGen::ForDefinition_t) 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x48357d9)
#18 0x000064744a1f4da4 
clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*, 
bool) (/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x4837da4)
#19 0x000064744a1ea891 
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, 
llvm::GlobalValue*) 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x482d891)
#20 0x000064744a1efa22 
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x4832a22)
#21 0x000064744a1e9388 
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x482c388)
#22 0x000064744a7896fc (anonymous 
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) 
ModuleBuilder.cpp:0:0
#23 0x000064744a7808d6 
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x4dc38d6)
#24 0x000064744c45e7ba clang::ParseAST(clang::Sema&, bool, bool) 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x6aa17ba)
#25 0x000064744ad01e86 clang::FrontendAction::Execute() 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x5344e86)
#26 0x000064744ac6506d 
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x52a806d)
#27 0x000064744adf80e3 
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x543b0e3)
#28 0x0000647448a883dc cc1_main(llvm::ArrayRef<char const*>, char const*, 
void*) (/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x30cb3dc)
#29 0x0000647448a842a8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, 
llvm::ToolContext const&, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>) 
driver.cpp:0:0
#30 0x0000647448a83316 clang_main(int, char**, llvm::ToolContext const&) 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x30c6316)
#31 0x0000647448a955dd main 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x30d85dd)
#32 0x00007e3d6122a1ca (/lib/x86_64-linux-gnu/libc.so.6+0x2a1ca)
#33 0x00007e3d6122a28b __libc_start_main 
(/lib/x86_64-linux-gnu/libc.so.6+0x2a28b)
#34 0x0000647448a81c25 _start 
(/home/treehouse/build/llvm/Clang_21-Release/bin/clang-23+0x30c4c25)
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed with exit code -2 (use -v to see 
invocation)
clang version 23.0.0git (https://github.com/llvm/llvm-project.git 
ff98d7949346b6944c2077ced982f0345de43901)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/treehouse/build/llvm/Clang_21-Release/bin
Build config: +assertions
```

</details>

https://github.com/llvm/llvm-project/pull/186727
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to