Commit graph

301339 commits

Author SHA1 Message Date
Matthias Krüger
dd6e4a9206
Rollup merge of #144455 - TDecking:ctlz-cttz, r=SparrowLii
Unify LLVM ctlz/cttz intrinsic generation

The type signature for `llvm.ctlz` is the same as the one for `llvm.cttz`, which enables a small simplification.
2025-07-27 10:19:02 +02:00
Matthias Krüger
9b3d4cbb06
Rollup merge of #144454 - folkertdev:uefi-tests, r=jieyouxu
move uefi test to run-make

Turn the `uefi` test into a more standard `run-make` test, and execute it using the `test-various` CI job like before.

This is just a straightforward translation of the python code, but using `run-make` to supply the target (hence the 3 separate calls in the docker file).

r? ```@jieyouxu```
cc ```@nicholasbishop```

try-job: test-various
2025-07-27 10:19:02 +02:00
Matthias Krüger
e0a42996d5
Rollup merge of #144385 - xizheyin:macro-hygiene, r=petrochenkov
Optimize performance by inline in macro hygiene system

I inline some small method in `rustc_span/src/hygiene.rs` and so on.
2025-07-27 10:19:01 +02:00
Matthias Krüger
58f10376f4
Rollup merge of #144226 - cjgillot:known-panics-panics, r=oli-obk
Do not assert layout in KnownPanicsLint.

Fixes rust-lang/rust#121176
Fixes rust-lang/rust#129109
Fixes rust-lang/rust#130970
Fixes rust-lang/rust#131347
Fixes rust-lang/rust#139872
Fixes rust-lang/rust#140332
2025-07-27 10:19:00 +02:00
bors
052114f0c5 Auto merge of #144526 - jhpratt:rollup-1x1tyvn, r=jhpratt
Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#141840 (If `HOME` is empty, use the fallback instead)
 - rust-lang/rust#144359 (add codegen test for variadics)
 - rust-lang/rust#144379 (test using multiple c-variadic ABIs in the same program)
 - rust-lang/rust#144383 (disable cfg.has_reliable_f128 on amdgcn)
 - rust-lang/rust#144409 (Stop compilation early if macro expansion failed)
 - rust-lang/rust#144422 (library/windows_targets: Fix macro expansion error in 'link' macro)
 - rust-lang/rust#144429 (Enable outline-atomics for aarch64-unknown-linux-musl)
 - rust-lang/rust#144430 (tests: aarch64-outline-atomics: Remove hardcoded target)
 - rust-lang/rust#144445 (Fix `./x check bootstrap` (again))
 - rust-lang/rust#144453 (canonicalize build root in `tests/run-make/linker-warning`)
 - rust-lang/rust#144464 (Only run bootstrap tests in `x test` on CI)
 - rust-lang/rust#144470 (clif: Don't set the `compiler-builtins-no-f16-f128` feature)
 - rust-lang/rust#144480 (Revert "coverage: Enlarge empty spans during MIR instrumentation, not codegen")

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-27 03:20:34 +00:00
Jacob Pratt
8aa3d41b85
Rollup merge of #144480 - Zalathar:revert-empty-span, r=Zalathar
Revert "coverage: Enlarge empty spans during MIR instrumentation, not codegen"

Surprisingly, rust-lang/rust#144298 alone (extracted from rust-lang/rust#140847) was enough to re-trigger the failures observed in https://github.com/rust-lang/rust/issues/141577#issuecomment-3120667286.

---

This reverts commit f877aa7d14.

---

r? ghost
2025-07-26 22:42:39 -04:00
Jacob Pratt
d250b5cae4
Rollup merge of #144470 - tgross35:clif-remove-no-f16-f128, r=bjorn3
clif: Don't set the `compiler-builtins-no-f16-f128` feature

Since rust-lang/rust be35d37d8b ("Use the compiler to determine whether or not to enable f16 and f128"), `compiler-builtins` relies on `rustc` to report whether or not `f16` and `f128` are supported, which is reported by the backend. This means that there should no longer be any need to unconditionally disable the types for clif in Bootstrap.

Backend config: a955f1cd09/compiler/rustc_codegen_cranelift/src/lib.rs (L224-L233)
2025-07-26 22:42:39 -04:00
Jacob Pratt
2c0a331781
Rollup merge of #144464 - Kobzol:x-test-default, r=jieyouxu
Only run bootstrap tests in `x test` on CI

