-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tests on LLVM 20 #135764
Merged
Merged
Fix tests on LLVM 20 #135764
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
//@ revisions: sparc sparcv8plus sparc_cpu_v9 sparc_feature_v8plus sparc_cpu_v9_feature_v8plus | ||
//@[sparc] compile-flags: --target sparc-unknown-none-elf | ||
//@[sparc] needs-llvm-components: sparc | ||
//@[sparcv8plus] compile-flags: --target sparc-unknown-linux-gnu | ||
//@[sparcv8plus] needs-llvm-components: sparc | ||
//@[sparc_cpu_v9] compile-flags: --target sparc-unknown-none-elf -C target-cpu=v9 | ||
//@[sparc_cpu_v9] needs-llvm-components: sparc | ||
//@[sparc_feature_v8plus] compile-flags: --target sparc-unknown-none-elf -C target-feature=+v8plus | ||
//@[sparc_feature_v8plus] needs-llvm-components: sparc | ||
//@[sparc_cpu_v9_feature_v8plus] compile-flags: --target sparc-unknown-none-elf -C target-cpu=v9 -C target-feature=+v8plus | ||
//@[sparc_cpu_v9_feature_v8plus] needs-llvm-components: sparc | ||
//@ exact-llvm-major-version: 19 | ||
|
||
#![crate_type = "rlib"] | ||
#![feature(no_core, rustc_attrs, lang_items)] | ||
#![no_core] | ||
|
||
#[lang = "sized"] | ||
trait Sized {} | ||
#[lang = "copy"] | ||
trait Copy {} | ||
|
||
#[rustc_builtin_macro] | ||
macro_rules! compile_error { | ||
() => {}; | ||
} | ||
|
||
#[cfg(all(not(target_feature = "v8plus"), not(target_feature = "v9")))] | ||
compile_error!("-v8plus,-v9"); | ||
//[sparc]~^ ERROR -v8plus,-v9 | ||
|
||
// FIXME: sparc_cpu_v9 should be in "-v8plus,+v9" group (fixed in LLVM 20) | ||
#[cfg(all(target_feature = "v8plus", target_feature = "v9"))] | ||
compile_error!("+v8plus,+v9"); | ||
//[sparcv8plus,sparc_cpu_v9_feature_v8plus,sparc_cpu_v9]~^ ERROR +v8plus,+v9 | ||
|
||
// FIXME: should be rejected | ||
#[cfg(all(target_feature = "v8plus", not(target_feature = "v9")))] | ||
compile_error!("+v8plus,-v9 (FIXME)"); | ||
//[sparc_feature_v8plus]~^ ERROR +v8plus,-v9 (FIXME) | ||
|
||
#[cfg(all(not(target_feature = "v8plus"), target_feature = "v9"))] | ||
compile_error!("-v8plus,+v9"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: -v8plus,-v9 | ||
--> $DIR/sparcv8plus-llvm19.rs:29:1 | ||
| | ||
LL | compile_error!("-v8plus,-v9"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: +v8plus,+v9 | ||
--> $DIR/sparcv8plus-llvm19.rs:34:1 | ||
| | ||
LL | compile_error!("+v8plus,+v9"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
|
8 changes: 8 additions & 0 deletions
8
tests/ui/abi/sparcv8plus-llvm19.sparc_cpu_v9_feature_v8plus.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: +v8plus,+v9 | ||
--> $DIR/sparcv8plus-llvm19.rs:34:1 | ||
| | ||
LL | compile_error!("+v8plus,+v9"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: +v8plus,-v9 (FIXME) | ||
--> $DIR/sparcv8plus-llvm19.rs:39:1 | ||
| | ||
LL | compile_error!("+v8plus,-v9 (FIXME)"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: +v8plus,+v9 | ||
--> $DIR/sparcv8plus-llvm19.rs:34:1 | ||
| | ||
LL | compile_error!("+v8plus,+v9"); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 1 previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed; the goal here was just to ensure it's still
adc
. The unroll width whatever is fine.