Skip to content

Commit 6ae6dd5

Browse files
committed
This ICEs
1 parent 2f9f182 commit 6ae6dd5

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() -> [fn(bool) -> bool; 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
let [likely_ptr, unlikely_ptr] = c();
3642
assert!(likely_ptr(true));
3743
assert!(unlikely_ptr(true));
44+
45+
call_by_ptr();
3846
}

0 commit comments

Comments
 (0)