Bug 747 – undefined reference to `.LDASM1'

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2006-12-25T11:01:00Z
Last change time
2015-06-09T05:15:17Z
Keywords
link-failure
Assigned to
ibuclaw
Creator
thomas-dloop

Attachments

IDFilenameSummaryContent-TypeSize
87asm_jmp_02_C.oAttached the asm_jmp_02_C.o file generated by GDC-0.20 from http://dstress.kuehne.cn/run/a/asm_jmp_02_C.d.application/octet-stream772

Comments

Comment #0 by thomas-dloop — 2006-12-25T11:01:52Z
escaping jumps from inline asm code cause link failure: "undefined reference to `.LDASM1'" # # int main(){ # asm{ # jmp label; # } # # return 0; # label: # return 1; # } #
Comment #1 by thomas-dloop — 2006-12-30T20:10:30Z
Comment #2 by bugzilla — 2007-01-02T00:14:55Z
Cannot reproduce on Windows or Linux, but I added it to the test suite anyway.
Comment #3 by thomas-dloop — 2007-01-02T09:17:47Z
Created attachment 87 Attached the asm_jmp_02_C.o file generated by GDC-0.20 from http://dstress.kuehne.cn/run/a/asm_jmp_02_C.d.
Comment #4 by thomas-dloop — 2007-01-13T06:13:18Z
Present in GDC-0.21
Comment #5 by ibuclaw — 2010-08-08T10:45:44Z
asm_jmp_02_A.d and asm_jmp_02_B.d seem to build OK here - GDC 0.25. asm_jmp_02_C.d, however fails to build. After a little bit of debugging, it seems to be a quirk of GCC's backend, rather than GDC's problem. Take the following C/C++ program (based on your original testcase): int main() { asm("jmp .LDASM1"); return 1; asm(".LDASM1:"); return 0; } Will cause the exact same link failure "undefined reference to `.LDASM1'" when compiled with gcc/g++. Thus I deduce that this is not really an issue for us. However I may report a bug upstream in GCC. Regards
Comment #6 by ibuclaw — 2012-07-06T05:05:48Z
This issue has long been fixed. Closing