Discussed at https://rust-lang.zulipchat.com/#narrow/channel/122652-new-members/topic/Linux.20Distribution/with/530839642. The bootstrap tests can be sensitive of the environment where they are executed. And now that they are executed very early in the test pipeline, it can be annoying for people who just try to do `x test` when it fails on bootstrap tests.

We could move the bootstrap tests back to the end of the `x test` pipeline, but then it would just fail later. I'd prefer to only run them on CI by default.

Fixes: https://github.com/rust-lang/rust/issues/143973
2025-07-26 22:42:38 -04:00
Jacob Pratt
e04daf98f1
Rollup merge of #144453 - WaffleLapkin:canonical-build-root, r=jieyouxu
canonicalize build root in `tests/run-make/linker-warning`

r? jieyouxu

This is similar to rust-lang/rust#139823 -- the test fails for me because my build dir is a symlink.
2025-07-26 22:42:38 -04:00
Jacob Pratt
c5e81ea8d2
Rollup merge of #144445 - jieyouxu:revert-shared_helpers_tests, r=Kobzol
Fix `./x check bootstrap` (again)

Redoes rust-lang/rust#134883 and reverts 40c2ca9641 from rust-lang/rust#142416. Unfortunately I missed this during review.

- Commit 1: Reverts 40c2ca9641 and re-applies rust-lang/rust#134883.
- Commit 2: Check `./x check bootstrap` in `pr-check-1` to catch "obvious" problems like this.

r? Kobzol
2025-07-26 22:42:37 -04:00
Jacob Pratt
ba4a69134e
Rollup merge of #144430 - Gelbpunkt:aarch64-outline-atomics-target, r=Noratrieb
tests: aarch64-outline-atomics: Remove hardcoded target

Since this test is limited to aarch64 and linux hosts, the `--target` flag is entirely unnecessary and only breaks this on musl hosts. Let the compiler use the default target instead.
2025-07-26 22:42:37 -04:00
Jacob Pratt
aaa37e55d7
Rollup merge of #144429 - Gelbpunkt:outline-atomics-aarch64-musl, r=Amanieu
Enable outline-atomics for aarch64-unknown-linux-musl

They were disabled in bd287fa508 and haven't been causing problems for a while anymore, see https://github.com/rust-lang/rust/issues/89626 for details.

The entire testsuite still passes on `aarch64-unknown-linux-musl` with this feature enabled.
2025-07-26 22:42:36 -04:00
Jacob Pratt
d8099982bc
Rollup merge of #144422 - itf:itf-patch-2-1, r=ChrisDenton
library/windows_targets: Fix macro expansion error in 'link' macro

A recent change altered the definition of the link! macro when the windows_raw_dylib feature is enabled, changing its syntax from pub macro {..} to pub macro($tt:tt) {..} in rust-lang/rust#143592

This change introduced a build failure with the error: "macros that expand to items must be delimited with braces or followed by a semicolon".

We add a semicolon to the line causing the issue as we also modify the non windows_raw_dylib link to make use of the link_dylib macro
2025-07-26 22:42:35 -04:00
Jacob Pratt
c92d61d121
Rollup merge of #144409 - GuillaumeGomez:macro-expansion-early-abort, r=oli-obk
Stop compilation early if macro expansion failed

Fixes rust-lang/rust#116180.

So there isn't really a type that is central for macro expansion and some errors are actually emitted (because the resolution happens after the expansion I suppose) after the expansion pass (like "not found macro"). Sometimes, errors are only emitted on the second "try" (to improve error output). So I couldn't reach a similar solution than what was done in https://github.com/rust-lang/rust/pull/133937 and suggested by ````@estebank```` in https://github.com/rust-lang/rust/issues/116180#issuecomment-3109468922. But maybe I missed something?

So in the end, I realized that there is method called every time (except one, described below) a macro error is actually emitted: `ExtCtxt::trace_macros_diag`. Considering I updated what it did, I renamed it into `macro_error_and_trace_macros_diag` to better reflect it.

There is only one call of `trace_macros_diag` which isn't reporting an error but just used for `macro_trace` feature, so I kept it as is.

r? ````@oli-obk````
2025-07-26 22:42:35 -04:00
Jacob Pratt
2c395c7759
Rollup merge of #144383 - ZuseZ4:disable-f128-on-amdgcn, r=oli-obk
disable cfg.has_reliable_f128 on amdgcn

