-
-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle external interface in convert_call_args
#2800
Conversation
ret i32 0 | ||
} | ||
|
||
declare void @_lpython_set_argv(i32, i8**) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generated LLVM looks good to me.
This case do not work yet: subroutine dqc25f()
external f
call dqk15w(f)
end
subroutine dqk15w(f)
interface
function f(x) result (r)
real r, x
end function
end interface
real r
r = f(2.0)
print *, r
end subroutine
program main
call dqc25f()
end program
Because, interface of |
|
||
define void @b() { | ||
.entry: | ||
call void @a(float (float*)* @f.1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is it calling f.1
, meaning that it won't be able to find the definition of this at link time, correct?
Can you try to compile and link an example? I think it won't work, due to a missing |
This case works correctly: #2748 (comment) Here it has concrete definition of |
How exactly does the |
@Pranavchiku to move forward:
|
I added the test, this PR can have a review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good now, thanks!
Fixes #1977. Fixes #2748. Fixes #2427