Skip to content

Commit e8ef4ef

Browse files
committed
This ICEs
1 parent 1aed382 commit e8ef4ef

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/ui/intrinsics/reify-intrinsic.rs

+8
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ fn c() -> [unsafe fn(f32) -> f32; 2] {
2626
fs
2727
}
2828

29+
fn call_by_ptr() {
30+
let ptr: fn(u8, u8) -> u8 = std::intrinsics::wrapping_add::<u8>;
31+
let res = ptr(u8::MAX, 1);
32+
assert_eq!(res, 0);
33+
}
34+
2935
fn main() {
3036
unsafe {
3137
assert_eq!(a()(-1), !0);
@@ -35,4 +41,6 @@ fn main() {
3541
assert_eq!(floorf32_ptr(1.5), 1.0);
3642
assert_eq!(log2f32_ptr(2.0), 1.0);
3743
}
44+
45+
call_by_ptr();
3846
}

0 commit comments

Comments
 (0)