[LLVMbugs] [Bug 5482] New: StringRef is miscompiled by gcc-4.2 and gcc-4.3.1
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Nov 13 10:22:01 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=5482
Summary: StringRef is miscompiled by gcc-4.2 and gcc-4.3.1
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Support Libraries
AssignedTo: unassignedbugs at nondot.org
ReportedBy: daniel at zuster.org
CC: llvmbugs at cs.uiuc.edu
The attached example is miscompiled by gcc-4.2 and gcc-4.3.1. This is probably
bad enough that we should find a workaround.
In this particular example the problem only occurs when the string split
results in an empty LHS (I think).
--
ddunbar at ozzy:StringRef$ g++ -I $(llvm-config --src-root)/include $(llvm-config
--cppflags) harness.cpp splitlines.cpp && ./a.out
0: string (5): 'hello'
1: string (5): 'world'
2: string (1): 'a'
3: string (5): 'hello'
4: string (0): ''
5: string (5): 'world'
6: string (1): 'a'
7: string (0): ''
ddunbar at ozzy:StringRef$ g++ -O2 -I $(llvm-config --src-root)/include
$(llvm-config --cppflags) harness.cpp splitlines.cpp && ./a.out
0: string (5): 'hello'
1: string (10): '
world
a
'
2: string (5): 'world'
3: string (1): 'a'
4: string (1): '
'
5: string (5): 'hello'
6: string (10): '
world
a
'
7: string (5): 'world'
8: string (1): 'a'
9: string (1): '
'
ddunbar at ozzy:StringRef$
--
--
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