[LLVMbugs] [Bug 11061] New: High optimization produces incorrect result
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Oct 4 16:04:24 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11061
Summary: High optimization produces incorrect result
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: release blocker
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: steven at ngls.net
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
The attached code produces incorrect results
when compiled with -O2 or -O3:
bluishred:~ 556 ? /usr/local/dev/Linux_x86_64/clang-trunk/bin/clang++ -O3
tclc.cpp -DWORKAROUND
bluishred:~ 557 ? ./a.out
nameMap.count( "" ): 0 should be zero!
nameMap.count( "" ): 0 should be zero!
nameMap.count( "" ): 0 should be zero!
bluishred:~ 558 ? /usr/local/dev/Linux_x86_64/clang-trunk/bin/clang++ -O3
tclc.cpp
bluishred:~ 559 ? ./a.out
nameMap.count( "" ): 0 should be zero!
nameMap.count( "" ): 1 should be zero!
nameMap.count( "" ): 1 should be zero!
bluishred:~ 560 ? /usr/local/dev/Linux_x86_64/clang-trunk/bin/clang++ -O2
tclc.cpp
bluishred:~ 561 ? ./a.out
nameMap.count( "" ): 0 should be zero!
nameMap.count( "" ): 1 should be zero!
nameMap.count( "" ): 1 should be zero!
bluishred:~ 562 ? /usr/local/dev/Linux_x86_64/clang-trunk/bin/clang++ -O1
tclc.cpp
bluishred:~ 563 ? ./a.out
nameMap.count( "" ): 0 should be zero!
nameMap.count( "" ): 0 should be zero!
nameMap.count( "" ): 0 should be zero!
bluishred:~ 564 ? /usr/local/dev/Linux_x86_64/clang-trunk/bin/clang++ -v
clang version 3.0 (trunk 140700)
Target: x86_64-unknown-linux-gnu
Thread model: posix
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list