Trouble with tweaking test-release.sh script

Hi Bill,

  The preliminary result of regression test on ARM shows quit a lot failures,
which makes me nervous. After discussion on IRC, echristo and chandlerc sugguested
the following possibilities,

  1) some flag weirdness
  2) miscompile via cross toolchain
  3) architecture-specific fundamental bug

chandlerc told me compile LLVM/Clang without "-fno-strict-aliasing" first, see
if those failures gone. If not, turn off all optimizations when building
LLVM/Clang. But I have trouble with tweaking test-release.sh so that it can
compile with "-fno-strict-aliasing" option. You can see the script I modified
at [2]. Although I set CFLAGS and CXXFLAGS to "-fno-strict-aliasing", I see
no "-fno-strict-aliasing" in llvm.make-Phase1-Release.log, seems CFLAGS and
CXXFLAGS don't work. Do you know the correct way to enable/disable compiler
options?

  Thanks! :slight_smile:

Regards,
chenwj

[1] http://people.cs.nctu.edu.tw/~chenwj/tmp/regression-test.txt
[2] http://people.cs.nctu.edu.tw/~chenwj/tmp/test-release.txt

I have a native compile and the result seems better... You can compare
the result of cross compile [1] and the native compile [2].

  Any though?

Regards,
chenwj

[1] http://people.cs.nctu.edu.tw/~chenwj/tmp/regression-test.txt
[2] http://people.cs.nctu.edu.tw/~chenwj/tmp/llvm.check-Phase1-Release.txt

Hi 陳韋任,

Sorry for the late response.

I'm not particularly happy about the failures here. We need to get to the bottom of them. In the previous email, you tried setting CFLAGS and CXXFLAGS to -fno-strict-aliasing during configuration. Try setting them during the 'make' command:

  $ make ... CFLAGS=-fno-strict-aliasing CXXFLAGS=-fno-strict-aliasing

etc.

If you get failures with that, then try one of the test cases and see how it's failing. If it's a crash, then see if you can figure out why it's crashing. :slight_smile: You may have to compile and run things by hand to really dig into this...

  As you can see, the result of cross and native compile is quit different.
Although currently I do both, I think we should decide we should count on
cross or native compile result. Any suggestion on which one I should look into?

Regards,
chenwj

Status update:

  With "CFLAGS=-fno-strict-aliasing CXXFLAGS=-fno-strict-aliasing", the cross
build still has the same failures before.

Regards,
chenwj

Hi Bill,

  James told me that regression tests aren't really set up to run cross.
Maybe that's why cross build has more failures than native build. Anyone
can help to confirm this?

Regards,
chenwj

Hi Bill,

  I forgot to do Phase2/Phase3 build. Here is the Phase3 regression test
result,

  http://people.cs.nctu.edu.tw/~chenwj/tmp/phase3-regression-test.txt

Most LLVM failures are gone. As for ExecutionEngine, I guess ARM JIT is
not at a good shape at this moment, right? Perhaps we should focus on Clang
failures?

Regards,
chenwj

Hi chenwj,

Thanks for the report. Yeah, it's probably best to track down what's happening with clang. Could you investigate this further?

-bw

Hi Bill,

  Here is the summary of Clang failures (part of).

    Clang :: CXX/conv/conv.prom/p2.cpp

     chandlerc doubts the test itself is fulfill the C++ standard. Although
     "-fshort-wchar" makes the error disappered, chandlerc think it's not
     the correct solution. Perhaps it's test bug not clang's.

    Clang :: CXX/special/class.copy/p15-inclass.cpp
    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

     Use "-triple x86_64-none-linux-gnu" makes above failures disappered.
    But chandlerc think tests under CXX/ should be platform independent.
    Either move p15-inclass.cpp to CodeGenCXX/ , or make "linkonce_odr"
    optional in FileCheck so it's not platform dependent.
    
    Clang :: CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp

     Seems to be difference between ARM and Intel C++ ABI, but I leave it to
     James to comment.

  For whom might be interested in the ARM regression test result, please see [1].

Regards,
chenwj

[1] http://people.cs.nctu.edu.tw/~chenwj/tmp/phase3-regression-test.txt

Update:

    Clang :: CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp

     Seems to be difference between ARM and Intel C++ ABI, but I leave it to
     James to comment.

      Use "-triple x86_64-none-linux-gnu" makes this test pass.

Regards,
chenwj

Hi Wei-Ren Chen,

Thanks for the reports. Could you ask on the cfe-dev list if adding these flags to the tests are appropriate to fix the issues?

-bw

Hi Bill,

Hi 陳韋任,

You can make the patch against svn head. I'll use 'svn merge' to merge the patch into the rc1 branch.

-bw