From 1d0eddbedd3b364418d2ae12b1240d487488ac5b Mon Sep 17 00:00:00 2001 From: Jens Reidel Date: Fri, 18 Jul 2025 23:26:43 +0200 Subject: [PATCH 1/2] tests: debuginfo: Work around or disable broken tests on powerpc f16 support for PowerPC has issues in LLVM, therefore we need a small workaround to prevent LLVM from emitting symbols that don't exist for PowerPC yet. It also appears that unused by-value non-immedate issue with gdb applies to PowerPC targets as well, though I've only tested 64-bit Linux targets. Signed-off-by: Jens Reidel --- src/tools/compiletest/src/directives.rs | 1 + tests/debuginfo/basic-types-globals-metadata.rs | 5 ++++- tests/debuginfo/basic-types-globals.rs | 5 ++++- tests/debuginfo/by-value-non-immediate-argument.rs | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/tools/compiletest/src/directives.rs b/src/tools/compiletest/src/directives.rs index 93133ea0bfd2e..75c11c31e493a 100644 --- a/src/tools/compiletest/src/directives.rs +++ b/src/tools/compiletest/src/directives.rs @@ -854,6 +854,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[ "ignore-openbsd", "ignore-pass", "ignore-powerpc", + "ignore-powerpc64", "ignore-remote", "ignore-riscv64", "ignore-rustc-debug-assertions", diff --git a/tests/debuginfo/basic-types-globals-metadata.rs b/tests/debuginfo/basic-types-globals-metadata.rs index 53fc550a2dc8c..d14d5472f53bb 100644 --- a/tests/debuginfo/basic-types-globals-metadata.rs +++ b/tests/debuginfo/basic-types-globals-metadata.rs @@ -59,7 +59,10 @@ static mut F64: f64 = 3.5; fn main() { _zzz(); // #break - let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F16, F32, F64) }; + let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64) }; + // N.B. Including f16 and f32 in the same tuple emits `__gnu_h2f_ieee`, which does + // not exist on some targets like PowerPC + let b = unsafe { F16 }; } fn _zzz() {()} diff --git a/tests/debuginfo/basic-types-globals.rs b/tests/debuginfo/basic-types-globals.rs index 41b69939650da..5933c6d2440dc 100644 --- a/tests/debuginfo/basic-types-globals.rs +++ b/tests/debuginfo/basic-types-globals.rs @@ -63,7 +63,10 @@ static mut F64: f64 = 3.5; fn main() { _zzz(); // #break - let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F16, F32, F64) }; + let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64) }; + // N.B. Including f16 and f32 in the same tuple emits `__gnu_h2f_ieee`, which does + // not exist on some targets like PowerPC + let b = unsafe { F16 }; } fn _zzz() {()} diff --git a/tests/debuginfo/by-value-non-immediate-argument.rs b/tests/debuginfo/by-value-non-immediate-argument.rs index 5233b95f1f4ad..deacea5f6ccd8 100644 --- a/tests/debuginfo/by-value-non-immediate-argument.rs +++ b/tests/debuginfo/by-value-non-immediate-argument.rs @@ -3,6 +3,7 @@ //@ compile-flags:-g //@ ignore-windows-gnu: #128973 //@ ignore-aarch64-unknown-linux-gnu (gdb tries to read from 0x0; FIXME: #128973) +//@ ignore-powerpc64: #128973 on both -gnu and -musl // === GDB TESTS =================================================================================== From e1b6cfe62e0571d2c5bfd89fd7dae9e4cf7bcf86 Mon Sep 17 00:00:00 2001 From: Jens Reidel Date: Mon, 21 Jul 2025 21:57:08 +0200 Subject: [PATCH 2/2] Rephrase comment to include some tracking issues Signed-off-by: Jens Reidel --- tests/debuginfo/basic-types-globals-metadata.rs | 6 ++++-- tests/debuginfo/basic-types-globals.rs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/debuginfo/basic-types-globals-metadata.rs b/tests/debuginfo/basic-types-globals-metadata.rs index d14d5472f53bb..aec8ff183ad75 100644 --- a/tests/debuginfo/basic-types-globals-metadata.rs +++ b/tests/debuginfo/basic-types-globals-metadata.rs @@ -60,8 +60,10 @@ fn main() { _zzz(); // #break let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64) }; - // N.B. Including f16 and f32 in the same tuple emits `__gnu_h2f_ieee`, which does - // not exist on some targets like PowerPC + // FIXME: Including f16 and f32 in the same tuple emits `__gnu_h2f_ieee`, which + // does not exist on some targets like PowerPC. + // See https://github.com/llvm/llvm-project/issues/97981 and + // https://github.com/rust-lang/compiler-builtins/issues/655 let b = unsafe { F16 }; } diff --git a/tests/debuginfo/basic-types-globals.rs b/tests/debuginfo/basic-types-globals.rs index 5933c6d2440dc..15a0deb64c125 100644 --- a/tests/debuginfo/basic-types-globals.rs +++ b/tests/debuginfo/basic-types-globals.rs @@ -64,8 +64,10 @@ fn main() { _zzz(); // #break let a = unsafe { (B, I, C, I8, I16, I32, I64, U, U8, U16, U32, U64, F32, F64) }; - // N.B. Including f16 and f32 in the same tuple emits `__gnu_h2f_ieee`, which does - // not exist on some targets like PowerPC + // FIXME: Including f16 and f32 in the same tuple emits `__gnu_h2f_ieee`, which + // does not exist on some targets like PowerPC. + // See https://github.com/llvm/llvm-project/issues/97981 and + // https://github.com/rust-lang/compiler-builtins/issues/655 let b = unsafe { F16 }; }