Skip to content

Commit fd9c825

Browse files
committed
Fix test intrinsic-raw_eq-const-bad for big-endian
The test fails on s390x and presumably other big-endian systems, due to print of raw values. To fix the tests remove the raw output values in the error note with normalize-stderr.
1 parent cb6785f commit fd9c825

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/ui/intrinsics/intrinsic-raw_eq-const-bad.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ normalize-stderr: "[[:xdigit:]]{2} __ ([[:xdigit:]]{2}\s){2}" -> "HEX_DUMP"
12
#![feature(core_intrinsics)]
23

34
const RAW_EQ_PADDING: bool = unsafe {

tests/ui/intrinsics/intrinsic-raw_eq-const-bad.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
error[E0080]: reading memory at ALLOC0[0x0..0x4], but memory is uninitialized at [0x1..0x2], and this operation requires initialized memory
2-
--> $DIR/intrinsic-raw_eq-const-bad.rs:4:5
2+
--> $DIR/intrinsic-raw_eq-const-bad.rs:5:5
33
|
44
LL | std::intrinsics::raw_eq(&(1_u8, 2_u16), &(1_u8, 2_u16))
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `RAW_EQ_PADDING` failed here
66
|
77
= note: the raw bytes of the constant (size: 4, align: 2) {
8-
01 __ 02 00 │ .░..
8+
HEX_DUMP │ .░..
99
}
1010

1111
error[E0080]: unable to turn pointer into integer
12-
--> $DIR/intrinsic-raw_eq-const-bad.rs:9:5
12+
--> $DIR/intrinsic-raw_eq-const-bad.rs:10:5
1313
|
1414
LL | std::intrinsics::raw_eq(&(&0), &(&1))
1515
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `RAW_EQ_PTR` failed here
@@ -18,7 +18,7 @@ LL | std::intrinsics::raw_eq(&(&0), &(&1))
1818
= help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
1919

2020
error[E0080]: accessing memory with alignment 1, but alignment 4 is required
21-
--> $DIR/intrinsic-raw_eq-const-bad.rs:16:5
21+
--> $DIR/intrinsic-raw_eq-const-bad.rs:17:5
2222
|
2323
LL | std::intrinsics::raw_eq(aref, aref)
2424
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ evaluation of `RAW_EQ_NOT_ALIGNED` failed here

0 commit comments

Comments
 (0)