[LLVMdev] llvm/clang test failures on powerpc-darwin8

David Fang fang at csl.cornell.edu
Fri Dec 16 00:05:34 PST 2011


>>  I would guess that all the PCH tests are crashing for the same reason,
>>  so fixing that could fix a lot of failures at once on the clang side.
>
>>  If you're interested in actually having a usable compiler for your
>>  system, I would say the crashes in CodeGen/Generic and CodeGen/PowerPC
>>  are the highest priority.
>
> Indeed I am interested.  :)
>
> Here's another interesting data point.
> My full build/test log of release-3.0, bootstrapping with 
> powerpc-darwin8-g++-4.0.1 is here:
> http://www.csl.cornell.edu/~fang/sw/llvm/llvm-clang-release-3.0-powerpc-darwin8-g++-4.0.1-fink-build-log.txt
> (append .bz2 to URL for compressed version)
> fink info file (for darwin8 only): 
> http://fink.cvs.sourceforge.net/viewvc/fink/experimental/fangism/finkinfo/llvm30.info?view=log
> at revision 1.9.  (also patch file needed from the same dir.)
>
> These results have far fewer failures than svn-trunk, and are also comparable 
> to bootstrapping with gcc-4.6.2, summarized here: 
> http://paste.lisp.org/display/126363
> (Unfortunately, I no longer have the whole build/test log for the gcc46 
> bootstrap.)
> This consistency between different bootstraps of the release gives me some 
> hope that g++-4.0.1 is yet usable.

Hi,
 	Here's a single run of one failing PCH test.
In clang/lib/Serialization/ASTReader.cpp, I've added a print stmt:
Decl *ASTReader::GetDecl(DeclID ID) {
...
   unsigned Index = ID - NUM_PREDEF_DECL_IDS;

   if (Index > DeclsLoaded.size()) {
     std::fprintf(stderr, "Index = %u\n", Index);
     Error("declaration ID out-of-range for AST file");
     return 0;
   }
...
}

recompiled, re-ran one test:


[fangism:fink.build/llvm30-3.0-0.1/build] fang% bin/llvm-lit -v 
../llvm-3.0.src/tools/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
llvm-lit: lit.cfg:146: note: using clang: 
'/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/build/bin/./clang'
-- Testing: 1 tests, 2 threads --
FAIL: Clang :: CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp (1 of 1)
******************** TEST 'Clang :: 
CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp' FAILED 
********************
Script:
--
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/build/bin/./clang -cc1 
-internal-isystem 
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/build/bin/../lib/clang/3.0/include 
-fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -S -emit-llvm 
-std=c++11 -include 
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/llvm-3.0.src/tools/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/ser.h 
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/llvm-3.0.src/tools/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp 
-o - | FileCheck 
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/llvm-3.0.src/tools/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/build/bin/./clang -cc1 
-internal-isystem 
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/build/bin/../lib/clang/3.0/include 
-fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -emit-pch -o 
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/build/tools/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/Output/cg.cpp.tmp-ser.pch 
-std=c++11 -x c++ 
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/llvm-3.0.src/tools/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/ser.h
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/build/bin/./clang -cc1 
-internal-isystem 
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/build/bin/../lib/clang/3.0/include 
-fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 -S -emit-llvm 
-std=c++11 -include-pch 
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/build/tools/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/Output/cg.cpp.tmp-ser.pch 
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/llvm-3.0.src/tools/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp 
-o - | FileCheck 
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/llvm-3.0.src/tools/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp
--
Exit Code: 1
Command Output (stderr):
--
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-0.1/llvm-3.0.src/tools/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp:23:8: 
warning: expression result unused
   D(), noexcept(E());
        ^~~~~~~~~~~~~
1 warning generated.
Index = 184549368
fatal error: malformed or corrupted PCH file: 'declaration ID out-of-range 
for AST file'
Index = 201326584
1 error generated.
FileCheck error: '-' is empty.
--

********************
Testing Time: 5.22s
********************
Failing Tests (1):
     Clang :: CXX/expr/expr.unary/expr.unary.noexcept/cg.cpp

   Unexpected Failures: 1


According to the printed "Index = ...", 
GetDecl returns twice with what looks like some garbage integers.
Any possible explanation or hints on where to look from here?

Fang


-- 
David Fang
http://www.csl.cornell.edu/~fang/




More information about the llvm-dev mailing list