-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ABI checks: add support for tier2 arches
See #131800 for the data collection behind this change. Also adds a test that exercise the "empty list of features" path.
- Loading branch information
Showing
6 changed files
with
109 additions
and
17 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//@ needs-llvm-components: sparc | ||
//@ compile-flags: --target=sparc-unknown-none-elf --crate-type=rlib | ||
//@ build-pass | ||
//@ ignore-pass (test emits codegen-time warnings) | ||
#![no_core] | ||
#![feature(no_core, lang_items, repr_simd)] | ||
#![allow(improper_ctypes_definitions)] | ||
#[lang = "sized"] | ||
trait Sized {} | ||
|
||
#[lang = "copy"] | ||
trait Copy {} | ||
|
||
#[repr(simd)] | ||
pub struct SimdVec([i32; 4]); | ||
|
||
pub extern "C" fn pass_by_vec(_: SimdVec) {} | ||
//~^ ABI error: this function definition uses a vector type that is not currently supported | ||
//~| WARNING this was previously accepted by the compiler |
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,12 @@ | ||
warning: ABI error: this function definition uses a vector type that is not currently supported | ||
--> $DIR/simd-abi-checks-empty-list.rs:17:1 | ||
| | ||
LL | pub extern "C" fn pass_by_vec(_: SimdVec) {} | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function defined here | ||
| | ||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! | ||
= note: for more information, see issue #116558 <https://github.com/rust-lang/rust/issues/116558> | ||
= note: `#[warn(abi_unsupported_vector_types)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|