CodeGenTypes.cpp assertion crash

Hi!

The following code causes crash to crash (SVN Revision 45282):

typedef struct a b;

b* x;

struct a {
  b* p;
};

void f() {
  b* z = x->p;
}

clang: CodeGenTypes.cpp:377: unsigned int clang::CodeGen::CodeGenTypes::getLLVMFieldNo(const clang::FieldDecl*): Assertion `I != FieldInfo.end() && "Unable to find field info"' failed.
clang((anonymous namespace)::PrintStackTrace()+0x22)[0x845d218]
clang((anonymous namespace)::SignalHandler(int)+0x112)[0x845d4de]
[0xffffe420]
/lib/libc.so.6(abort+0x101)[0xb7cbb0f1]
/lib/libc.so.6(__assert_fail+0xf0)[0xb7cb2b50]
clang(clang::CodeGen::CodeGenTypes::getLLVMFieldNo(clang::FieldDecl const*)+0xa5)[0x8282083]
clang(clang::CodeGen::CodeGenFunction::EmitMemberExpr(clang::MemberExpr const*)+0x162)[0x828da56]
clang(clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*)+0x1d6)[0x828d8ea]
clang[0x829cfa8]
clang[0x829d0cc]
clang[0x829d12a]
clang(clang::StmtVisitor<(anonymous namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*)+0x94e)[0x829ed2a]
clang(clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*)+0x55)[0x829b0c3]
clang(clang::CodeGen::CodeGenFunction::EmitLocalBlockVarDecl(clang::BlockVarDecl const&)+0x14d)[0x828bdc9]
clang(clang::CodeGen::CodeGenFunction::EmitBlockVarDecl(clang::BlockVarDecl const&)+0x9e)[0x828c17a]
clang(clang::CodeGen::CodeGenFunction::EmitDecl(clang::Decl const&)+0xaf)[0x828c251]
clang(clang::CodeGen::CodeGenFunction::EmitDeclStmt(clang::DeclStmt const&)+0x28)[0x829f73c]
clang(clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*)+0x273)[0x829ffad]
clang(clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&, bool, llvm::Value*, bool)+0x98)[0x82a144c]
clang(clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*)+0x178)[0x829feb2]
clang(clang::CodeGen::CodeGenFunction::GenerateCode(clang::FunctionDecl const*)+0x3c1)[0x828a06d]
clang(clang::CodeGen::CodeGenModule::EmitFunction(clang::FunctionDecl const*)+0x47)[0x827bdc3]
clang(clang::CodeGen::CodeGenFunction(clang::CodeGen::CodeGenModule*, clang::FunctionDecl*)+0x18)[0x827acae]
clang((anonymous namespace)::LLVMEmitter::HandleTopLevelDecl(clang::Decl*)+0x45)[0x8251207]
clang(clang::ParseAST(clang::Preprocessor&, clang::ASTConsumer*, bool)+0xf9)[0x82c71e5]
clang[0x826eabd]
clang(main+0x50c)[0x826f082]
/lib/libc.so.6(__libc_start_main+0xe0)[0xb7ca5050]
clang[0x824bd01]
Aborted

Cheers,
Michael

Fixed. http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20071217/003553.html