Skip to content

tests: debuginfo: Work around or disable broken tests on powerpc #144160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 26, 2025

Conversation

Gelbpunkt
Copy link
Contributor

@Gelbpunkt Gelbpunkt commented Jul 18, 2025

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 #128973 applies to PowerPC targets as well, though I've only tested 64-bit Linux targets.

@rustbot
Copy link
Collaborator

rustbot commented Jul 18, 2025

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 18, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 18, 2025

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot

This comment has been minimized.

@Gelbpunkt Gelbpunkt force-pushed the debuginfo-tests-ppc branch from f90a6c1 to 9ce00f5 Compare July 18, 2025 21:33
Comment on lines 3 to 7
// Targets with broken f16 cannot link due to missing __gnu_f2h_ieee
// See https://github.com/llvm/llvm-project/issues/97981
// and https://github.com/rust-lang/compiler-builtins/issues/655
//@ ignore-powerpc
//@ ignore-powerpc64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that we really should not have types that must be ignored in the same file as other types.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So would you suggest splitting off the f16 parts into a f16-globals-metadata test and disabling that on the affected targets?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that would be preferable. If it's powerpc, then it's likely going to be others.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, pulling f16 into its own test suddenly makes the test pass. I'm not too sure what part of the old vs new code is responsible for LLVM emitting the symbol vs not emitting it.

Copy link
Contributor Author

@Gelbpunkt Gelbpunkt Jul 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, fairly simple it turns out:

This emits __gnu_h2f_ieee

static mut F16: f16 = 1.5;
static mut F32: f16 = 2.5;

fn main() {
    _zzz(); // #break

    let a = unsafe { (F16, F32) };
}

fn _zzz() {()}

This doesn't

static mut F16: f16 = 1.5;

fn main() {
    _zzz(); // #break

    let a = unsafe { (F16,) };
}

fn _zzz() {()}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I included a workaround instead of disabling the tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...huh.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my guess is that it tries to convert the f16 to the f32 due to rules about how we represent the tuple layout

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 <adrian@travitia.xyz>
@Gelbpunkt Gelbpunkt force-pushed the debuginfo-tests-ppc branch from 9ce00f5 to 1d0eddb Compare July 20, 2025 05:29
@Gelbpunkt Gelbpunkt changed the title tests: debuginfo: Disable broken tests on powerpc tests: debuginfo: Work around or disable broken tests on powerpc Jul 20, 2025
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
@Gelbpunkt Gelbpunkt requested a review from oli-obk July 21, 2025 19:57
@oli-obk
Copy link
Contributor

oli-obk commented Jul 22, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 22, 2025

📌 Commit e1b6cfe has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 22, 2025
fmease added a commit to fmease/rust that referenced this pull request Jul 24, 2025
…li-obk

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 rust-lang#128973 applies to PowerPC targets as well, though I've only tested 64-bit Linux targets.
bors added a commit that referenced this pull request Jul 24, 2025
Rollup of 16 pull requests

Successful merges:

 - #142569 (Suggest clone in user-write-code instead of inside macro)
 - #143401 (tests: Don't check for self-printed output in std-backtrace.rs test)
 - #143424 (clippy fix: rely on autoderef)
 - #143970 (Update core::mem::copy documentation)
 - #143979 (Test fixes for Arm64EC Windows)
 - #144160 (tests: debuginfo: Work around or disable broken tests on powerpc)
 - #144200 (Tweak output for non-`Clone` values moved into closures)
 - #144209 (Don't emit two `assume`s in transmutes when one is a subset of the other)
 - #144225 (Don't special-case llvm.* as nounwind)
 - #144314 (Hint that choose_pivot returns index in bounds)
 - #144316 (bootstrap: Move musl-root fallback out of sanity check)
 - #144364 (Update `dlmalloc` dependency of libstd)
 - #144368 (resolve: Remove `Scope::CrateRoot`)
 - #144373 (remove deprecated Error::description in impls)
 - #144390 (Remove dead code and extend test coverage and diagnostics around it)
 - #144392 (rustc_public: Remove movability from `RigidTy/AggregateKind::Coroutine`)

r? `@ghost`
`@rustbot` modify labels: rollup
fmease added a commit to fmease/rust that referenced this pull request Jul 25, 2025
…li-obk

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 rust-lang#128973 applies to PowerPC targets as well, though I've only tested 64-bit Linux targets.
bors added a commit that referenced this pull request Jul 25, 2025
Rollup of 17 pull requests

