[LLVMbugs] [Bug 7867] New: indirectbr code gen generates an undefined local symbol
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Aug 10 14:52:50 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7867
Summary: indirectbr code gen generates an undefined local
symbol
Product: libraries
Version: trunk
Platform: Macintosh
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
AssignedTo: unassignedbugs at nondot.org
ReportedBy: wendling at apple.com
CC: llvmbugs at cs.uiuc.edu
$ llc -o t.s t.ll -relocation-model=pic -disable-fp-elim
$ gcc t.s
t.s:unknown:Undefined local symbol Ltmp4
The original code (it works at -O0 and -O1, but fails at -O2 and above):
long stack[100];
int main(int argc,char**argv,char **envp) {
long *esp=stack;
static void* jarray[]={ &&KeyCtrlKV };
*++esp=(long)&&_loc0;
goto SetTermStruc;
_loc0:;
*++esp=(long)&&_loc1;
_loc1:;
*++esp=(long)&&_loc35;
_loc35:;
goto *(*esp--);
*++esp=(long)&&_loc36;
_loc36:;
*++esp=(long)&&_loc37;
_loc37:;
KeyCtrlKV:
*++esp=(long)&&_loc66;
_loc66:;
*++esp=(long)&&_loc106;
_loc106:;
*++esp=(long)&&_loc119;
_loc119:;
SetTermStruc:
goto *(*esp--);
}
--
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