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

Enums with >32 bits on i686 are all canonicalized to 0 #8199

Closed
alexcrichton opened this issue Aug 1, 2013 · 6 comments
Closed

Enums with >32 bits on i686 are all canonicalized to 0 #8199

alexcrichton opened this issue Aug 1, 2013 · 6 comments
Labels
A-codegen Area: Code generation O-linux Operating system: Linux

Comments

@alexcrichton
Copy link
Member

The following test fails on i686, and passes on x86_64

enum A {
  A1 = 1 << 41,
}

fn main() {
  assert_eq!(A1 as u64, 1 << 41);
}

This is blocking #7115 until I have time to make a workaround.

@huonw
Copy link
Member

huonw commented Aug 1, 2013

@kemurphy is working in this area.

@kemurphy
Copy link
Contributor

kemurphy commented Aug 1, 2013

Oh boy, this'll be fun. My big patch is nearing completion but I'm going to be traveling all day tomorrow so it still won't be done for a few days I bet.

@catamorphism
Copy link
Contributor

Reproduced on i686 with cf7b9eb . @kemurphy -- what do you need in order for your patch to be ready for submission?

@kemurphy
Copy link
Contributor

My full-time job is keeping be busy enough to not have a whole lot of time to work on this, but the big patch I was working on ended up not working out anyway. I was trying to unify the representation of structs, tuple structs, and all the enum variants behind the scenes (so they all followed one path on their way to trans), but tuple structs and variants have a special case where they can get passed around as callable values and that conflicted with what I was trying to do. I'm planning on trying again with a different design that doesn't nuke the callable stuff but due to lack of time it'll be a while before it lands. Consequently, if someone else wants to pick up this bug they should go for it.

@catamorphism
Copy link
Contributor

@kemurphy No worries. Thanks for trying and thanks for the update!

@alexcrichton
Copy link
Member Author

Closed by #9613, tests appear to be sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation O-linux Operating system: Linux
Projects
None yet
Development

No branches or pull requests

4 participants