You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/simd-abi-checks.rs
+13
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@
4
4
5
5
#![feature(avx512_target_feature)]
6
6
#![feature(portable_simd)]
7
+
#![feature(target_feature_11)]
7
8
#![allow(improper_ctypes_definitions)]
8
9
9
10
use std::arch::x86_64::*;
@@ -50,6 +51,14 @@ unsafe fn test() {
50
51
as_f64x8(arg);
51
52
}
52
53
54
+
#[target_feature(enable = "avx")]
55
+
unsafefnin_closure() -> implFnOnce() -> __m256{
56
+
#[inline(always)]// this disables target-feature inheritance
57
+
|| g()
58
+
//~^ WARNING this function call uses a SIMD vector type that (with the chosen ABI) requires the `avx` target feature, which is not enabled in the caller
59
+
//~| WARNING this was previously accepted by the compiler
60
+
}
61
+
53
62
fnmain(){
54
63
unsafe{
55
64
f(g());
@@ -78,4 +87,8 @@ fn main() {
78
87
//~| WARNING this was previously accepted by the compiler
79
88
//~| WARNING this was previously accepted by the compiler
0 commit comments