Commit graph

7287 commits

Author SHA1 Message Date
Matthias Krüger 39fe991dd9
Rollup merge of #126137 - Enselic:normalize-generic-arg, r=compiler-errors
tests: Add ui/higher-ranked/trait-bounds/normalize-generic-arg.rs

This adds a regression test for an ICE "accidentally" fixed by https://github.com/rust-lang/rust/pull/101947 that does not add a test for this particular case.

Closes #107564.

I have confirmed the added test code fails with `nightly-2023-01-09` (and passes with `nightly-2023-01-10` and of course recent `nightly`).
2024-06-09 10:17:08 +02:00
bors a595f3218e Auto merge of #126150 - RalfJung:offset_of_slice, r=compiler-errors
offset_of: allow (unstably) taking the offset of slice tail fields

Fields of type `[T]` have a statically known offset, so there is no reason to forbid them in `offset_of!`. This PR adds the `offset_of_slice` feature to allow them.

I created a tracking issue: https://github.com/rust-lang/rust/issues/126151.
2024-06-09 00:50:30 +00:00
Ralf Jung eb584a23bf offset_of: allow (unstably) taking the offset of slice tail fields 2024-06-08 18:17:55 +02:00
Martin Nordholts 1293ef735e tests: Add ui/higher-ranked/trait-bounds/normalize-generic-arg.rs 2024-06-08 17:48:21 +02:00
bors d8fde50745 Auto merge of #126111 - Zalathar:fulldeps-hotplug, r=jieyouxu
Port `tests/run-make-fulldeps/hotplug_codegen_backend` to ui-fulldeps

This is the last remaining run-make-fulldeps test, which means I actually had to leave behind a dummy README file to prevent compiletest from complaining about a missing directory.

(Removing the run-make-fulldeps suite entirely is non-trivial, so I intend to do so in a separate PR after this one.)

---

I wasn't sure about adding a new kind of aux build just for this one test, so I also tried to just port this test from Makefile to [rmake](https://github.com/rust-lang/rust/issues/121876) instead.

But I found that I couldn't get rmake to fully work for a run-make-fulldeps test, which convinced me that getting rid of run-make-fulldeps is worthwhile.

r? `@jieyouxu`
2024-06-08 07:23:17 +00:00
León Orell Valerian Liehr 4bca296f73
Rollup merge of #126065 - bvanjoi:fix-124490, r=petrochenkov
mark binding undetermined if target name exist and not obtained

- Fixes #124490
- Fixes #125013

Following up on #124840, I think handling only `target_bindings` is sufficient.

r? `@petrochenkov`
2024-06-08 04:25:45 +02:00
Matthias Krüger 13314df21b
Rollup merge of #125572 - mu001999-contrib:dead/enhance, r=pnkfelix
Detect pub structs never constructed and unused associated constants

<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r​? <reviewer name>
-->

Lints never constructed public structs.

If we don't provide public methods to construct public structs with private fields, and don't construct them in the local crate. They would be never constructed. So that we can detect such public structs.

---
Update:

Also lints unused associated constants in traits.
2024-06-07 20:14:28 +02:00
Matthias Krüger 6e534c73c3
Rollup merge of #124214 - carbotaniuman:parse_unsafe_attrs, r=michaelwoerister
Parse unsafe attributes

Initial parse implementation for #123757

This is the initial work to parse unsafe attributes, which is represented as an extra `unsafety` field in `MetaItem` and `AttrItem`. There's two areas in the code where it appears that parsing is done manually and not using the parser stuff, and I'm not sure how I'm supposed to thread the change there.
2024-06-07 20:14:28 +02:00
bohan 93feaa6685 mark binding undetermined if target name exist and not obtained 2024-06-07 21:23:56 +08:00
bors 1be24d70ce Auto merge of #125918 - oli-obk:const_block_ice, r=compiler-errors
Revert: create const block bodies in typeck via query feeding

as per the discussion in https://github.com/rust-lang/rust/pull/125806#discussion_r1622563948

