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

           Summary: getASTRecordLayout crash on valid
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


gcc accepts this code bug clang crashes with

ASTContext.cpp:1196: const clang::ASTRecordLayout&
clang::ASTContext::getASTRecordLayout(const clang::RecordDecl*): Assertion `D
&& "Cannot get layout of forward declarations!"' failed.

--------------------------
struct A {
  ~A();
};
template <typename T>
struct B {
  A x;
};
struct C {
public:
  template <typename T>
  operator B<T>() const;
};
C foo;
template <typename F>
struct D {
};
D<int>& zed(const B<int>&);
void foobar() {
  zed(foo);
}
-------------------------

-- 
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
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to