-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Description
| Bugzilla Link | 9885 |
| Resolution | DUPLICATE |
| Resolved on | May 10, 2011 09:02 |
| Version | trunk |
| OS | MacOS X |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor |
Extended Description
Trying to build the current libc++ results in a clang crash. It crashes while parsing the header.
The same happens with the following reduced test case:
class string;
class ios_base;
struct _xlocale;
struct tm;
typedef struct _xlocale * locale_t;
typedef unsigned long size_t;
class __time_put
{
locale_t _loc;
protected:
__time_put(const string& __nm);
};
template <class _CharT, class _OutputIterator>
class attribute ((visibility("default"))) time_put
: private __time_put
{
protected:
// Commenting this constructor removes the crash:
attribute ((visibility("hidden"), always_inline))
explicit time_put(const string& __nm, size_t __refs)
// Commenting the base class constructor call removes the crash:
: __time_put(__nm) {}
};
int main(int, char**)
{
}
This results in:
getSpecialMember on non-special member
UNREACHABLE executed at /Users/rynnsauer/LLVM/llvm/tools/clang/lib/Sema/SemaDecl.cpp:1521!
[...]
Stack dump:
0. Program arguments: /opt/bin/clang -cc1 -triple x86_64-apple-macosx10.6.7 -emit-obj -mrelax-all -disable-free -main-file-name clang.cpp -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 97.17 -resource-dir /opt/bin/../lib/clang/3.0 -nostdinc++ -cxx-isystem /usr/include/c++/v1 -std=c++0x -fdeprecated-macro -ferror-limit 19 -fmessage-length 100 -stack-protector 1 -fblocks -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/RI/RI4iqAygH0OWeTzP0+rLU++++TI/-Tmp-/cc-v4anXa.o -x c++ clang.cpp
- clang.cpp:24:22: current parser token '{'
- clang.cpp:16:1: parsing struct/union/class body 'time_put'
My clang version:
$ /opt/bin/clang --version
clang version 3.0 (trunk 131121)
Target: x86_64-apple-darwin10.7.0
Thread model: posix
This did not happen with clang trunk 131082.
Complete crash log to follow.