[LLVMbugs] [Bug 7122] New: assert on invalid: Wrong callback for declspec without declarator

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 12 02:53:38 PDT 2010


           Summary: assert on invalid: Wrong callback for declspec without
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chris at bubblescope.net
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com

The following line causes an assertion in clang++

typedef typename selector::template rebind<1>

I get the following output:

$ clang++ t.cc 
t.cc:1:18: error: use of undeclared identifier 'selector'
typedef typename selector::template rebind<1>
t.cc:1:28: error: expected a qualified name after 'typename'                    
typedef typename selector::template rebind<1>
clang: SemaDecl.cpp:4815: clang::TypedefDecl*
clang::Sema::ParseTypedefDecl(clang::Scope*, clang::Declarator&,
clang::QualType, clang::TypeSourceInfo*): Assertion `D.getIdentifier() &&
"Wrong callback for declspec without declarator"' failed.
0  clang           0x000000000127ddaf
1  clang           0x000000000127ff3a
2  libpthread.so.0 0x00007f419c7938f0
3  libc.so.6       0x00007f419ba83a75 gsignal + 53
4  libc.so.6       0x00007f419ba875c0 abort + 384
5  libc.so.6       0x00007f419ba7c941 __assert_fail + 241
6  clang           0x000000000064f964
7  clang           0x00000000006563d0
8  clang           0x000000000065e537
9  clang           0x00000000006179a4
10 clang           0x000000000097706a
11 clang           0x0000000000978635
12 clang           0x000000000097e7d8
13 clang           0x000000000097e92c
14 clang           0x00000000009736a0
15 clang           0x00000000009738aa
16 clang           0x00000000006136db
17 clang           0x0000000000419811
18 clang           0x0000000000409d96
19 clang           0x000000000040cf33 main + 2435
20 libc.so.6       0x00007f419ba6ec4d __libc_start_main + 253
21 clang           0x0000000000407679
Stack dump:
0.      Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -S -disable-free -main-file-name t.cc
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -resource-dir /usr/local/lib/clang/2.0
-ferror-limit 19 -fmessage-length 177 -fexceptions -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-cwX1ly.s -x c++ t.cc 
1.      <eof> parser at end of file
clang: error: compiler command failed due to signal 6 (use -v to see

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