Skip to content
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

Unreachable *bool read causes ICE #7246

Closed
talchas opened this issue Jun 19, 2013 · 1 comment
Closed

Unreachable *bool read causes ICE #7246

talchas opened this issue Jun 19, 2013 · 1 comment
Labels
A-codegen Area: Code generation I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@talchas
Copy link

talchas commented Jun 19, 2013

pub unsafe fn main() {
    return; 
    if *ptr::null() {}
}

temp.rs:3:12: 3:30 warning: unreachable expression
temp.rs:3 return; if ptr::null() {}
^~~~~~~~~~~~~~~~~~
rustc: /home/ben/apps/rust/src/llvm/include/llvm/Support/Casting.h:231: typename llvm::enable_if<llvm::is_same<Y, typename llvm::simplify_type::SimpleType>, typename llvm::cast_retty<X, Y
>::ret_type>::type llvm::cast(Y_) [with X = llvm::SequentialType, Y = llvm::Type, typename llvm::enable_if<llvm::is_same<Y, typename llvm::simplify_type::SimpleType>, typename llvm::cast_retty<X, Y_>::ret_type>::type = llvm::SequentialType*]: Assertion `isa(Val) && "cast() argument of incompatible type!"' failed.

Happens at least with the (a bit out of date) master 2d28d64.

@ghost ghost assigned catamorphism Sep 27, 2013
@catamorphism
Copy link
Contributor

This is fixed now. I have a test and will check it in shortly.

bors added a commit that referenced this issue Oct 6, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue May 20, 2021
…, r=flip1995

Adding the default lint level to the metadata collection

I noticed while working on the website adaption that the lint groups still had the `clippy::` prefix in the JSON output. This PR removes this prefix and adds a `level` field to each lint and with that simplifies the website display and saves performance.

The deprecated lints get are assigned to the level `none`. This is a bit different in comparison to the current lint list, but I believe that this will look better overall. Unless there is any argument against this :).

That's it just a small baby PR in comparison to the original monster ^^

---

See: rust-lang#7172 for the full metadata collection to-do list or to suggest a new feature in connection to it.

---

changelog: none

r? `@flip1995`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants