[cfe-dev] [RFC] Fix Clang test case failure on ARM
eli.friedman at gmail.com
Sun Apr 29 02:07:50 CDT 2012
On Sat, Apr 28, 2012 at 9:10 PM, 陳韋任 <chenwj at iis.sinica.edu.tw> wrote:
> Hi all,
> I am a LLVM 3.1 tester and running tests on ARM. A few clang test failures
> can be avoided by adding target-specific triple, but I am not sure if this is
> the correct solution.
> 1. Use "-triple x86_64-none-linux-gnu" makes failures below disappered. If no
> one against this solution, I'll prepare a patch.
> Clang :: CodeGenCXX/compound-literals.cpp
> Clang :: CodeGenCXX/copy-constructor-elim-2.cpp
> Clang :: CodeGenCXX/cxx0x-initializer-references.cpp
> Clang :: CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp
> Clang :: CodeGenCXX/virt-call-offsets.cpp
> Clang :: CodeGenCXX/x86-64-abi-sret-vs-2word-struct-param.cpp
> Clang :: CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
Often for C++, FileCheck tests over IR fail to match because of the
slightly different C++ ABI rules (among other things, constructors
have a slightly different signature). Often it's easy to fix the
tests to work on all platforms; if it's straightforward, please do,
otherwise specifying a triple is fine.
> 2. Use "-triple x86_64-none-linux-gnu" makes failure below disappered, too.
> But Chandler think tests under CXX/ should be platform independent. We
> either move p15-inclass.cpp to CodeGenCXX/ , or make "linkonce_odr"
> ptional in FileCheck so it's not platform dependent.
Err, is that why it isn't matching? I would have assumed that the
'void' isn't matching rather than the linkonce_odr.
Moving the test to CodeGenCXX is independent of that, but that would
be okay, I guess.
> Clang :: CXX/special/class.copy/p15-inclass.cpp
> 3. Although "-fshort-wchar" makes the error below disappered, Chandler think
> the test itslef is NOT fulfill the C++ standard, so this could be a bug
> in the test not in clang.
Yes... that's just a bug in the test; I didn't realize some platforms
define wchar_t as 'long'. Probably just specifying a triple is the
right thing to do here.
> Clang :: CXX/conv/conv.prom/p2.cpp
> 4. James suggust me to raise a PR for the test case below. How this test case
> is ran and what the error message is can be found in .
Yes, please file; that's a bit mysterious.
More information about the cfe-dev