Summary
Something goes wrong when generating inline file for module using foregin-lambda*
Metadata
- Id: b3472d5c748ebb55552789b63ced606b375ba5df
- Trac id: 1440
- Type: defect
- Reporter: megane
- Owner:
- Cc:
- Status: closed
- Component: compiler
- Estimated difficulty:
- Resolution: fixed
- Priority: not urgent at all
- Milestone: someday
- Version: 4.13.0
- Changetime: 2019-06-29 14:28:32 UTC
- Created: 2018-01-07 18:34:36 UTC
- Keywords: foreign-lambda inlining
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
Changes and comments
[2019-06-29 14:28:32 UTC] sjamaan changed status from new to closed
[2019-06-29 14:28:32 UTC] sjamaan set resolution to fixed
[2019-06-29 14:28:32 UTC] sjamaan wrote:
Fixed by 070f2d22e7409371198b4cefe16243e9de8419e9