Skip to content

LLVM undef with overflowing floating-point -> integer casts #24331

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

Closed
arielb1 opened this issue Apr 11, 2015 · 3 comments
Closed

LLVM undef with overflowing floating-point -> integer casts #24331

arielb1 opened this issue Apr 11, 2015 · 3 comments
Labels
A-codegen Area: Code generation A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. P-high High priority

Comments

@arielb1
Copy link
Contributor

arielb1 commented Apr 11, 2015

An overflowing fp -> int cast, for example:

#[inline(never)]
fn show<T: std::fmt::Debug>(e: T) { println!("{:?}", e) }

fn main() {
    show({
        9.223372036854776e18f64 as i64
    });
}

playpen

Causes LLVM to not initialise the parameter passed to show:

trs: uwtable
define internal void @_ZN4main20he0a80c27bce3fc14RaaE() unnamed_addr #0 {
entry-block:
  tail call fastcc void @_ZN4show21h11375292364260386722E()
  ret void
}
@alexcrichton alexcrichton added A-codegen Area: Code generation A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. labels Apr 13, 2015
@arielb1
Copy link
Contributor Author

arielb1 commented May 15, 2015

Shouldn't this be I-wrong?

@pnkfelix
Copy link
Member

triage: P-high

@rust-highfive rust-highfive added the P-high High priority label May 15, 2015
@arielb1
Copy link
Contributor Author

arielb1 commented Jun 15, 2015

duplicate of #15536

@arielb1 arielb1 closed this as completed Jun 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. P-high High priority
Projects
None yet
Development

No branches or pull requests

4 participants