Skip to content

Commit

Permalink
Rollup merge of #116591 - Zalathar:flaky-hash, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Don't accidentally detect the commit hash as an `fadd` instruction

I've seen some reports of `tests/codegen/target-feature-inline-closure.rs` spuriously failing because it thinks the hash in the rustc version number contains an `fadd` instruction.

#116085 (comment)
https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Is.20.60tests.2Fcodegen.2Ftarget-feature-inline-closure.2Ers.60.20flakey
https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Strange.20.5Cn.20in.20output.20of.20assert.20.23108341/near/395811335

This PR tries to make that not happen by adding a `CHECK-LABEL` directive that will match the line with the rustc version string, preventing the previous `CHECK-NOT` from seeing it.
  • Loading branch information
matthiaskrgr authored Oct 14, 2023
2 parents 4dd4d9b + 58d62fc commit a8cda30
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/codegen/target-feature-inline-closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ unsafe fn without_avx(x: __m256) -> __m256 {
};
add(x, x)
}

// Don't allow the above CHECK-NOT to accidentally match a commit hash in the
// compiler version.
// CHECK-LABEL: rustc version

0 comments on commit a8cda30

Please sign in to comment.