This code gives me a strange result on my cross-compiling environment. Are there any ways to correct it?
If this problem isn’t a Rust’s one but a my toolchain’s one, saying so would be great help for me.
The code returns like this on a x84-86 machine, which is what I expected:
new: MyStruct { len: 0, v0: 0, n: 0 }
mynew: MyStruct { len: 0, v0: 0, n: 0 }
Conversely, it returns like this on a 32-bit PowerPC machine:
new: MyStruct { len: 0, v0: 0, n: 0 }
mynew: MyStruct { len: 0, v0: 0, n: 1 }
thread '<main>' panicked at 'assertion failed: vv.n == 0', src/main.rs:28
I want both new
and mynew
to be the same.
Any idea?