Skip to content

Several ui tests fail on loongarch64 #145692

@Gelbpunkt

Description

@Gelbpunkt

Several test are currently failing when running ./x.py test on loongarch64-unknown-linux-musl. All of these seem to be ABI bugs, so I assume they also fail on the -gnu target.

tests/ui/abi/rust-cold-works-with-rustic-args.rs

[ui] tests/ui/abi/rust-cold-works-with-rustic-args.rs ... F


failures:

---- [ui] tests/ui/abi/rust-cold-works-with-rustic-args.rs stdout ----

error: test compilation failed although it shouldn't!
status: signal: 5 (SIGTRAP)
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/home/jens/rust/build/loongarch64-unknown-linux-musl/stage1/bin/rustc" "/home/jens/rust/tests/ui/abi/rust-cold-works-with-rustic-args.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/home/jens/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/home/jens/rust/vendor" "--sysroot" "/home/jens/rust/build/loongarch64-unknown-linux-musl/stage1" "--target=loongarch64-unknown-linux-musl" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/home/jens/rust/build/loongarch64-unknown-linux-musl/test/ui/abi/rust-cold-works-with-rustic-args" "-A" "unused" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/home/jens/rust/build/loongarch64-unknown-linux-musl/native/rust-test-helpers" "-Ctarget-feature=-crt-static" "-Clink-dead-code=true" "-Cpanic=abort" "-Cforce-unwind-tables=yes" "--extern" "minicore=/home/jens/rust/build/loongarch64-unknown-linux-musl/test/ui/abi/rust-cold-works-with-rustic-args/libminicore.rlib"
stdout: none
stderr: none



failures:
    [ui] tests/ui/abi/rust-cold-works-with-rustic-args.rs

tests/ui/abi/numbers-arithmetic/float-struct.rs

[ui] tests/ui/abi/numbers-arithmetic/float-struct.rs ... F


failures:

---- [ui] tests/ui/abi/numbers-arithmetic/float-struct.rs stdout ----

error: test did not exit with success! code=Some(101) so test would pass with `run-fail`
status: exit status: 101
command: cd "/home/jens/rust/build/loongarch64-unknown-linux-musl/test/ui/abi/numbers-arithmetic/float-struct" && RUSTC="/home/jens/rust/build/loongarch64-unknown-linux-musl/stage1/bin/rustc" RUST_TEST_THREADS="8" "/home/jens/rust/build/loongarch64-unknown-linux-musl/test/ui/abi/numbers-arithmetic/float-struct/a"
stdout: none
--- stderr -------------------------------

thread 'main' (25713) panicked at /home/jens/rust/tests/ui/abi/numbers-arithmetic/float-struct.rs:41:5:
assertion `left == right` failed
  left: Regular(1.0, 0.0)
 right: Regular(1.0, 2.0)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------



failures:
    [ui] tests/ui/abi/numbers-arithmetic/float-struct.rs

This one seems to output random numbers for the second field of the struct.

tests/ui/abi/debug.rs#generic

[ui] tests/ui/abi/debug.rs#generic ... F


failures:

---- [ui] tests/ui/abi/debug.rs#generic stdout ----
Saved the actual stderr to `/home/jens/rust/build/loongarch64-unknown-linux-musl/test/ui/abi/debug.generic/debug.generic.stderr`
diff of stderr:

31	                   mode: Direct(
32	                       ArgAttributes {
33	                           regular: NoUndef,
-	                           arg_ext: None,
+	                           arg_ext: Zext,
35	                           pointee_size: Size(0 bytes),
36	                           pointee_align: None,
37	                       },

308	                   mode: Direct(
309	                       ArgAttributes {
310	                           regular: NoUndef,
-	                           arg_ext: None,
+	                           arg_ext: Zext,
312	                           pointee_size: Size(0 bytes),
313	                           pointee_align: None,
314	                       },

380	                   mode: Direct(
381	                       ArgAttributes {
382	                           regular: NoUndef,
-	                           arg_ext: None,
+	                           arg_ext: Sext,
384	                           pointee_size: Size(0 bytes),
385	                           pointee_align: None,
386	                       },

681	                   mode: Direct(
682	                       ArgAttributes {
683	                           regular: NoUndef,
-	                           arg_ext: None,
+	                           arg_ext: Sext,
685	                           pointee_size: Size(0 bytes),
686	                           pointee_align: None,
687	                       },

759	                   mode: Direct(
760	                       ArgAttributes {
761	                           regular: NoUndef,
-	                           arg_ext: None,
+	                           arg_ext: Sext,
763	                           pointee_size: Size(0 bytes),
764	                           pointee_align: None,
765	                       },

831	                   mode: Direct(
832	                       ArgAttributes {
833	                           regular: NoUndef,
-	                           arg_ext: None,
+	                           arg_ext: Sext,
835	                           pointee_size: Size(0 bytes),
836	                           pointee_align: None,
837	                       },


The actual stderr differed from the expected stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args abi/debug.rs`

error in revision `generic`: 1 errors occurred comparing output.

Seems like the output here is the same as on riscv64 and it might need special casing.

Meta

The built stage1 compiler is the following version:

rustc --version --verbose:

rustc 1.91.0-dev
binary: rustc
commit-hash: 040a98af70f0a7da03f3d5356531b28a2a7a77e4
commit-date: 2025-08-20
host: loongarch64-unknown-linux-musl
release: 1.91.0-dev
LLVM version: 21.1.0

cc @heiher

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ABIArea: Concerning the application binary interface (ABI)A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.O-loongarchTarget: LoongArch (LA32R, LA32S, LA64)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions