Skip to content

Commit 2e0fdc5

Browse files
committed
disable the fragment_in_final test on s390x
on s390x 128bit types have a smaller alignment then on x86[^1]. This leads to the tests falling due to different errors emitted. As this affects the same infrastructure as #149056 lets also for now disable the tests on s390x. [^1]: s390x ELF ABI Table 1.1, Page 12 https://github.com/IBM/s390x-abi
1 parent 0ee5907 commit 2e0fdc5

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

tests/ui/consts/const-eval/ptr_fragments_in_final.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Test that we properly error when there is a pointer fragment in the final value.
2+
//@ ignore-s390x different alignment on s390x make the test fail
23

34
use std::{mem::{self, MaybeUninit}, ptr};
45

tests/ui/consts/const-eval/ptr_fragments_in_final.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
error: encountered partial pointer in final value of constant
2-
--> $DIR/ptr_fragments_in_final.rs:15:1
2+
--> $DIR/ptr_fragments_in_final.rs:16:1
33
|
44
LL | const MEMCPY_RET: MaybeUninit<*const i32> = unsafe {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: while pointers can be broken apart into individual bytes during const-evaluation, only complete pointers (with all their bytes in the right order) are supported in the final value
88

99
error: encountered partial pointer in final value of constant
10-
--> $DIR/ptr_fragments_in_final.rs:24:1
10+
--> $DIR/ptr_fragments_in_final.rs:25:1
1111
|
1212
LL | const MIXED_PTR: MaybeUninit<*const u8> = {
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414
|
1515
= note: while pointers can be broken apart into individual bytes during const-evaluation, only complete pointers (with all their bytes in the right order) are supported in the final value
1616

1717
error: encountered partial pointer in final value of constant
18-
--> $DIR/ptr_fragments_in_final.rs:61:5
18+
--> $DIR/ptr_fragments_in_final.rs:62:5
1919
|
2020
LL | const A: Thing = unsafe {
2121
| ^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)