[LLVMbugs] [Bug 12037] New: clang crashes when using constexpr static of templated type
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Feb 20 02:16:16 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=12037
Bug #: 12037
Summary: clang crashes when using constexpr static of templated
type
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: jonathan.sauer at gmx.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 8075
--> http://llvm.org/bugs/attachment.cgi?id=8075
Log of clang run
The following program crashes clang r150949 after outputting an error:
template <typename T>
struct A final { };
struct B final { };
using AB = A<int>; // Crashes
//using AB = B; // Works
static constexpr AB CONST[] = { { } };
This results in (full log attached):
$ $ ~/LLVM/build/Release+Asserts/bin/clang++ -std=c++0x -stdlib=libc++ -v
clang.cpp
clang version 3.1 (trunk 150949)
Target: x86_64-apple-darwin10.8.0
Thread model: posix
[...]
clang.cpp:9:21: error: constexpr variable cannot have non-literal type 'AB
const[]'
static constexpr AB CONST[] = { { } };
^
Assertion failed: (DefinitionData && "queried property of class with no
definition"), function data, file
/Users/rynnsauer/LLVM/llvm/tools/clang/lib/Sema/../../include/clang/AST/DeclCXX.h,
line 586.
When the commented definition of AB is used, the code compiles. The code also
compiles with clang r150076.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list