Closed nenadv closed 10 years ago
Nenad,
I can reproduce on a Power7 at NCSA, where clang was built with gcc-4.6:
[hargrov1@bd-login ~]$ ./opt/llvm-intrepid/bin/clang -O bug.c
[hargrov1@bd-login ~]$ ./a.out
fooL 9
SUCCESS
[hargrov1@bd-login ~]$ ./opt/llvm-intrepid/bin/clang -O0 bug.c
[hargrov1@bd-login ~]$ ./a.out
fooL 8.58994e+09
FAILED (result = 8.58994e+09 but expect 9.0)
I filed this: http://llvm.org/bugs/show_bug.cgi?id=19144
Paul, I was not able to add you to the cc list. You probably need to create an account at their bugzilla.
I am seeing some other tests failing the same way when double and -O0 is involved (e.g. bug1557.upc). I'll try to run harness with optimizations and see what the difference is.
Test bug137c fails to produce the right result. Has nothing to do with UPC and I am able to reproduce the problem on the LLVM/CLANG trunk and this simple code:
This test fails on -O0 only. IR looks fine, it must be LLVM code generation problem.
I'll see where to file LLVM bugs.