I was experimenting with compiling a few kernels for amd while working on std::offload. It seems like the logic in https://github.com/rust-lang/compiler-builtins/pull/737 got removed, so I re-introduce it here. Probably should have a test to avoid another regression and make sure that f128 doesn't show up as target feature for amdgcn. It looks like currently we neither check that for nvptx, nor amdgpu. Maybe I could add two revisions to https://github.com/rust-lang/rust/blob/master/tests/ui/float/target-has-reliable-nightly-float.rs?
r? ````@Flakebi````

fixes: https://github.com/rust-lang/rust/issues/144381
2025-07-26 22:42:34 -04:00
Jacob Pratt
c96c80250e
Rollup merge of #144379 - folkertdev:c-variadic-same-program-multiple-abis, r=RalfJung
test using multiple c-variadic ABIs in the same program

tracking issue: https://github.com/rust-lang/rust/issues/100189

Check that multiple c-variadic calling conventions can be used in the same program.

Clang and gcc reject defining functions with a non-default calling convention and a variable
argument list, so C programs that use multiple c-variadic calling conventions are unlikely
to come up. Here we validate that our codegen backends do in fact generate correct code.

(CI will not run this test because it runs on aarch64, I would like to at least test that this runs on windows)

try-job: `x86_64-gnu`
try-job: `x86_64-msvc-*`
try-job: `x86_64-apple-2`
2025-07-26 22:42:34 -04:00
Jacob Pratt
e2c2d1a493
Rollup merge of #144359 - RalfJung:vararg-codegen, r=compiler-errors
add codegen test for variadics

This is a part of https://github.com/rust-lang/rust/pull/144066 that can land without FCP.
2025-07-26 22:42:33 -04:00
Jacob Pratt
85e5100ad4
Rollup merge of #141840 - ChrisDenton:noempty, r=ChrisDenton
If `HOME` is empty, use the fallback instead

This is a minor change in the `home_dir` api. An empty path is never (or should never be) valid so if the `HOME` environment variable is empty then let's use the fallback instead.

r? libs-api
2025-07-26 22:42:32 -04:00
bors
283a0746a2 Auto merge of #143860 - scottmcm:transmute-always-rvalue, r=WaffleLapkin
Let `codegen_transmute_operand` just handle everything

When combined with rust-lang/rust#143720, this means `rvalue_creates_operand` can just return `true` for *every* `Rvalue`.  (A future PR could consider removing it, though just letting it optimize out is fine for now.)

It's nicer anyway, IMHO, because it avoids needing the layout checks to be consistent in the two places, and thus is an overall reduction in code.  Plus it's a more helpful building block when used in other places this way.

