Skip to content

Fix an ICE when translating if loop {} {} #22527

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

Merged
merged 1 commit into from
Feb 22, 2015
Merged

Conversation

dotdash
Copy link
Contributor

@dotdash dotdash commented Feb 19, 2015

In if loop {} {}, the if is actually unreachable, but we didn't
handle that correctly and when trying to translate the if we tried to
branch on the "return value" of the loop expression, which is not an
i1 and therefore triggered an LLVM assertion.

@rust-highfive
Copy link
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@huonw
Copy link
Member

huonw commented Feb 19, 2015

@bors r+ a903 rollup

@dotdash
Copy link
Contributor Author

dotdash commented Feb 19, 2015

@bors r-

@dotdash
Copy link
Contributor Author

dotdash commented Feb 19, 2015

@bors r=huonw 4e1a318

@dotdash
Copy link
Contributor Author

dotdash commented Feb 19, 2015

@bors r-

@dotdash
Copy link
Contributor Author

dotdash commented Feb 19, 2015

@bors r=huonw f6af877

In `if loop {} {}`, the `if` is actually unreachable, but we didn't
handle that correctly and when trying to translate the `if` we tried to
branch on the "return value" of the loop expression, which is not an
`i1` and therefore triggered an LLVM assertion.
@dotdash
Copy link
Contributor Author

dotdash commented Feb 19, 2015

@bors r=huonw 07c0faa

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 19, 2015
 In `if loop {} {}`, the `if` is actually unreachable, but we didn't
handle that correctly and when trying to translate the `if` we tried to
branch on the \"return value\" of the loop expression, which is not an
`i1` and therefore triggered an LLVM assertion.
Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 21, 2015
 In `if loop {} {}`, the `if` is actually unreachable, but we didn't
handle that correctly and when trying to translate the `if` we tried to
branch on the \"return value\" of the loop expression, which is not an
`i1` and therefore triggered an LLVM assertion.
@huonw huonw merged commit 07c0faa into rust-lang:master Feb 22, 2015
@dotdash dotdash deleted the if-loop branch March 1, 2015 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants