[llvm-bugs] [Bug 42494] New: non-canonical or dependent type in IR-generation
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jul 3 02:40:02 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42494
Bug ID: 42494
Summary: non-canonical or dependent type in IR-generation
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: sguelton at redhat.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
The following code triggers an abort when compiled with clang
```C++
template<typename>
struct T
{
template<typename Type>
constexpr static Type value = 1;
float foo()
{
return value<float>;
}
};
int main()
{
T<int> {}.foo();
}
```
Associated backtrace:
```
#0 0x00007f14cbd60110 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/sguelton/sources/llvm-project/llvm/lib/Support/Unix/Signals.inc:494:22
#1 0x00007f14cbd601a3 PrintStackTraceSignalHandler(void*)
/home/sguelton/sources/llvm-project/llvm/lib/Support/Unix/Signals.inc:558:1
#2 0x00007f14cbd5e45b llvm::sys::RunSignalHandlers()
/home/sguelton/sources/llvm-project/llvm/lib/Support/Signals.cpp:68:20
#3 0x00007f14cbd5fc06 SignalHandler(int)
/home/sguelton/sources/llvm-project/llvm/lib/Support/Unix/Signals.inc:357:1
#4 0x00007f14cab1e680 __restore_rt (/lib64/libpthread.so.0+0xf680)
#5 0x00007f14c6ed7207 raise (/lib64/libc.so.6+0x36207)
#6 0x00007f14c6ed88f8 abort (/lib64/libc.so.6+0x378f8)
#7 0x00007f14cbc25b30 bindingsErrorHandler(void*, std::string const&, bool)
/home/sguelton/sources/llvm-project/llvm/lib/Support/ErrorHandling.cpp:230:55
#8 0x00007f14c991a683
clang::CodeGen::CodeGenFunction::getEvaluationKind(clang::QualType)
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:205:7
#9 0x00007f14c98aef2c
clang::CodeGen::CodeGenFunction::EmitReturnStmt(clang::ReturnStmt const&)
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/CGStmt.cpp:1095:30
#10 0x00007f14c98ab01d clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/CGStmt.cpp:144:75
#11 0x00007f14c98abc3b
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/CGStmt.cpp:384:3
#12 0x00007f14c9920fa8
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*)
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:1031:36
#13 0x00007f14c9921b58
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&)
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:1196:21
#14 0x00007f14c9943a07
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:4314:3
#15 0x00007f14c993d544
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:2749:28
#16 0x00007f14c993a92e clang::CodeGen::CodeGenModule::EmitDeferred()
(.localalias.2)
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:2123:31
#17 0x00007f14c9932640 clang::CodeGen::CodeGenModule::Release()
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:394:31
#18 0x00007f14c9ab2113 (anonymous
namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&)
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/ModuleBuilder.cpp:260:11
#19 0x00007f14c9912e58
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:240:9
#20 0x00007f14bfbdeba8 clang::ParseAST(clang::Sema&, bool, bool)
/home/sguelton/sources/llvm-project/clang/lib/Parse/ParseAST.cpp:178:14
#21 0x00007f14c8879b55 clang::ASTFrontendAction::ExecuteAction()
/home/sguelton/sources/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1041:11
#22 0x00007f14c99100b6 clang::CodeGenAction::ExecuteAction()
/home/sguelton/sources/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1060:1
#23 0x00007f14c88794cb clang::FrontendAction::Execute()
/home/sguelton/sources/llvm-project/clang/lib/Frontend/FrontendAction.cpp:938:38
#24 0x00007f14c8806ef1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/sguelton/sources/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:944:42
#25 0x00007f14c82d32cf
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/sguelton/sources/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:291:38
#26 0x00000000004464c7 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
/home/sguelton/sources/llvm-project/clang/tools/driver/cc1_main.cpp:250:40
#27 0x000000000043c31c ExecuteCC1Tool(llvm::ArrayRef<char const*>,
llvm::StringRef)
/home/sguelton/sources/llvm-project/clang/tools/driver/driver.cpp:309:64
#28 0x000000000043c96e main
/home/sguelton/sources/llvm-project/clang/tools/driver/driver.cpp:381:26
```
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190703/a434f28a/attachment.html>
More information about the llvm-bugs
mailing list