It was a mistake to try to shoehorn const blocks and some specific anon consts into the same box and feed them during typeck. It turned out not simplifying anything (my hope was that we could feed `type_of` to start avoiding the huge HIR matcher, but that didn't work out), but instead making a few things more fragile.

reverts the const-block-specific parts of https://github.com/rust-lang/rust/pull/124650

`@bors` rollup=never had a small perf impact previously

fixes https://github.com/rust-lang/rust/issues/125846

r? `@compiler-errors`
2024-06-07 09:08:59 +00:00
Oli Scherer bbcd8794d0 Add regression test 2024-06-07 08:33:58 +00:00
Oli Scherer cbee17d502 Revert "Create const block DefIds in typeck instead of ast lowering"
This reverts commit ddc5f9b6c1.
2024-06-07 08:33:58 +00:00
Zalathar 58ba77f4aa compiletest: Don't pass --out-dir if the compile flags include -o 2024-06-07 15:55:36 +10:00
Jubilee b1ab8d59f4
Rollup merge of #126101 - lqd:revert-124099, r=wesleywiser
Revert "Disallow ambiguous attributes on expressions" on nightly

As discussed in [today's t-compiler meeting](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202024-06-06/near/443079505), this reverts PR #124099 to fix P-critical beta regressions #125199.

r? ``@wesleywiser``

Opening as draft so that ``@wesleywiser`` and ``@apiraino,`` you can tell me whether you wanted:
1. a `beta-accepted` revert of #124099 on nightly (this PR)? That will need to be backported to beta (even though #126093 may be the last of those)
2. a revert of #124099 on beta?
3. all of the above?

I also opened #126102, another draft PR to revert #124099 on beta, should you choose options 2 or 3.
2024-06-06 21:10:11 -07:00
Jubilee 6a42df7517
Rollup merge of #126040 - Urgau:unreachable_pub-fields-less, r=petrochenkov
Don't warn on fields in the `unreachable_pub` lint

This PR restrict the `unreachable_pub` lint by not linting on `pub` fields of `pub(restricted)` structs and unions. This is done because that can quickly clutter the code for an uncertain value, in particular since the "real" visibility is defined by the parent (the struct it-self).

This is meant to address one of the last concern of the `unreachable_pub` lint.

r? ``@petrochenkov``
2024-06-06 21:10:10 -07:00
carbotaniuman b82c524996 Add double unsafe test 2024-06-06 20:27:25 -05:00
carbotaniuman 230b58febf Error on unsafe on non-unsafe attribute 2024-06-06 20:26:28 -05:00
carbotaniuman 48851d9adb Add tests 2024-06-06 20:26:28 -05:00
carbotaniuman c4de986afa Disallow unsafe in derive 2024-06-06 20:26:27 -05:00
carbotaniuman 67f5dd1ef1 Parse unsafe attributes 2024-06-06 20:26:27 -05:00
bors 76e7a0849c Auto merge of #126104 - workingjubilee:rollup-t1ac2ld, r=workingjubilee
Rollup of 12 pull requests

Successful merges:

 - #125220 (Repair several `riscv64gc-unknown-linux-gnu` codegen tests)
 - #126033 (CI: fix publishing of toolstate history)
 - #126034 (Clarify our tier 1 Windows Server support)
 - #126035 (Some minor query system cleanups)
 - #126051 (Clarify an `x fmt` error.)
 - #126059 (Raise `DEFAULT_MIN_STACK_SIZE` to at least 64KiB)
 - #126064 (Migrate `run-make/manual-crate-name` to `rmake.rs`)
 - #126072 (compiletest: Allow multiple `//@ run-flags:` headers)
 - #126073 (Port `tests/run-make-fulldeps/obtain-borrowck` to ui-fulldeps)
 - #126081 (Do not use relative paths to Rust source root in run-make tests)
 - #126086 (use windows compatible executable name for libcxx-version)
 - #126096 ([RFC-2011] Allow `core_intrinsics` when activated)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-06 22:27:56 +00:00
Jubilee aa4cffc012
Rollup merge of #125220 - ferrocene:hoverbear/repair-riscv64-codegen-tests, r=erikdesjardins,workingjubilee
Repair several `riscv64gc-unknown-linux-gnu` codegen tests

Together with joshua.zivkovic@codethink.co.uk, we've been starting to explore improving the state of the `riscv64gc-unknown-linux-gnu` target. Additionally, I'm looking to add support for this platform in [Ferrocene](https://github.com/ferrocene/ferrocene) ([Related PR](https://github.com/ferrocene/ferrocene/pull/618)).

While running the test suite, we noted several tests were failing.

It appears that several of the riscv64gc-unknown-linux-gnu codegen tests have not been updated in some time and seem to have experienced a small amount of bitrot.

After speaking with `@workingjubilee` (as I have little expertise in LLVM codegen) I believe these changes to be correct.

### `tests/codegen/riscv-abi/call-llvm-intrinsics.rs`

I believe this change does not alter what the test is testing and is harmless.

### `tests/codegen/riscv-abi/riscv64-lp64d-abi.rs`

The changes largely mirrors those from loongarch64:

550d1b4fb6/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs (L13-L15)

550d1b4fb6/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs (L153-L155)

550d1b4fb6/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs (L259-L261)

550d1b4fb6/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs (L263-L267)

### `tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs`

The changes largely mirror that from loongarch64 or llvm:

550d1b4fb6/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs (L13-L26)

5399a24c66/clang/test/CodeGen/RISCV/riscv64-abi.c (L612-L617)

### `tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs`

The test is ignored since `-Csplit-debuginfo=unpacked` is not supported on this platform. Context can be found in #120518.

## Reproducing the failures

Using a `config.toml` with the following:

```toml
# ...

target = [
   # ...
   "riscv64gc-unknown-linux-gnu",
]
```

> [!NOTE]
> You may need to install a RICV-V toolchain! We get ours from [here](https://www.embecosm.com/resources/tool-chain-downloads/#riscv-linux).
>
> If you are using an old (20.04) Ubuntu container the compiler in the repositories (`gcc-riscv64-linux-gnu`) won't work!

Run the following test suite:

```bash
./x.py test tests/codegen
```

<details>

<summary>Expected output</summary>

```
ana@Autonoma:~/git/rust-lang/rust$ ./x.py test tests/codegen
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.03s
WARNING: The `change-id` is missing in the `config.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.
NOTE: to silence this warning, add `change-id = 124501` at the top of `config.toml`
Building stage0 library artifacts (x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.11s
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.18s
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`)
Building stage1 library artifacts (x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.11s
Building stage0 tool compiletest (x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.11s
Testing stage1 compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu)

running 652 tests
iii......ii...iiiiiii...........ii..iii....i......i......i......iii...iiiii..i..i...i...  88/652
.............i............iii..iiii.....................i............................... 176/652
iiiiiii.............iiiiiiiii.iii....i.................i....................i...ii....i. 264/652
..i........i.........i..i........iii.........i............ii................ii..i....... 352/652
...............i...i....ii.i.....i......................ii.ii...iiiiiiiiiiiiiiiiiiiiiiii 440/652
iii....................iiiiiiiiiiiiiiii.........................iii.i..........i........ 528/652
...i...ii...........i...ii.i..i..........i..............................ii.....ii.i..ii. 616/652
.ii.................................

test result: ok. 498 passed; 0 failed; 154 ignored; 0 measured; 0 filtered out; finished in 4.76s

Building stage1 library artifacts (x86_64-unknown-linux-gnu -> riscv64gc-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.10s
Testing stage1 compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> riscv64gc-unknown-linux-gnu)

running 652 tests
iii......ii..iiiiiii.....i..i..i.i...i........i..i.......i......iii...iiiii..i.i....i...  88/652
.............i............iii..iiii....................i...............................i 176/652
iiiiii..............iiiiiiiii.iii.....i................i..................i.....ii....i. 264/652
..i........i..........i.i........iii..........i...........ii................ii..i....... 352/652
...............i...i....ii.i.....i......................i.......iii.iiiiiiiiiiiiiiiiiiii 440/652
iiii...................iiiiiiiiiiiiiiii................
[codegen] tests/codegen/riscv-abi/call-llvm-intrinsics.rs ... F
.....
[codegen] tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs ... F
..iii.i.
[codegen] tests/codegen/riscv-abi/riscv64-lp64d-abi.rs ... F
........i........ 528/652
...i...ii...........i...ii..i.i..........i..............................ii.....ii.i..ii. 616/652
.ii.................................

failures:

---- [codegen] tests/codegen/riscv-abi/call-llvm-intrinsics.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/test/codegen/riscv-abi/call-llvm-intrinsics/call-llvm-intrinsics.ll" "/home/ana/git/rust-lang/rust/tests/codegen/riscv-abi/call-llvm-intrinsics.rs" "--check-prefix=CHECK" "--check-prefix" "NONMSVC" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/home/ana/git/rust-lang/rust/tests/codegen/riscv-abi/call-llvm-intrinsics.rs:26:12: error: CHECK: expected string not found in input
 // CHECK: store float 4.000000e+00, float* %{{.}}, align 4
           ^
/home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/test/codegen/riscv-abi/call-llvm-intrinsics/call-llvm-intrinsics.ll:1:1: note: scanning from here
; ModuleID = 'call_llvm_intrinsics.b4a95fd5831b1bb7-cgu.0'
^
/home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/test/codegen/riscv-abi/call-llvm-intrinsics/call-llvm-intrinsics.ll:53:2: note: possible intended match here
 store float 4.000000e+00, ptr %3, align 4
 ^

Input file: /home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/test/codegen/riscv-abi/call-llvm-intrinsics/call-llvm-intrinsics.ll
Check file: /home/ana/git/rust-lang/rust/tests/codegen/riscv-abi/call-llvm-intrinsics.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: ; ModuleID = 'call_llvm_intrinsics.b4a95fd5831b1bb7-cgu.0'
check:26'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
            2: source_filename = "call_llvm_intrinsics.b4a95fd5831b1bb7-cgu.0"
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            3: target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            4: target triple = "riscv64-unknown-linux-gnu"
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            5:
check:26'0     ~
            6: `@alloc_cebd5a1664be1c73eee4a1aab7937c96` = private unnamed_addr constant <{ [2 x i8] }> <{ [2 x i8] c"A\0A" }>, align 1
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            7: `@alloc_bddb4fe6d67b5a5a93d73a63d68b4b9e` = private unnamed_addr constant <{ ptr, [8 x i8] }> <{ ptr `@alloc_cebd5a1664be1c73eee4a1aab7937c96,` [8 x i8] c"\02\00\00\00\00\00\00\00" }>, align 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            8: `@0` = private unnamed_addr constant <{ [8 x i8], [8 x i8] }> <{ [8 x i8] zeroinitializer, [8 x i8] undef }>, align 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            9:
check:26'0     ~
           10: ; core::ptr::drop_in_place<call_llvm_intrinsics::A>
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           11: ; Function Attrs: uwtable
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
           12: define internal void `@"_ZN4core3ptr44drop_in_place$LT$call_llvm_intrinsics..A$GT$17hf11b50bd9b9c5359E"(ptr` noalias noundef nonnull align 1 %_1) unnamed_addr #0 {
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           13: start:
check:26'0     ~~~~~~~
           14: ; call <call_llvm_intrinsics::A as core::ops::drop::Drop>::drop
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           15:  call void `@"_ZN65_$LT$call_llvm_intrinsics..A$u20$as$u20$core..ops..drop..Drop$GT$4drop17hc84a7f61b5f719bdE"(ptr` noalias noundef nonnull align 1 %_1)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           16:  ret void
check:26'0     ~~~~~~~~~~
           17: }
check:26'0     ~~
           18:
check:26'0     ~
           19: ; <call_llvm_intrinsics::A as core::ops::drop::Drop>::drop
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           20: ; Function Attrs: uwtable
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
           21: define void `@"_ZN65_$LT$call_llvm_intrinsics..A$u20$as$u20$core..ops..drop..Drop$GT$4drop17hc84a7f61b5f719bdE"(ptr` noalias noundef nonnull align 1 %self) unnamed_addr #0 {
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           22: start:
check:26'0     ~~~~~~~
           23:  %_3 = alloca [48 x i8], align 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           24:  call void `@llvm.lifetime.start.p0(i64` 48, ptr %_3)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           25:  store ptr `@alloc_bddb4fe6d67b5a5a93d73a63d68b4b9e,` ptr %_3, align 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           26:  %0 = getelementptr inbounds i8, ptr %_3, i64 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           27:  store i64 1, ptr %0, align 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           28:  %1 = load ptr, ptr `@0,` align 8, !align !4, !noundef !5
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           29:  %2 = load i64, ptr getelementptr inbounds (i8, ptr `@0,` i64 8), align 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           30:  %3 = getelementptr inbounds i8, ptr %_3, i64 32
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           31:  store ptr %1, ptr %3, align 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           32:  %4 = getelementptr inbounds i8, ptr %3, i64 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           33:  store i64 %2, ptr %4, align 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           34:  %5 = getelementptr inbounds i8, ptr %_3, i64 16
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           35:  store ptr inttoptr (i64 8 to ptr), ptr %5, align 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           36:  %6 = getelementptr inbounds i8, ptr %5, i64 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           37:  store i64 0, ptr %6, align 8
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           38: ; call std::io::stdio::_print
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           39:  call void `@_ZN3std2io5stdio6_print17h38b16d890daf9d05E(ptr` noalias nocapture noundef align 8 dereferenceable(48) %_3)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           40:  call void `@llvm.lifetime.end.p0(i64` 48, ptr %_3)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           41:  ret void
check:26'0     ~~~~~~~~~~
           42: }
check:26'0     ~~
           43:
check:26'0     ~
           44: ; call_llvm_intrinsics::do_call
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           45: ; Function Attrs: uwtable
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
           46: define void `@_ZN20call_llvm_intrinsics7do_call17h1d78694c55381316E()` unnamed_addr #0 {
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           47: start:
check:26'0     ~~~~~~~
           48:  %0 = alloca [4 x i8], align 4
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           49:  %1 = alloca [4 x i8], align 4
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           50:  %2 = alloca [4 x i8], align 4
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           51:  %3 = alloca [4 x i8], align 4
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           52:  %_1 = alloca [0 x i8], align 1
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           53:  store float 4.000000e+00, ptr %3, align 4
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:26'1      ?                                          possible intended match
           54:  call void `@llvm.lifetime.start.p0(i64` 4, ptr %2)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           55:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 4 %2, ptr align 4 %3, i64 4, i1 false)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           56:  %4 = load float, ptr %2, align 4
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           57:  call void `@llvm.lifetime.end.p0(i64` 4, ptr %2)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           58:  %5 = call float `@llvm.sqrt.f32(float` %4) #4
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           59:  call void `@llvm.lifetime.start.p0(i64` 4, ptr %1)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           60:  call void `@llvm.lifetime.start.p0(i64` 4, ptr %0)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           61:  store float %5, ptr %0, align 4
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           62:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 4 %1, ptr align 4 %0, i64 4, i1 false)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           63:  call void `@llvm.lifetime.end.p0(i64` 4, ptr %0)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           64:  %_2 = load float, ptr %1, align 4, !noundef !5
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           65:  call void `@llvm.lifetime.end.p0(i64` 4, ptr %1)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           66: ; call core::ptr::drop_in_place<call_llvm_intrinsics::A>
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           67:  call void `@"_ZN4core3ptr44drop_in_place$LT$call_llvm_intrinsics..A$GT$17hf11b50bd9b9c5359E"(ptr` noalias noundef nonnull align 1 %_1)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           68:  ret void
check:26'0     ~~~~~~~~~~
           69: }
check:26'0     ~~
           70:
check:26'0     ~
           71: ; std::io::stdio::_print
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
           72: ; Function Attrs: uwtable
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
           73: declare void `@_ZN3std2io5stdio6_print17h38b16d890daf9d05E(ptr` noalias nocapture noundef align 8 dereferenceable(48)) unnamed_addr #0
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           74:
check:26'0     ~
           75: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           76: declare void `@llvm.memcpy.p0.p0.i64(ptr` noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           77:
check:26'0     ~
           78: ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           79: declare float `@llvm.sqrt.f32(float)` unnamed_addr #2
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           80:
check:26'0     ~
           81: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           82: declare void `@llvm.lifetime.start.p0(i64` immarg, ptr nocapture) #3
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           83:
check:26'0     ~
           84: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           85: declare void `@llvm.lifetime.end.p0(i64` immarg, ptr nocapture) #3
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           86:
check:26'0     ~
           87: attributes #0 = { uwtable "target-cpu"="generic-rv64" "target-features"="+m,+a,+f,+d,+c" }
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           88: attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           89: attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           90: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           91: attributes #4 = { nounwind }
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           92:
check:26'0     ~
           93: !llvm.module.flags = !{!0, !1, !2}
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           94: !llvm.ident = !{!3}
check:26'0     ~~~~~~~~~~~~~~~~~~~~
           95:
check:26'0     ~
           96: !0 = !{i32 8, !"PIC Level", i32 2}
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           97: !1 = !{i32 1, !"Code Model", i32 3}
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           98: !2 = !{i32 1, !"target-abi", !"lp64d"}
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           99: !3 = !{!"rustc version 1.80.0-dev"}
check:26'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          100: !4 = !{i64 8}
check:26'0     ~~~~~~~~~~~~~~
          101: !5 = !{}
check:26'0     ~~~~~~~~~
>>>>>>
------------------------------------------

---- [codegen] tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/test/codegen/riscv-abi/riscv64-lp64f-lp64d-abi/riscv64-lp64f-lp64d-abi.ll" "/home/ana/git/rust-lang/rust/tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs" "--check-prefix=CHECK" "--check-prefix" "NONMSVC" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/home/ana/git/rust-lang/rust/tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs:7:11: error: CHECK: expected string not found in input
// CHECK: define void `@f_fpr_tracking(float` %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, i8 zeroext %i)
          ^
/home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/test/codegen/riscv-abi/riscv64-lp64f-lp64d-abi/riscv64-lp64f-lp64d-abi.ll:1:1: note: scanning from here
; ModuleID = 'riscv64_lp64f_lp64d_abi.ae8fa95bac1a0604-cgu.0'
^
/home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/test/codegen/riscv-abi/riscv64-lp64f-lp64d-abi/riscv64-lp64f-lp64d-abi.ll:9:1: note: possible intended match here
define void `@f_fpr_tracking(float` %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, i8 noundef zeroext %i) unnamed_addr #0 {
^

Input file: /home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/test/codegen/riscv-abi/riscv64-lp64f-lp64d-abi/riscv64-lp64f-lp64d-abi.ll
Check file: /home/ana/git/rust-lang/rust/tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1: ; ModuleID = 'riscv64_lp64f_lp64d_abi.ae8fa95bac1a0604-cgu.0'
check:7'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           2: source_filename = "riscv64_lp64f_lp64d_abi.ae8fa95bac1a0604-cgu.0"
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3: target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           4: target triple = "riscv64-unknown-linux-gnu"
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           5:
check:7'0     ~
           6: %Tricky1 = type { [1 x float] }
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           7:
check:7'0     ~
           8: ; Function Attrs: uwtable
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
           9: define void `@f_fpr_tracking(float` %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, i8 noundef zeroext %i) unnamed_addr #0 {
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:7'1     ?                                                                                                                                                     possible intended match
          10: start:
check:7'0     ~~~~~~~
          11:  %8 = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          12:  %h = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          13:  %9 = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          14:  %g = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          15:  %10 = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          16:  %f = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          17:  %11 = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          18:  %e = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          19:  %12 = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          20:  %d = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          21:  %13 = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          22:  %c = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          23:  %14 = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          24:  %b = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          25:  %15 = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          26:  %a = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          27:  call void `@llvm.lifetime.start.p0(i64` 4, ptr %15)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          28:  store float %0, ptr %15, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          29:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 4 %a, ptr align 4 %15, i64 4, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          30:  call void `@llvm.lifetime.end.p0(i64` 4, ptr %15)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          31:  call void `@llvm.lifetime.start.p0(i64` 4, ptr %14)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          32:  store float %1, ptr %14, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          33:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 4 %b, ptr align 4 %14, i64 4, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          34:  call void `@llvm.lifetime.end.p0(i64` 4, ptr %14)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          35:  call void `@llvm.lifetime.start.p0(i64` 4, ptr %13)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          36:  store float %2, ptr %13, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          37:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 4 %c, ptr align 4 %13, i64 4, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          38:  call void `@llvm.lifetime.end.p0(i64` 4, ptr %13)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          39:  call void `@llvm.lifetime.start.p0(i64` 4, ptr %12)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          40:  store float %3, ptr %12, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          41:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 4 %d, ptr align 4 %12, i64 4, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          42:  call void `@llvm.lifetime.end.p0(i64` 4, ptr %12)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          43:  call void `@llvm.lifetime.start.p0(i64` 4, ptr %11)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          44:  store float %4, ptr %11, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          45:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 4 %e, ptr align 4 %11, i64 4, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          46:  call void `@llvm.lifetime.end.p0(i64` 4, ptr %11)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          47:  call void `@llvm.lifetime.start.p0(i64` 4, ptr %10)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          48:  store float %5, ptr %10, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          49:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 4 %f, ptr align 4 %10, i64 4, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          50:  call void `@llvm.lifetime.end.p0(i64` 4, ptr %10)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          51:  call void `@llvm.lifetime.start.p0(i64` 4, ptr %9)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          52:  store float %6, ptr %9, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          53:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 4 %g, ptr align 4 %9, i64 4, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          54:  call void `@llvm.lifetime.end.p0(i64` 4, ptr %9)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          55:  call void `@llvm.lifetime.start.p0(i64` 4, ptr %8)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          56:  store float %7, ptr %8, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          57:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 4 %h, ptr align 4 %8, i64 4, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          58:  call void `@llvm.lifetime.end.p0(i64` 4, ptr %8)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          59:  ret void
check:7'0     ~~~~~~~~~~
          60: }
check:7'0     ~~
          61:
check:7'0     ~
          62: ; Function Attrs: uwtable
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
          63: define void `@f_float_s_arg(float` %0) unnamed_addr #0 {
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          64: start:
check:7'0     ~~~~~~~
          65:  %1 = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          66:  %a = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          67:  call void `@llvm.lifetime.start.p0(i64` 4, ptr %1)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          68:  store float %0, ptr %1, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          69:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 4 %a, ptr align 4 %1, i64 4, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          70:  call void `@llvm.lifetime.end.p0(i64` 4, ptr %1)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          71:  ret void
check:7'0     ~~~~~~~~~~
          72: }
check:7'0     ~~
          73:
check:7'0     ~
          74: ; Function Attrs: uwtable
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
          75: define float `@f_ret_float_s()` unnamed_addr #0 {
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          76: start:
check:7'0     ~~~~~~~
          77:  %_0 = alloca [4 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          78:  store float 1.000000e+00, ptr %_0, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          79:  %0 = load float, ptr %_0, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          80:  ret float %0
check:7'0     ~~~~~~~~~~~~~~
          81: }
check:7'0     ~~
          82:
check:7'0     ~
          83: ; Function Attrs: uwtable
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
          84: define void `@f_float_float_s_arg({` float, float } %0) unnamed_addr #0 {
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          85: start:
check:7'0     ~~~~~~~
          86:  %1 = alloca [8 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          87:  %a = alloca [8 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          88:  call void `@llvm.lifetime.start.p0(i64` 8, ptr %1)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          89:  store { float, float } %0, ptr %1, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          90:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 4 %a, ptr align 4 %1, i64 8, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          91:  call void `@llvm.lifetime.end.p0(i64` 8, ptr %1)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          92:  ret void
check:7'0     ~~~~~~~~~~
          93: }
check:7'0     ~~
          94:
check:7'0     ~
          95: ; Function Attrs: uwtable
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
          96: define { float, float } `@f_ret_float_float_s()` unnamed_addr #0 {
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          97: start:
check:7'0     ~~~~~~~
          98:  %0 = alloca [8 x i8], align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          99:  store float 1.000000e+00, ptr %0, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         100:  %1 = getelementptr inbounds i8, ptr %0, i64 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         101:  store float 2.000000e+00, ptr %1, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         102:  %2 = load { float, float }, ptr %0, align 4
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         103:  ret { float, float } %2
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
         104: }
check:7'0     ~~
         105:
check:7'0     ~
         106: ; Function Attrs: uwtable
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
         107: define void `@f_float_float_s_arg_insufficient_fprs(float` %0, float %1, float %2, float %3, float %4, float %5, float %6, i64 %7) unnamed_addr #0 {
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         108: start:
check:7'0     ~~~~~~~
         109:  %8 = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           .
           .
           .
>>>>>>
------------------------------------------

---- [codegen] tests/codegen/riscv-abi/riscv64-lp64d-abi.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/test/codegen/riscv-abi/riscv64-lp64d-abi/riscv64-lp64d-abi.ll" "/home/ana/git/rust-lang/rust/tests/codegen/riscv-abi/riscv64-lp64d-abi.rs" "--check-prefix=CHECK" "--check-prefix" "NONMSVC" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/home/ana/git/rust-lang/rust/tests/codegen/riscv-abi/riscv64-lp64d-abi.rs:7:11: error: CHECK: expected string not found in input
// CHECK: define void `@f_fpr_tracking(double` %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, i8 zeroext %i)
          ^
/home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/test/codegen/riscv-abi/riscv64-lp64d-abi/riscv64-lp64d-abi.ll:1:1: note: scanning from here
; ModuleID = 'riscv64_lp64d_abi.bed282cd9c73cc17-cgu.0'
^
/home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/test/codegen/riscv-abi/riscv64-lp64d-abi/riscv64-lp64d-abi.ll:9:1: note: possible intended match here
define void `@f_fpr_tracking(double` %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, i8 noundef zeroext %i) unnamed_addr #0 {
^

Input file: /home/ana/git/rust-lang/rust/build/x86_64-unknown-linux-gnu/test/codegen/riscv-abi/riscv64-lp64d-abi/riscv64-lp64d-abi.ll
Check file: /home/ana/git/rust-lang/rust/tests/codegen/riscv-abi/riscv64-lp64d-abi.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1: ; ModuleID = 'riscv64_lp64d_abi.bed282cd9c73cc17-cgu.0'
check:7'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           2: source_filename = "riscv64_lp64d_abi.bed282cd9c73cc17-cgu.0"
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           3: target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128"
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           4: target triple = "riscv64-unknown-linux-gnu"
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           5:
check:7'0     ~
           6: %Tricky1 = type { [1 x double] }
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           7:
check:7'0     ~
           8: ; Function Attrs: uwtable
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
           9: define void `@f_fpr_tracking(double` %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, i8 noundef zeroext %i) unnamed_addr #0 {
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:7'1     ?                                                                                                                                                             possible intended match
          10: start:
check:7'0     ~~~~~~~
          11:  %8 = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          12:  %h = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          13:  %9 = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          14:  %g = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          15:  %10 = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          16:  %f = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          17:  %11 = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          18:  %e = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          19:  %12 = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          20:  %d = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          21:  %13 = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          22:  %c = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          23:  %14 = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          24:  %b = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          25:  %15 = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          26:  %a = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          27:  call void `@llvm.lifetime.start.p0(i64` 8, ptr %15)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          28:  store double %0, ptr %15, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          29:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 8 %a, ptr align 8 %15, i64 8, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          30:  call void `@llvm.lifetime.end.p0(i64` 8, ptr %15)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          31:  call void `@llvm.lifetime.start.p0(i64` 8, ptr %14)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          32:  store double %1, ptr %14, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          33:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 8 %b, ptr align 8 %14, i64 8, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          34:  call void `@llvm.lifetime.end.p0(i64` 8, ptr %14)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          35:  call void `@llvm.lifetime.start.p0(i64` 8, ptr %13)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          36:  store double %2, ptr %13, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          37:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 8 %c, ptr align 8 %13, i64 8, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          38:  call void `@llvm.lifetime.end.p0(i64` 8, ptr %13)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          39:  call void `@llvm.lifetime.start.p0(i64` 8, ptr %12)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          40:  store double %3, ptr %12, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          41:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 8 %d, ptr align 8 %12, i64 8, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          42:  call void `@llvm.lifetime.end.p0(i64` 8, ptr %12)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          43:  call void `@llvm.lifetime.start.p0(i64` 8, ptr %11)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          44:  store double %4, ptr %11, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          45:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 8 %e, ptr align 8 %11, i64 8, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          46:  call void `@llvm.lifetime.end.p0(i64` 8, ptr %11)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          47:  call void `@llvm.lifetime.start.p0(i64` 8, ptr %10)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          48:  store double %5, ptr %10, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          49:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 8 %f, ptr align 8 %10, i64 8, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          50:  call void `@llvm.lifetime.end.p0(i64` 8, ptr %10)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          51:  call void `@llvm.lifetime.start.p0(i64` 8, ptr %9)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          52:  store double %6, ptr %9, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          53:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 8 %g, ptr align 8 %9, i64 8, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          54:  call void `@llvm.lifetime.end.p0(i64` 8, ptr %9)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          55:  call void `@llvm.lifetime.start.p0(i64` 8, ptr %8)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          56:  store double %7, ptr %8, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          57:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 8 %h, ptr align 8 %8, i64 8, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          58:  call void `@llvm.lifetime.end.p0(i64` 8, ptr %8)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          59:  ret void
check:7'0     ~~~~~~~~~~
          60: }
check:7'0     ~~
          61:
check:7'0     ~
          62: ; Function Attrs: uwtable
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
          63: define void `@f_double_s_arg(double` %0) unnamed_addr #0 {
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          64: start:
check:7'0     ~~~~~~~
          65:  %1 = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          66:  %a = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          67:  call void `@llvm.lifetime.start.p0(i64` 8, ptr %1)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          68:  store double %0, ptr %1, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          69:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 8 %a, ptr align 8 %1, i64 8, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          70:  call void `@llvm.lifetime.end.p0(i64` 8, ptr %1)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          71:  ret void
check:7'0     ~~~~~~~~~~
          72: }
check:7'0     ~~
          73:
check:7'0     ~
          74: ; Function Attrs: uwtable
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
          75: define double `@f_ret_double_s()` unnamed_addr #0 {
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          76: start:
check:7'0     ~~~~~~~
          77:  %_0 = alloca [8 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          78:  store double 1.000000e+00, ptr %_0, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          79:  %0 = load double, ptr %_0, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          80:  ret double %0
check:7'0     ~~~~~~~~~~~~~~~
          81: }
check:7'0     ~~
          82:
check:7'0     ~
          83: ; Function Attrs: uwtable
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
          84: define void `@f_double_double_s_arg({` double, double } %0) unnamed_addr #0 {
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          85: start:
check:7'0     ~~~~~~~
          86:  %1 = alloca [16 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          87:  %a = alloca [16 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          88:  call void `@llvm.lifetime.start.p0(i64` 16, ptr %1)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          89:  store { double, double } %0, ptr %1, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          90:  call void `@llvm.memcpy.p0.p0.i64(ptr` align 8 %a, ptr align 8 %1, i64 16, i1 false)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          91:  call void `@llvm.lifetime.end.p0(i64` 16, ptr %1)
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          92:  ret void
check:7'0     ~~~~~~~~~~
          93: }
check:7'0     ~~
          94:
check:7'0     ~
          95: ; Function Attrs: uwtable
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
          96: define { double, double } `@f_ret_double_double_s()` unnamed_addr #0 {
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          97: start:
check:7'0     ~~~~~~~
          98:  %0 = alloca [16 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          99:  store double 1.000000e+00, ptr %0, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         100:  %1 = getelementptr inbounds i8, ptr %0, i64 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         101:  store double 2.000000e+00, ptr %1, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         102:  %2 = load { double, double }, ptr %0, align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         103:  ret { double, double } %2
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
         104: }
check:7'0     ~~
         105:
check:7'0     ~
         106: ; Function Attrs: uwtable
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
         107: define void `@f_double_float_s_arg({` double, float } %0) unnamed_addr #0 {
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         108: start:
check:7'0     ~~~~~~~
         109:  %1 = alloca [12 x i8], align 8
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           .
           .
           .
>>>>>>
------------------------------------------

failures:
    [codegen] tests/codegen/riscv-abi/call-llvm-intrinsics.rs
    [codegen] tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs
    [codegen] tests/codegen/riscv-abi/riscv64-lp64d-abi.rs

test result: FAILED. 498 passed; 3 failed; 151 ignored; 0 measured; 0 filtered out; finished in 4.70s

Some tests failed in compiletest suite=codegen mode=codegen host=x86_64-unknown-linux-gnu target=riscv64gc-unknown-linux-gnu
Build completed unsuccessfully in 0:00:15
```

</details>
2024-06-06 14:46:19 -07:00
Rémy Rakic 216424da32 Revert "Rollup merge of #124099 - voidc:disallow-ambiguous-expr-attrs, r=davidtwco"
This reverts commit 57dad1d75e, reversing
changes made to 36316df9fe.
2024-06-06 20:39:54 +00:00
bors 98489f2487 Auto merge of #126068 - lqd:revert-124976, r=petrochenkov
Revert "use `tcx.used_crates(())` more" before it reaches beta

There are more open issues caused by #124976 than will be fixed by #125493 alone. The beta cut is soon, so let's revert it and buy some time to analyze and fix these issues in our own time.

fixes https://github.com/rust-lang/rust/issues/125474
fixes https://github.com/rust-lang/rust/issues/125484
fixes https://github.com/rust-lang/rust/issues/125646
fixes https://github.com/rust-lang/rust/issues/125707
fixes #126066
fixes #125934
fixes https://github.com/rust-lang/rust/issues/126021

r? `@petrochenkov`
`@bors` p=1
2024-06-06 20:18:43 +00:00
Urgau 89d86ae5bd Don't warn on fields in the unreachable_pub lint 2024-06-06 19:07:05 +02:00
bors 67caf52fbc Auto merge of #125406 - tbu-:pr_rm_path_with_extension, r=Nadrieril
Directly add extension instead of using `Path::with_extension`

`Path::with_extension` has a nice footgun when the original path doesn't contain an extension: Anything after the last dot gets removed.
2024-06-06 10:24:24 +00:00
Rémy Rakic 0a4176a831 Revert "Rollup merge of #124976 - petrochenkov:usedcrates, r=oli-obk"
This reverts commit eda4a35f36, reversing
changes made to eb6b35b5bc.
2024-06-06 10:06:28 +00:00
bors 2d28b6384e Auto merge of #124482 - spastorino:unsafe-extern-blocks, r=oli-obk
Unsafe extern blocks

This implements RFC 3484.

Tracking issue #123743 and RFC https://github.com/rust-lang/rfcs/pull/3484

This is better reviewed commit by commit.
2024-06-06 08:14:58 +00:00
bors 2b6a34273d Auto merge of #126056 - matthiaskrgr:rollup-ytwg62v, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #124731 (Add translation support by mdbook-i18n-helpers to bootstrap)
 - #125168 (Match ergonomics 2024: align implementation with RFC)
 - #125925 (Don't trigger `unsafe_op_in_unsafe_fn` for deprecated safe fns)
 - #125987 (When `derive`ing, account for HRTB on `BareFn` fields)
 - #126045 (check_expr_struct_fields: taint context with errors if struct definit…)
 - #126048 (Fix typos in cargo-specifics.md)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-06 05:56:06 +00:00
bors 003a902792 Auto merge of #125958 - BoxyUwU:remove_const_ty, r=lcnr
Remove the `ty` field from type system `Const`s

Fixes #125556
Fixes #122908

Part of the work on `adt_const_params`/`generic_const_param_types`/`min_generic_const_exprs`/generally making the compiler nicer. cc rust-lang/project-const-generics#44

Please review commit-by-commit otherwise I wasted a lot of time not just squashing this into a giant mess (and also it'll be SO much nicer because theres a lot of fluff changes mixed in with other more careful changes if looking via File Changes

---

Why do this?
- The `ty` field keeps causing ICEs and weird behaviour due to it either being treated as "part of the const" or it being forgotten about leading to ICEs.
- As we move forward with `adt_const_params` and a potential `min_generic_const_exprs` it's going to become more complex to actually lower the correct `Ty<'tcx>`
- It muddles the idea behind how we check `Const` arguments have the correct type. By having the `ty` field it may seem like we ought to be relating it when we relate two types, or that its generally important information about the `Const`.
- Brings the compiler more in line with `a-mir-formality` as that also tracks the type of type system `Const`s via `ConstArgHasType` bounds in the env instead of on the `Const` itself.
- A lot of stuff is a lot nicer when you dont have to pass around the type of a const lol. Everywhere we construct `Const` is now significantly nicer 😅

See #125671's description for some more information about the `ty` field

---

General summary of changes in this PR:

- Add `Ty` to `ConstKind::Value` as otherwise there is no way to implement `ConstArgHasType` to ensure that const arguments are correctly typed for the parameter when we stop creating anon consts for all const args. It's also just incredibly difficult/annoying to thread the correct `Ty` around to a bunch of ctfe functions otherwise.
-  Fully implement `ConstArgHasType` in both the old and new solver. Since it now has no reliance on the `ty` field it serves its originally intended purpose of being able to act as a double check that trait vs impls have correctly typed const parameters. It also will now be able to be responsible for checking types of const arguments to parameters under `min_generic_const_exprs`.
- Add `Ty` to `mir::Const::Ty`. I dont have a great understanding of why mir constants are setup like this to be honest. Regardless they need to be able to determine the type of the const and the easiest way to make this happen was to simply store the `Ty` along side the `ty::Const`. Maybe we can do better here in the future but I'd have to spend way more time looking at everywhere we use `mir::Const`.
- rustdoc has its own `Const` which also has a `ty` field. It was relatively easy to remove this.

---

r? `@lcnr` `@compiler-errors`
2024-06-06 03:41:23 +00:00
Matthias Krüger 3121a5ca3b
Rollup merge of #126045 - olafes:master, r=compiler-errors
check_expr_struct_fields: taint context with errors if struct definit…

Taint errors while checking `struct { field: 1 }` below if struct definition has duplicated fields so that we don't pass it to const eval.

fixes #125842, fixes #124464, fixes #124552
```rust
struct Struct {
    field: Option<u8>,
    field: u8,
}

static STATIC: Struct = Struct {
    field: 1,
};

pub fn main() {}
```
(This was #125947 but i messed something up, sorry)
r? ``@compiler-errors``
2024-06-06 04:17:27 +02:00
Matthias Krüger 55b76f4720
Rollup merge of #125987 - estebank:issue-122622, r=Nadrieril
When `derive`ing, account for HRTB on `BareFn` fields

When given

```rust
trait SomeTrait {
    type SomeType<'a>;
}

#[derive(Clone)]
struct Foo<T: SomeTrait> {
    x: for<'a> fn(T::SomeType<'a>)
}
```

expand to

```rust
impl<T: ::core::clone::Clone + SomeTrait> ::core::clone::Clone for Foo<T>
    where for<'a> T::SomeType<'a>: ::core::clone::Clone {
    #[inline]
    fn clone(&self) -> Foo<T> {
        Foo { x: ::core::clone::Clone::clone(&self.x) }
    }
}
```

instead of the previous invalid

```
impl<T: ::core::clone::Clone + SomeTrait> ::core::clone::Clone for Foo<T>
    where T::SomeType<'a>: ::core::clone::Clone {
    #[inline]
    fn clone(&self) -> Foo<T> {
        Foo { x: ::core::clone::Clone::clone(&self.x) }
    }
}
```

Fix #122622.

<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r​? <reviewer name>
-->
2024-06-06 04:17:26 +02:00
Matthias Krüger 8f04878dee
Rollup merge of #125925 - tbu-:pr_unsafe_env_unsafe_op_in_unsafe_fn, r=Nadrieril
Don't trigger `unsafe_op_in_unsafe_fn` for deprecated safe fns

Fixes #125875.

Tracking:

- #124866
2024-06-06 04:17:26 +02:00
Matthias Krüger 2611b292c4
Rollup merge of #125168 - Jules-Bertholet:match-ergonomics-2024-align-with-rfc, r=Nadrieril
Match ergonomics 2024: align implementation with RFC

- Remove eat-two-layers (`ref_pat_everywhere`)
- Consolidate `mut_preserve_binding_mode_2024` into `ref_pat_eat_one_layer_2024`
- `&mut` no longer peels off `&`
- Apply "no `ref mut` behind `&`" rule on all editions with `ref_pat_eat_one_layer_2024`
- Require `mut_ref` feature gate for all mutable by-reference bindings

r? ``@Nadrieril``

cc https://github.com/rust-lang/rust/issues/123076

``@rustbot`` label A-edition-2024 A-patterns
2024-06-06 04:17:26 +02:00
Tobias Bucher bb901a114f Don't trigger unsafe_op_in_unsafe_fn for deprecated safe fns
Fixes #125875.
2024-06-05 23:44:59 +02:00
Boxy f74119a2e4 Bless tests and handle tests/crashes 2024-06-05 22:25:42 +01:00
bors 72fdf913c5 Auto merge of #126038 - matthiaskrgr:rollup-h4rm3x2, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #124840 (resolve: mark it undetermined if single import is not has any bindings)
 - #125622 (Winnow private method candidates instead of assuming any candidate of the right name will apply)
 - #125648 (Remove unused(?) `~/rustsrc` folder from docker script)
 - #125672 (Add more ABI test cases to miri (RFC 3391))
 - #125800 (Fix `mut` static task queue in SGX target)
 - #125871 (Orphanck[old solver]: Consider opaque types to never cover type parameters)
 - #125893 (Handle all GVN binops in a single place.)
 - #126008 (Port `tests/run-make-fulldeps/issue-19371` to ui-fulldeps)
 - #126032 (Update description of the `IsTerminal` example)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-05 20:53:32 +00:00
Olaf Siwiński 743c41757c
check_expr_struct_fields: taint context with errors if struct definition is malformed 2024-06-05 21:54:22 +02:00
Ana Hobden ae4ae1685c
Repair several riscv64gc-unknown-linux-gnu codegen tests
Fix tests/codegen/riscv-abi/call-llvm-intrinsics.rs

Fix tests/codegen/riscv-abi/riscv64-lp64d-abi.rs

Fix tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs

On riscv64gc ignore tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs

Make tests/codegen/riscv-abi/riscv64-lp64d-abi.rs no_core

Make tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs no_core

Set -O for tests/codegen/riscv-abi/riscv64-lp64d-abi.rs

Set -O for tests/codegen/riscv-abi/riscv64-lp64f-lp64d-abi.rs
2024-06-05 09:39:14 -07:00
Matthias Krüger 9c8e46d08a
Rollup merge of #125871 - fmease:fix-orphanck-opaques, r=lcnr
Orphanck[old solver]: Consider opaque types to never cover type parameters

This fixes an oversight of mine in #117164. The change itself has already been FCP'ed.

This only affects the old solver, the next solver already correctly rejects the added test since #117164.

r? ``@lcnr``
2024-06-05 18:21:14 +02:00
Matthias Krüger dd2e1a3b34
Rollup merge of #126022 - lcnr:generalize-alias-bivariant, r=compiler-errors
set `has_unconstrained_ty_var` when generalizing aliases in bivariant contexts

this previously prevented the `regression-31157` benchmark from building

r? `@compiler-errors`
2024-06-05 18:21:12 +02:00
Matthias Krüger 9abf8b105e
Rollup merge of #125622 - oli-obk:define_opaque_types15, r=compiler-errors
Winnow private method candidates instead of assuming any candidate of the right name will apply

partially reverts https://github.com/rust-lang/rust/pull/60721

My original motivation was just to avoid the `delay_span_bug` (by attempting to thread the `ErrorGuaranteed` through to here). But then I realized that the error message is wrong. It refers to the `Foo<A>::foo` instead of `Foo<B>::foo`. This is almost invisible, because both functions are the same, but on different lines, so `-Zui-testing` makes it so the test is the same no matter which of these two functions is referenced.

But there's a much more obvious bug: If `Foo<B>` does not have a `foo` method at all, but `Foo<A>` has a private `foo` method, then we'll refer to that one. This has now been fixed, and we report a normal `method not found` error.

The way this is done is by creating a list of all possible private functions (just like we create a list of the public functions that can actually be called), and then winnowing it by analyzing where bounds and `Self` types to see if any of the found methods can actually apply (again, just like with the list of public functions).

I wonder if there is room for doing the same thing with unstable functions instead of running all of method resolution twice.

r? ``@compiler-errors`` for method resolution stuff
2024-06-05 18:21:11 +02:00
Matthias Krüger 69a8c139f1
Rollup merge of #124840 - bvanjoi:fix-124490, r=petrochenkov
resolve: mark it undetermined if single import is not has any bindings

- Fixes #124490
- Fixes #125013

This issue arises from incorrect resolution updates, for example:

```rust
mod a {
    pub mod b {
        pub mod c {}
    }
}

use a::*;

use b::c;
use c as b;

fn main() {}
```

1. In the first loop, binding `(root, b)` is refer to `root:🅰️:b` due to `use a::*`.
    1. However, binding `(root, c)` isn't defined by `use b::c` during this stage because `use c as b` falls under the `single_imports` of `(root, b)`, where the `imported_module` hasn't been computed yet. This results in marking the `path_res` for `b` as `Indeterminate`.
    2. Then, the `imported_module` for `use c as b` will be recorded.
2. In the second loop, `use b::c` will be processed again:
    1. Firstly, it attempts to find the `path_res` for `(root, b)`.
    2. It will iterate through the `single_imports` of `use b::c`, encounter `use c as b`, attempt to resolve `c` in `root`, and ultimately return `Err(Undetermined)`, thus passing the iterator.
    3. Use the binding `(root, b)` -> `root:🅰️:b` introduced by `use a::*` and ultimately return `root:🅰️:b` as the `path_res` of `b`.
    4. Then define the binding `(root, c)` -> `root:🅰️🅱️:c`.
3. Then process `use c as b`, update the resolution for `(root, b)` to refer to `root:🅰️🅱️:c`, ultimately causing inconsistency.

In my view, step `2.2` has an issue where it should exit early, similar to the behavior when there's no `imported_module`. Therefore, I've added an attribute called `indeterminate` to `ImportData`. This will help us handle only those single imports that have at least one determined binding.

r? ``@petrochenkov``
2024-06-05 18:21:11 +02:00
Matthias Krüger e1745122ae
Rollup merge of #125792 - compiler-errors:dont-drop-upcast-cand, r=lcnr
Don't drop `Unsize` candidate in intercrate mode

Fixes #125767
2024-06-05 18:21:09 +02:00
Matthias Krüger 49f950434b
Rollup merge of #125407 - pacak:no-lending-iterators, r=pnkfelix
Detect when user is trying to create a lending `Iterator` and give a custom explanation

The scope for this diagnostic is to detect lending iterators specifically and it's main goal is to help beginners to understand that what they are trying to implement might not be possible for `Iterator` trait specifically.

I ended up to changing the wording from originally proposed in the ticket because it might be misleading otherwise: `Data` might have a lifetime parameter but it can be unrelated to items user is planning to return.

Fixes https://github.com/rust-lang/rust/issues/125337
2024-06-05 18:21:08 +02:00
r0cky 35130d7233 Detect pub structs never constructed and unused associated constants in traits 2024-06-05 23:20:09 +08:00
Santiago Pastorino 525828d5ee
Add rustfix test for unsafe extern blocks 2024-06-05 09:36:01 -03:00
Santiago Pastorino be0726c7c1
Add revisions to safe/unsafe on unadorned extern blocks test 2024-06-05 09:36:01 -03:00
Santiago Pastorino 1afc7d716c
Make MISSING_UNSAFE_ON_EXTERN lint emit future compat info with suggestion to prepend unsafe 2024-06-05 09:36:01 -03:00
Santiago Pastorino 0380321e78
Add unsafe_extern_blocks feature flag 2024-06-05 09:35:57 -03:00