Skip to content

ICE with statics containing #[simd] types with length not a power-of-two #17170

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
huonw opened this issue Sep 11, 2014 · 3 comments
Closed

ICE with statics containing #[simd] types with length not a power-of-two #17170

huonw opened this issue Sep 11, 2014 · 3 comments
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@huonw
Copy link
Member

huonw commented Sep 11, 2014

#![feature(simd)]

#[simd]
struct T(f64, f64, f64);

static X: T = T(0.0, 0.0, 0.0);

fn main() {
    let _ = X;
}
{ double, double, double } zeroinitializer
<3 x double> undef
error: internal compiler error: const expr(19: T(0.0, 0.0, 0.0)) of type T has size 24 instead of 32
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libsyntax/ast_util.rs:776

Similarly 5 fields fails with has size 40 instead of 64.

@huonw huonw added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Sep 11, 2014
@simnalamburt
Copy link
Contributor

I think the right-hand side of the statement below should be interpreted as <3 x double> not { double, double, double }.

static X: T = T(0.0, 0.0, 0.0);

simnalamburt added a commit to simnalamburt/snippets that referenced this issue Apr 25, 2015
@simnalamburt
Copy link
Contributor

This issue has been fixed, tested with rustc 1.0.0-nightly (07560d233 2015-04-20). Please close this.

@huonw huonw added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Apr 27, 2015
@huonw
Copy link
Member Author

huonw commented Apr 27, 2015

Tagged as needstest, thanks @simnalamburt!

@bors bors closed this as completed in 3878f4d May 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants