about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2022-12-22 16:40:50 +0100
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2022-12-27 15:23:15 +0100
commit73e7207bfc0dc47f7b54c81c0d2351387ef708fb (patch)
tree008d562d34d44722d0e9cb3142ea5746c7549a32 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent2d8651a92761421b0437ffb44ba5670bea5ee1df (diff)
downloadrust-73e7207bfc0dc47f7b54c81c0d2351387ef708fb.tar.gz
rust-73e7207bfc0dc47f7b54c81c0d2351387ef708fb.zip
Fix ui constant tests for big-endian platforms
A number of tests under ui/const-ptr and ui/consts are currently
failing on big-endian platforms as the binary encoding of some
constants is hard-coded in the stderr test files.  Fix this by
providing a normalize-stderr-test rule that strips out the
raw bytes hex dump, so the comparison can be done in an
endianness-independent manner.  Note that in most cases, this
means the tests are now also independent of word size, so the
32bit and 64bit cases can be re-unified.

To keep tests that verify the details of those raw bytes dumps,
a new test case raw-bytes.rs performs the tests where the hex
dumps were stripped out a second time, but only on little-
endian platforms.

In addition, src/test/ui/const-ptr/forbidden_slices.rs exposes
an endian-specific difference in this diagnostic output:
   constructing invalid value at .<deref>[0]: encountered 0x11,
   but expected a boolean
depending on which byte of D0 is not a boolean value (0 or 1).
Fixed this by choosing a value of D0 that differs from 0 or 1
in all bytes.

Fixes part of https://github.com/rust-lang/rust/issues/105383.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions