Skip to content

Commit 5a9455f

Browse files
authored
Rollup merge of rust-lang#139785 - fneddy:fix_test_cstring_merging_alignment, r=Mark-Simulacrum
Let CStrings be either 1 or 2 byte aligned. We see a regression on the `tests/assembly/cstring-merging.rs` test on s390x. Some architectures (like s390x) require strings to be 2 byte aligned. Therefor the section name will be marked with a .2 postfix on this architectures. Allowing a section name with a .1 or .2 postfix will make the test pass on either platform.
2 parents 9d6c95d + 1ac3d6b commit 5a9455f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/assembly/cstring-merging.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
use std::ffi::CStr;
77

8-
// CHECK: .section .rodata.str1.1,"aMS"
8+
// CHECK: .section .rodata.str1.{{[12]}},"aMS"
99
// CHECK: .Lanon.{{.+}}:
1010
// CHECK-NEXT: .asciz "foo"
1111
#[unsafe(no_mangle)]

0 commit comments

Comments
 (0)