test/CodeGenObjC/protocols-lazy.m fail

On my linux box, I have the following test failure for a long time. I am using tot llvm and clang. I have no llvm-gcc.

******************** TEST ‘/home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m’ FAILED! ********************
Command:
clang -emit-llvm -o Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp /home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m &&
grep OBJC_PROTOCOL_P0 Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp | count 0 &&
grep OBJC_PROTOCOL_P1 Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp | count 0 &&
grep OBJC_PROTOCOL_P2 Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp | count 3 &&
grep OBJC_PROTOCOL_INSTANCE_METHODS_P2 Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp | count 3 &&
grep OBJC_PROTOCOL_P3 Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp | count 3 &&
grep OBJC_PROTOCOL_INSTANCE_METHODS_P3 Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp | count 0 &&
grep OBJC_PROTOCOL_P4 Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp | count 3 &&
grep OBJC_PROTOCOL_INSTANCE_METHODS_P4 Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp | count 3 &&
grep OBJC_PROTOCOL_P5 Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp | count 3 &&
grep OBJC_PROTOCOL_INSTANCE_METHODS_P5 Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp | count 3 &&
grep OBJC_PROTOCOL_P6 Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp | count 4 &&
grep OBJC_PROTOCOL_INSTANCE_METHODS_P6 Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp | count 3 &&
true
Incorrect Output:
clang[0x90a6962]
clang[0x90a6a94]
[0x110400]
clang(_ZNK4llvm12PATypeHoldercvPNS_4TypeEEv+0x11)[0x86179ed]
clang(_ZNK4llvm5Value7getTypeEv+0x14)[0x8617a04]
clang[0x8a619ee]
clang[0x8a6339f]
clang[0x8a6383e]
clang[0x8a63020]
clang(_ZN5clang7CodeGen15CodeGenFunction14EmitScalarExprEPKNS_4ExprE+0x4e)[0x8a63894]
clang(_ZN5clang7CodeGen15CodeGenFunction21EmitLocalBlockVarDeclERKNS_7VarDeclE+0x2ce)[0x8a4a646]
clang(_ZN5clang7CodeGen15CodeGenFunction16EmitBlockVarDeclERKNS_7VarDeclE+0x79)[0x8a4a999]
clang(_ZN5clang7CodeGen15CodeGenFunction8EmitDeclERKNS_4DeclE+0xb0)[0x8a4aa72]
clang(_ZN5clang7CodeGen15CodeGenFunction12EmitDeclStmtERKNS_8DeclStmtE+0x4c)[0x8a83040]
clang(_ZN5clang7CodeGen15CodeGenFunction8EmitStmtEPKNS_4StmtE+0x250)[0x8a83a74]
clang(_ZN5clang7CodeGen15CodeGenFunction16EmitCompoundStmtERKNS_12CompoundStmtEbPN4llvm5ValueEb+0xb9)[0x8a84c5f]
clang(_ZN5clang7CodeGen15CodeGenFunction14EmitSimpleStmtEPKNS_4StmtE+0x68)[0x8a84ddc]
clang(_ZN5clang7CodeGen15CodeGenFunction8EmitStmtEPKNS_4StmtE+0x43)[0x8a83867]
clang(_ZN5clang7CodeGen15CodeGenFunction12GenerateCodeEPKNS_12FunctionDeclEPN4llvm8FunctionE+0x1b0)[0x8a88cc6]
clang(_ZN5clang7CodeGen13CodeGenModule28EmitGlobalFunctionDefinitionEPKNS_12FunctionDeclE+0x1bd)[0x8a3120f]
clang(_ZN5clang7CodeGen13CodeGenModule20EmitGlobalDefinitionEPKNS_9ValueDeclE+0x2c)[0x8a312d4]
clang(_ZN5clang7CodeGen13CodeGenModule10EmitGlobalEPKNS_9ValueDeclE+0x19d)[0x8a314c1]
clang(_ZN5clang7CodeGen13CodeGenModule16EmitTopLevelDeclEPNS_4DeclE+0x6a)[0x8a31c52]
clang[0x8a2e74e]
clang[0x85c281d]
clang(_ZN5clang8ParseASTERNS_12PreprocessorEPNS_11ASTConsumerEbb+0x1a1)[0x8b1559d]
clang[0x85f5e69]
clang(main+0x6a7)[0x85f7d9a]
/lib/libc.so.6(__libc_start_main+0xe6)[0x5bc5d6]
clang[0x85b8721]
Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.script: line 14: 24149 Segmentation fault clang -emit-llvm -o Output//home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m.out.tmp /home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m
******************** TEST ‘/home/xing/llvm/tools/clang/test/CodeGenObjC/protocols-lazy.m’ FAILED! ********************

Does it work if you change the run line to pass "-triple=i686-apple-darwin8" to clang? If so, please commit this change.

-Chris

Thanks Chris. Committed.