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: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs