Clang 3.2 assertion failure writing AST files: RecordIdx == Vals.size() && "Not all record operands emitted!"

The following code causes Clang (3.2 on Linux) to fail an assertion test when serializing an AST to an AST file.

template<typename T>
void f() {
   enum E {

   T t = enumerator;

template void f<int>();

$ clang -c t.cpp
<no error, object file is generated successfully>

$ clang -emit-ast t.cpp
clang: /nfs/thonermann/clang-3.2/llvm-3.2/include/llvm/Bitcode/BitstreamWriter.h:398: void llvm::BitstreamWriter::EmitRecordWithAbbrevImpl(unsigned int, llvm::SmallVectorImpl<T>&, llvm::StringRef) [with uintty = long unsigned int]: Assertion `RecordIdx == Vals.size() && "Not all record operands emitted!"' failed.
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.2 (tags/RELEASE_32/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:

Fixed in r177330, thanks for the report and the investigation!