Opened 7 years ago

Closed 5 years ago

#1440 closed defect (fixed)

Something goes wrong when generating inline file for module using foregin-lambda*

Reported by: megane Owned by:
Priority: not urgent at all Milestone: someday
Component: compiler Version: 4.13.0
Keywords: foreign-lambda inlining Cc:
Estimated difficulty:

Description

Same results with C5 30c894a.

+ more foo.scm bar.scm
+ cat
::::::::::::::
foo.scm
::::::::::::::
(module
 foo
 (foo)
 (import chicken scheme)
 (import (only foreign foreign-lambda*))

 (define (foo x)
   ((foreign-lambda* int ((int x)) "C_return ( x + 1 );")
    x))
 )
::::::::::::::
bar.scm
::::::::::::::
(use foo)
(print (foo 1))
+ rm -f bar.o foo.so foo.inline foo.import.scm bar
+ csc -O3 -s -J -oi foo.inline foo.scm
+ csc -O3 bar.scm
bar.c: In function ‘f_222’:
bar.c:77:4: warning: implicit declaration of function ‘stub16’ [-Wimplicit-function-declaration]
 t4=stub16(C_SCHEME_UNDEFINED,t3);
    ^
bar.o: In function `f_222':
bar.c:(.text+0x475): undefined reference to `stub16'
collect2: error: ld returned 1 exit status

Error: shell command terminated with non-zero exit status 256: 'gcc' 'bar.o' -o 'bar' -L/home/user/programs/chicken-4.12.0/lib  -Wl,-R'/home/user/programs/chicken-4.12.0/lib' -lchicken -lm -ldl

Change History (1)

comment:1 Changed 5 years ago by sjamaan

Resolution: fixed
Status: newclosed

Fixed by 070f2d22e7409371198b4cefe16243e9de8419e9

Note: See TracTickets for help on using tickets.