Crash on tgmath parsing with release build

When parsing tgmath.h using a fresh release build of clang (make ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1), I got this:
This crash does not occur with a debug build thought.

echo “#include <tgmath.h>” > math.c
clang -v -E math.c

clang version 1.1 ([http://llvm.org/svn/llvm-project/cfe/trunk 82688](http://llvm.org/svn/llvm-project/cfe/trunk 82688))
Target: x86_64-apple-darwin10
Thread model: posix
“/Volumes/MacPro/Projects/OpenSource/llvm/Release-Asserts/bin/clang-cc” -triple x86_64-apple-darwin10 -E -disable-free -main-file-name math.c --relocation-model pic -pic-level=1 --disable-fp-elim --unwind-tables=1 --mcpu=core2 --fmath-errno=0 -v -mmacosx-version-min=10.6.0 -fdiagnostics-show-option -o - -x c math.c
clang-cc version 1.1 based upon llvm 2.7svn hosted on x86_64-apple-darwin10
#include “…” search starts here:
#include <…> search starts here:
/Volumes/MacPro/Projects/OpenSource/llvm/Release-Asserts/lib/clang/1.1/include
/usr/local/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
0 clang-cc 0x000000010099b2a2 PrintStackTrace(void*) + 34
1 clang-cc 0x000000010099b7f9 SignalHandler(int) + 617
2 libSystem.B.dylib 0x00007fff817780aa _sigtramp + 26
3 libstdc++.6.dylib 0x00007fff80eb8f05 operator new(unsigned long) + 97
4 clang-cc 0x000000010037a81f clang::TokenLexer::ExpandFunctionArguments() + 767
5 clang-cc 0x0000000100379b70 clang::TokenLexer::Init(clang::Token&, clang::SourceLocation, clang::MacroArgs*) + 288
6 clang-cc 0x0000000100370916 clang::Preprocessor::EnterMacro(clang::Token&, clang::SourceLocation, clang::MacroArgs*) + 454
7 clang-cc 0x0000000100372439 clang::Preprocessor::HandleMacroExpandedIdentifier(clang::Token&, clang::MacroInfo*) + 745
8 clang-cc 0x0000000100376923 clang::Preprocessor::HandleIdentifier(clang::Token&) + 323
9 clang-cc 0x000000010035f80f clang::Lexer::LexIdentifier(clang::Token&, char const*) + 223
10 clang-cc 0x000000010035fec8 clang::Lexer::LexTokenInternal(clang::Token&) + 1192
11 clang-cc 0x0000000100022c7e clang::Preprocessor::Lex(clang::Token&) + 78
12 clang-cc 0x00000001000833bc clang::DoPrintPreprocessedInput(clang::Preprocessor&, llvm::raw_ostream*, bool, bool, bool, bool) + 1756
13 clang-cc 0x000000010001d98e main + 13918
14 clang-cc 0x0000000100018364 start + 52
Stack dump:
0. Program arguments: /Volumes/MacPro/Projects/OpenSource/llvm/Release-Asserts/bin/clang-cc -triple x86_64-apple-darwin10 -E -disable-free -main-file-name math.c --relocation-model pic -pic-level=1 --disable-fp-elim --unwind-tables=1 --mcpu=core2 --fmath-errno=0 -v -mmacosx-version-min=10.6.0 -fdiagnostics-show-option -o - -x c math.c
clang: error: preprocessor command failed due to signal 11 (use -v to see invocation)

Regards

– Jean-Daniel

Look like a rm -rf llvm, and a clean checkout rebuild solve the issue.