[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-bugs
Subject:    [LLVMbugs] [Bug 6752] New: Assert when compiling - "Access
From:       bugzilla-daemon () llvm ! org
Date:       2010-03-31 15:59:06
Message-ID: bug-6752-206 () http ! llvm ! org/bugs/
[Download RAW message or body]

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

           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@nondot.org
        ReportedBy: ori@avtalion.name
                CC: llvmbugs@cs.uiuc.edu, dgregor@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
invocation)

-- 
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.
_______________________________________________
LLVMbugs mailing list
LLVMbugs@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic