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
Invalid LLVM generated #4475
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Comments
SeanTAllen
added
help wanted
Extra attention is needed
bug
Something isn't working
needs investigation
This needs to be looked into before its "ready for work"
labels
Dec 27, 2023
ponylang-main
added
the
discuss during sync
Should be discussed during an upcoming sync
label
Dec 27, 2023
I think the most reasonable thing for this given that class Foo
new create(a: U32) ? =>
if a > 10 then
error
end
actor Main
new create(env: Env) =>
try
let f = Foo(1)?
end is valid code, is to verify that a constructor can actually construct an object given some path through it. That is the assumption that I believe leads to the bad LLVM. We should be catching the "this can only error" and reporting back as that as something that needs to be fixed. |
SeanTAllen
added
good first issue
Good for newcomers
and removed
needs investigation
This needs to be looked into before its "ready for work"
discuss during sync
Should be discussed during an upcoming sync
labels
Jan 9, 2024
ArthurPV
added a commit
to ArthurPV/ponyc
that referenced
this issue
Apr 17, 2024
ponylang-main
added
the
discuss during sync
Should be discussed during an upcoming sync
label
Apr 17, 2024
SeanTAllen
removed
the
discuss during sync
Should be discussed during an upcoming sync
label
Apr 18, 2024
jemc
pushed a commit
that referenced
this issue
Apr 30, 2024
Fix #4475 Before this change, `LLVM` reported an error during module verification when trying to compile the code referenced in issue #4475: ```pony class Foo new create(a: U32) ? => error actor Main new create(env: Env) => try let f = Foo(1)? end ``` This bug was caused by the failure to check for the presence of terminator instructions when generating `ret` instructions. So now, with this change, there's a check for the absence of a terminator instruction each time a `ret` instruction is generated.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Results in:
The text was updated successfully, but these errors were encountered: