[LLVMbugs] [Bug 6538] New: Undeclared template names in base class lists cause parse explosions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Mar 7 17:53:29 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=6538

           Summary: Undeclared template names in base class lists cause
                    parse explosions
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rideau3 at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


coppro at overthere:~$ cat output.cpp
  struct foo
  { };

template <typename T>
  struct bar
    : public undeclared<undeclared, foo>
  { };

  struct baz : public foo { };

coppro at overthere:~$ clang output.cpp
output.cpp:6:14: error: unknown template name 'undeclared'
    : public undeclared<undeclared, foo>
             ^
output.cpp:6:40: error: expected '{' after base class list
    : public undeclared<undeclared, foo>
                                       ^
output.cpp:6:40: error: expected ';' after struct
    : public undeclared<undeclared, foo>
                                       ^
                                       ;
output.cpp:6:40: error: expected unqualified-id
clang: DeclBase.cpp:444: void clang::Decl::CheckAccessDeclContext() const:
Assertion `Access != AS_none && "Access specifier is AS_none inside a record
decl"' failed.
0  clang     0x0936e5c6
1  clang     0x0936e43b
2            0x00fcd400 __kernel_sigreturn + 0
3  libc.so.6 0x00d81932 abort + 386
4  libc.so.6 0x00d77648 __assert_fail + 248
5  clang     0x085c203c
6  clang     0x080b8070
7  clang     0x08469ebf
8  clang     0x08311bdc
9  clang     0x0866d304
10 clang     0x08661517
11 clang     0x08658429
12 clang     0x0865885b
13 clang     0x0865820e
14 clang     0x08657adb
15 clang     0x082bff26
16 clang     0x0807462e
17 clang     0x080742c1
18 clang     0x080600d9
19 clang     0x0804e724
20 clang     0x08053571 main + 267
21 libc.so.6 0x00d6ab56 __libc_start_main + 230
22 clang     0x0804d2b1
Stack dump:
0.      Program arguments: /usr/local/bin/clang -cc1 -triple i386-pc-linux-gnu
-S -disable-free -main-file-name output.cpp -mrelocation-model static
-mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4 -resource-dir
/usr/local/lib/clang/1.1 -fmessage-length 167 -fexceptions -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-pQ2Cgw.s -x c++
output.cpp
1.      output.cpp:9:14: current parser token ':'
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)
coppro at overthere:~$

-- 
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