Successful merges:

 - #142569 (Suggest clone in user-write-code instead of inside macro)
 - #143401 (tests: Don't check for self-printed output in std-backtrace.rs test)
 - #143424 (clippy fix: rely on autoderef)
 - #143970 (Update core::mem::copy documentation)
 - #143979 (Test fixes for Arm64EC Windows)
 - #144160 (tests: debuginfo: Work around or disable broken tests on powerpc)
 - #144200 (Tweak output for non-`Clone` values moved into closures)
 - #144209 (Don't emit two `assume`s in transmutes when one is a subset of the other)
 - #144225 (Don't special-case llvm.* as nounwind)
 - #144314 (Hint that choose_pivot returns index in bounds)
 - #144316 (bootstrap: Move musl-root fallback out of sanity check)
 - #144340 (UI test suite clarity changes: Rename `tests/ui/SUMMARY.md` and update rustc dev guide on `error-pattern`)
 - #144364 (Update `dlmalloc` dependency of libstd)
 - #144368 (resolve: Remove `Scope::CrateRoot`)
 - #144390 (Remove dead code and extend test coverage and diagnostics around it)
 - #144392 (rustc_public: Remove movability from `RigidTy/AggregateKind::Coroutine`)
 - #144424 (Allow setting `release-blog-post` label with rustbot)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 25, 2025
…li-obk

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 rust-lang#128973 applies to PowerPC targets as well, though I've only tested 64-bit Linux targets.
bors added a commit that referenced this pull request Jul 25, 2025
Rollup of 16 pull requests

Successful merges:

 - #142569 (Suggest clone in user-write-code instead of inside macro)
 - #143401 (tests: Don't check for self-printed output in std-backtrace.rs test)
 - #143424 (clippy fix: rely on autoderef)
 - #143970 (Update core::mem::copy documentation)
 - #143979 (Test fixes for Arm64EC Windows)
 - #144160 (tests: debuginfo: Work around or disable broken tests on powerpc)
 - #144200 (Tweak output for non-`Clone` values moved into closures)
 - #144209 (Don't emit two `assume`s in transmutes when one is a subset of the other)
 - #144314 (Hint that choose_pivot returns index in bounds)
 - #144316 (bootstrap: Move musl-root fallback out of sanity check)
 - #144340 (UI test suite clarity changes: Rename `tests/ui/SUMMARY.md` and update rustc dev guide on `error-pattern`)
 - #144364 (Update `dlmalloc` dependency of libstd)
 - #144368 (resolve: Remove `Scope::CrateRoot`)
 - #144390 (Remove dead code and extend test coverage and diagnostics around it)
 - #144392 (rustc_public: Remove movability from `RigidTy/AggregateKind::Coroutine`)
 - #144424 (Allow setting `release-blog-post` label with rustbot)

r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Jul 26, 2025
…li-obk

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 rust-lang#128973 applies to PowerPC targets as well, though I've only tested 64-bit Linux targets.
tgross35 added a commit to tgross35/rust that referenced this pull request Jul 26, 2025
…li-obk

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 rust-lang#128973 applies to PowerPC targets as well, though I've only tested 64-bit Linux targets.
bors added a commit that referenced this pull request Jul 26, 2025
Rollup of 9 pull requests

Successful merges:

 - #140871 (Don't lint against named labels in `naked_asm!`)
 - #141663 (rustdoc: add ways of collapsing all impl blocks)
 - #143272 (Upgrade the `fortanix-sgx-abi` dependency)
 - #143585 (`loop_match`: suggest extracting to a `const` item)
 - #143698 (Fix unused_parens false positive)
 - #143859 (Guarantee 8 bytes of alignment in Thread::into_raw)
 - #144042 (Verify llvm-needs-components are not empty and match the --target value)
 - #144160 (tests: debuginfo: Work around or disable broken tests on powerpc)
 - #144431 (Disable has_reliable_f128_math on musl targets)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jul 26, 2025
Rollup of 9 pull requests

Successful merges:

 - #140871 (Don't lint against named labels in `naked_asm!`)
 - #141663 (rustdoc: add ways of collapsing all impl blocks)
 - #143272 (Upgrade the `fortanix-sgx-abi` dependency)
 - #143585 (`loop_match`: suggest extracting to a `const` item)
 - #143698 (Fix unused_parens false positive)
 - #143859 (Guarantee 8 bytes of alignment in Thread::into_raw)
 - #144160 (tests: debuginfo: Work around or disable broken tests on powerpc)
 - #144412 (Small cleanup: Use LocalKey<Cell> methods more)
 - #144431 (Disable has_reliable_f128_math on musl targets)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 0f557ab into rust-lang:master Jul 26, 2025
11 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 26, 2025
rust-timer added a commit that referenced this pull request Jul 26, 2025
Rollup merge of #144160 - Gelbpunkt:debuginfo-tests-ppc, r=oli-obk

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 #128973 applies to PowerPC targets as well, though I've only tested 64-bit Linux targets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants