Rollup merge of #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.
This commit is contained in:
Stuart Cook 2025-04-15 15:47:29 +10:00 committed by GitHub
commit 5a9455f560
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,7 +5,7 @@
use std::ffi::CStr;
// CHECK: .section .rodata.str1.1,"aMS"
// CHECK: .section .rodata.str1.{{[12]}},"aMS"
// CHECK: .Lanon.{{.+}}:
// CHECK-NEXT: .asciz "foo"
#[unsafe(no_mangle)]