(TBH, it probably would have been better to have it this way the whole time, but I clearly didn't understand `rvalue_creates_operand` when I originally wrote rust-lang/rust#109843.)
2025-07-26 22:45:18 +00:00
Camille GILLOT
8817572b45 Do not check Sync during type_of. 2025-07-26 21:53:13 +00:00
bors
ce5fdd7d42 Auto merge of #143500 - compiler-errors:characterize-less, r=lcnr
Skip walking into param-env component if it has no placeholder/re-var

Although it only provides a minor perf improvement, it seems like it could matter in more pathological cases.
2025-07-26 16:57:45 +00:00
bors
133798f9fb Auto merge of #144502 - matthiaskrgr:rollup-o81uk9m, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#144331 (Disable non_exhaustive_omitted_patterns within matches! macro)
 - rust-lang/rust#144376 (Suggest unwrapping when private method name is available in inner type)
 - rust-lang/rust#144421 (Call `is_parsed_attribute` rather than keeping track of a list of parsed attributes manually)
 - rust-lang/rust#144424 (Allow setting `release-blog-post` label with rustbot)
 - rust-lang/rust#144427 (rename ext_tool_checks to extra_checks and use mod.rs)
 - rust-lang/rust#144435 (rustc-dev-guide subtree update)
 - rust-lang/rust#144448 (Limit defaultness query to impl of trait)
 - rust-lang/rust#144462 (Allow pretty printing paths with `-Zself-profile-events=args`)
 - rust-lang/rust#144463 (change_tracker: fix a typo)
 - rust-lang/rust#144468 (resolve: Do not create `NameResolutions` on access unless necessary)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-26 13:52:50 +00:00
Matthias Krüger
429cc9a0dd
Rollup merge of #144468 - petrochenkov:resolution, r=lqd,SparrowLii
resolve: Do not create `NameResolutions` on access unless necessary

`fn resolution` now just performs the access, and `fn resolution_or_default` will insert a default entry if the entry is missing.
2025-07-26 15:28:04 +02:00
Matthias Krüger
093d7261ce
Rollup merge of #144463 - ognevny:change-tracker-typo, r=Kobzol
change_tracker: fix a typo

there is no `llvm.lld` option

r? `@Kobzol`
2025-07-26 15:28:03 +02:00
Matthias Krüger
576af9b779
Rollup merge of #144462 - Kobzol:pretty-print-self-profile-args, r=RalfJung
Allow pretty printing paths with `-Zself-profile-events=args`

`-Zself-profile-events=args` is pretty heavy and can pretty print a lot of stuff. Rather than hunting down specific cases where this happens, I'd just allow calling `trimmed_def_paths` in this mode.

Fixes: https://github.com/rust-lang/rust/issues/144457

r? `@RalfJung`
2025-07-26 15:28:03 +02:00
Matthias Krüger
d88aa06cd9
Rollup merge of #144448 - camsteffen:defaultness-impl-trait-only, r=compiler-errors
Limit defaultness query to impl of trait

I separated this out from https://github.com/rust-lang/rust/pull/144386.
2025-07-26 15:28:02 +02:00
Matthias Krüger
e2a5862d22
Rollup merge of #144435 - tshepang:rdg-sync, r=jieyouxu
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to 4e310882ba.

Created using https://github.com/rust-lang/josh-sync.

r? ```@ghost```
2025-07-26 15:28:02 +02:00
Matthias Krüger
d2d002ee89
Rollup merge of #144427 - lolbinarycat:tidy-extra_checks-rename, r=Kobzol
rename ext_tool_checks to extra_checks and use mod.rs

this makes the triagebot pings for this module simpler

discussed in https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/rename.20and.20reorganize.20ext_tool_checks.20module.3F/with/528398253

r? `@Kobzol`
2025-07-26 15:28:01 +02:00
Matthias Krüger
86fbbb887f
Rollup merge of #144424 - BoxyUwU:release_blog_post_unauthorized_users, r=cuviper
Allow setting `release-blog-post` label with rustbot

r? release

I forgot to do this when we originally added the label and updated the generated description for relnotes issues
2025-07-26 15:28:00 +02:00
Matthias Krüger
b2659bf7e5
Rollup merge of #144421 - JonathanBrouwer:cleanup-malformed-list, r=oli-obk
Call `is_parsed_attribute` rather than keeping track of a list of parsed attributes manually

r? ```@oli-obk```

Nicer code & will prevent issues like https://github.com/rust-lang/rust/pull/144358 in the future
2025-07-26 15:28:00 +02:00
Matthias Krüger
43096cc932
Rollup merge of #144376 - estebank:issue-143795, r=lcnr
Suggest unwrapping when private method name is available in inner type

Given

```rust
fn main() {
    let maybe_vec = Some(vec![1,2,3]);
    assert_eq!(maybe_vec.len(), 3);
}
```

suggest unwraping `maybe_vec` to call `.len()` on the `Vec<_>`.

```
error[E0624]: method `len` is private
  --> $DIR/enum-method-probe.rs:61:9
   |
LL |     res.len();
   |         ^^^ private method
  --> $SRC_DIR/core/src/option.rs:LL:COL
   |
   = note: private method defined here
   |
note: the method `len` exists on the type `Vec<{integer}>`
  --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
help: consider using `Option::expect` to unwrap the `Vec<{integer}>` value, panicking if the value is an `Option::None`
   |
LL |     res.expect("REASON").len();
   |        +++++++++++++++++
```

When a method isn't available, we emit E0599, but when it is private we emit E0624. We now just invoke the same suggestion logic from the later that we already did in the former.

Fix rust-lang/rust#143795.
2025-07-26 15:27:59 +02:00
Matthias Krüger
c9541a2bf8
Rollup merge of #144331 - jplatte:matches-allow-non_exhaustive_omitted_patterns, r=Nadrieril
Disable non_exhaustive_omitted_patterns within matches! macro

Closes rust-lang/rust#117304.

I believe I can skip all of the bootstrap stuff mentioned in https://github.com/rust-lang/rust/issues/117304#issuecomment-1784414453 due to https://blog.rust-lang.org/inside-rust/2025/05/29/redesigning-the-initial-bootstrap-sequence/, right?

cc `@Jules-Bertholet`
2025-07-26 15:27:58 +02:00
Folkert de Vries
69ebf7049f
test using multiple c-variadic ABIs in the same program 2025-07-26 12:26:05 +02:00
Folkert de Vries
bd7b023a6b
move uefi test to run-make 2025-07-26 12:19:02 +02:00
bors
8708f3cd1f Auto merge of #144490 - tgross35:rollup-ps0utme, r=tgross35
Rollup of 9 pull requests

Successful merges:

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

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-26 10:12:14 +00:00
Trevor Gross
39141d01f1
Rollup merge of #144431 - Gelbpunkt:f128-math-musl, r=petrochenkov,tgross35
Disable has_reliable_f128_math on musl targets

musl does not implement the symbols required by rustc for f128 maths. Disable the associated cfg for all musl targets and adjust the tests accordingly.

Closes rust-lang/rust#144423
2025-07-26 02:19:31 -05:00
Trevor Gross
bfacbf2a3d
Rollup merge of #144412 - camsteffen:localkey-cell-refactors, r=petrochenkov
Small cleanup: Use LocalKey<Cell> methods more
2025-07-26 02:19:30 -05:00
Trevor Gross
0f557abcfd
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 rust-lang/rust#128973 applies to PowerPC targets as well, though I've only tested 64-bit Linux targets.
2025-07-26 02:19:30 -05:00
Trevor Gross
2fcea9fb68
Rollup merge of #143859 - orlp:thread-into-raw-align, r=jhpratt
Guarantee 8 bytes of alignment in Thread::into_raw

When using `AtomicPtr` for synchronization it's incredibly useful when you've got a couple bits you can stuff metadata in. By guaranteeing that `Thread`'s `Inner` struct is aligned to 8 bytes everyone can use the bottom 3 bits to signal other things, such as a critical section, etc.

This guarantee is thus very useful and costs us nothing.
2025-07-26 02:19:29 -05:00
Trevor Gross
75ed6de1ee
Rollup merge of #143698 - benschulz:unused-parens-2, r=lcnr,compiler-errors
Fix unused_parens false positive

Resolves rust-lang/rust#143653.

The "no bounds exception" was indiscriminately set to `OneBound` for referents and pointees. However, if the reference or pointer type itself appears in no-bounds position, any constraints it has must be propagated.

```rust
// unused parens: not in no-bounds position
fn foo(_: Box<(dyn Send)>) {}

// unused parens: in no-bounds position, but one-bound exception applies
fn bar(_: Box<dyn Fn(&u32) -> &(dyn Send)>) {}

// *NOT* unused parens: in no-bounds position, but no exceptions to be made
fn baz(_: Box<dyn Fn(&u32) -> &(dyn Send) + Send>) {}
```
2025-07-26 02:19:28 -05:00
Trevor Gross
d8f4ceb8c0
Rollup merge of #143585 - folkertdev:loop-match-suggest-const-block, r=oli-obk
`loop_match`: suggest extracting to a `const` item

tracking issue: https://github.com/rust-lang/rust/issues/132306
fixes https://github.com/rust-lang/rust/issues/143310
fixes https://github.com/rust-lang/rust/issues/143936
2025-07-26 02:19:28 -05:00
Trevor Gross
3b99668f83
Rollup merge of #143272 - tgross35:bump-fortanix, r=jhpratt,jethrogb
Upgrade the `fortanix-sgx-abi` dependency

0.6.1 removes the `compiler-builtins` dependency, part of RUST-142265. The breaking change from 0.5 to 0.6 is for an update to the `insecure_time` API [1].

I validated that `./x c library --target x86_64-fortanix-unknown-sgx` completes successfully with this change.

Link: a34e9767f3 [1]
2025-07-26 02:19:27 -05:00
Trevor Gross
7abb4e2b4c
Rollup merge of #141663 - lolbinarycat:rustdoc-collapse-impl-134429, r=GuillaumeGomez
rustdoc: add ways of collapsing all impl blocks

either shift+click the Summary button,
or use the `_` key.

this collapses everything,
including (inherent) impl blocks.

no need for a special "expand all impl blocks"
method, as impl blocks are expanded during regular "expand all".
doing "expand all" -> "collapse all" will always
result in only impl blocks being expaned.

not sure the best way to add a GUI test.

fixes https://github.com/rust-lang/rust/issues/134429
2025-07-26 02:19:26 -05:00
Trevor Gross
33ed3fc07f
Rollup merge of #140871 - Amanieu:naked-asm-label, r=compiler-errors
Don't lint against named labels in `naked_asm!`

Naked functions are allowed to define global labels, just like `global_asm!`.
2025-07-26 02:19:26 -05:00
bors
051d0e8a95 Auto merge of #144488 - tgross35:rollup-vn0fpot, r=tgross35
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#144089 (Rehome 35 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`)
 - rust-lang/rust#144171 (pattern_analysis: add option to get a full set of witnesses)
 - rust-lang/rust#144201 (Mention type that could be `Clone` but isn't in more cases)
 - rust-lang/rust#144316 (bootstrap: Move musl-root fallback out of sanity check)
 - rust-lang/rust#144339 (Enable dwarf-mixed-versions-lto.rs test on RISC-V (riscv64))
 - rust-lang/rust#144341 (Enable const-vector.rs test on RISC-V (riscv64))
 - rust-lang/rust#144352 (RustWrapper: Suppress getNextNonDebugInfoInstruction)
 - rust-lang/rust#144356 (Add `ignore-backends` annotations in failing GCC backend ui tests)
 - rust-lang/rust#144364 (Update `dlmalloc` dependency of libstd)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-26 07:10:59 +00:00
Trevor Gross
a230b4ff02
Rollup merge of #144364 - alexcrichton:update-dlmalloc, r=Mark-Simulacrum
Update `dlmalloc` dependency of libstd

This primarily pulls in alexcrichton/dlmalloc-rs#55 and alexcrichton/dlmalloc-rs#54 to address rust-lang/rust#144199. Notably the highest byte in the wasm address space is no longer allocatable and additionally the allocator internally uses `wrapping_add` instead of `add` on pointers since on 32-bit platforms offsets might be larger than half the address space.

Closes rust-lang/rust#144199
2025-07-26 01:15:09 -05:00
Trevor Gross
6b1b68f4ee
Rollup merge of #144356 - GuillaumeGomez:gcc-ignore-tests, r=jieyouxu
Add `ignore-backends` annotations in failing GCC backend ui tests

Follow-up of https://github.com/rust-lang/rust/pull/144125.

In the GCC backend, we don't support all ui tests yet and we have a list of tests we currently ignore available [here](https://github.com/rust-lang/rustc_codegen_gcc/blob/master/tests/failing-ui-tests.txt).

This PR adds the `ignore-backends` annotations to the corresponding ui tests.

The second commit is a fix to compiletest, complaining about `ignore-backends`.

r? ```@jieyouxu```
2025-07-26 01:15:08 -05:00
Trevor Gross
2671afeb9e
Rollup merge of #144352 - heiher:llvm-22, r=dianqk
RustWrapper: Suppress getNextNonDebugInfoInstruction

Link: https://github.com/llvm/llvm-project/pull/144383
2025-07-26 01:15:08 -05:00
Trevor Gross
a262dadc40
Rollup merge of #144341 - CaiWeiran:const-vector_test, r=wesleywiser
Enable const-vector.rs test on RISC-V (riscv64)

This PR replaces [#144283](https://github.com/rust-lang/rust/pull/144283) to resolve merge conflicts.

This PR adds support for running the `tests/codegen/const-vector.rs` test on the RISC-V (riscv64) architecture.

Previously, this test would fail on RISC-V targets due to architecture-specific code generation issues. This patch modifies the test to ensure compatibility while preserving its intent.

The change has been tested locally using `./x test` on a riscv64 target, and the test now passes as expected.

### Notes:
- This change is scoped specifically to improve RISC-V compatibility.
- It does not affect behavior or test results on other architectures.
2025-07-26 01:15:07 -05:00
Trevor Gross
e30017ba3e
Rollup merge of #144339 - CaiWeiran:dwarf-mixed-versions-lto_test, r=wesleywiser
Enable dwarf-mixed-versions-lto.rs test on RISC-V (riscv64)

This PR replaces [#144284](https://github.com/rust-lang/rust/pull/144284) to resolve merge conflicts.

This PR adds support for running the `tests/assembly/dwarf-mixed-versions-lto.rs` test on the RISC-V (riscv64) architecture.

Previously, this test would fail on RISC-V targets due to architecture-specific code generation issues. This patch modifies the test to ensure compatibility while preserving its intent.

The change has been tested locally using `./x test` on a riscv64 target, and the test now passes as expected.

### Notes:
- This change is scoped specifically to improve RISC-V compatibility.
- It does not affect behavior or test results on other architectures.
2025-07-26 01:15:06 -05:00