Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

incorrect floating point results #17987

Open Quuxplusone opened 10 years ago

Quuxplusone commented 10 years ago
Bugzilla Link PR17988
Status NEW
Importance P normal
Reported by Pavanakumar Mohanamuraly (m.pavanakumar@gmail.com)
Reported on 2013-11-18 23:31:42 -0800
Last modified on 2016-04-25 17:37:13 -0700
Version unspecified
Hardware Macintosh MacOS X
CC dgregor@apple.com, llvm-bugs@lists.llvm.org, llvm@sunfishcode.online
Fixed by commit(s)
Attachments clang_roe_bug.tar.bz2 (10240 bytes, application/x-bzip2)
Blocks
Blocked by
See also
Created attachment 11566
Extract and type ./compile to compile the code ... Creates executable testBug

Attaching a piece of C++ code which gives wrong floating point result with
clang++. But gives correct results in the following compilers (tested)
1) g++ >= 4.2 and 2) icpc > 11.0

Expected output
===============
Flux = 0.57735  0.989578  0.412228  0.412228  1.73147

Actual output from clang
=========================
Flux = 0.508632  0.797979  0.383204  0.383204  1.20769

This bug is reproducible in clang shipped with Xcode 5.0 on OSX Maverics and
clang 3.1-svn. valgrind shows no errors and using -O0 does not help either.
Quuxplusone commented 10 years ago

Attached clang_roe_bug.tar.bz2 (10240 bytes, application/x-bzip2): Extract and type ./compile to compile the code ... Creates executable testBug