[LLVMbugs] [Bug 9434] New: codegen bug with conditionally assigned function pointers
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Mar 8 22:28:29 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9434
Summary: codegen bug with conditionally assigned function
pointers
Product: new-bugs
Version: 2.8
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: jwatte at gmail.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6295)
--> (http://llvm.org/bugs/attachment.cgi?id=6295)
C source and makefile to show a likely codegen bug with conditionally assigned
function pointers
I have a pretty simple program that shows a codegen problem.
Specifically, llvm-ld assumes that a function pointer will always be assigned a
non-null value when that's not the case, and inlines the assigned function.
It may be argued that calling a null pointer is undefined, and thus the
assignment could always be done. However, even when including weak linked
functions (whose definition will be changed at runtime), by commenting out the
object file baz.o, this inlining happens rather than the call-through-pointer.
I'm enclosing a simple test program. Use "make" to build and disassemble the
target.
--
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