http://llvm.org/bugs/show_bug.cgi?id=11202
Summary: Block addresses can refer to non-existent symbols
Product: libraries
Version: trunk
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
This is a minimized test case:
@bb = constant [1 x i8*] [i8* blockaddress(@main, %mid)]
define void @main() {
entry:
br label %l1
l1:
%a = zext i1 0 to i32
br label %mid
mid:
br label %l2
l2:
%b = zext i1 0 to i32
br label %l1
}
If you run this with llc, the output assembly/object file will refuse to
compile with an undefined reference to '.Ltmp3'. Remove any instruction, or
change any branch, and the code will assemble properly.
It seems that the cases where this problem occurs are when an empty basic
block:
1. Has its address taken
2. Is sandwiched between two non-empty basic blocks
3. The outer two basic blocks get optimized into nothing.
--
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