[LLVMbugs] [Bug 6752] New: Assert when compiling - "Access specifier is AS_none inside a record decl"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 31 08:59:06 PDT 2010


           Summary: Assert when compiling - "Access specifier is AS_none
                    inside a record decl"
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ori at avtalion.name
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com

The following piece of code compiles with g++, but doesn't with clang++

struct Foo {
    template<class A>
    struct IteratorImpl {

        template<class T> friend class IteratorImpl;

        IteratorImpl() {}

        template<class T>
        IteratorImpl(const IteratorImpl<T> &c) {}


    typedef IteratorImpl<int *> iterator;
    typedef IteratorImpl<const int *> const_iterator;

    iterator end() {
        return iterator();

Foo foo;
Foo::const_iterator iter = foo.end();


clang: DeclBase.cpp:463: void clang::Decl::CheckAccessDeclContext() const:
Assertion `Access != AS_none && "Access specifier is AS_none inside a record
decl"' failed.


Stack dump:
0.    Program arguments: /home/ori/devel/llvm/Debug/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -S -disable-free -main-file-name clang-crash2.cpp
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -resource-dir
/home/ori/devel/llvm/Debug/lib/clang/1.5 -pedantic -fmessage-length 143
-fexceptions -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/cc-NhBY01.s -x c++ /home/ori/clang-crash2.cpp 
1.    /home/ori/clang-crash2.cpp:23:37: current parser token ';'
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