From: Philip Herron Date: Thu, 31 Aug 2023 10:50:31 +0000 (+0100) Subject: gccrs: fix bug in the iterator testcase X-Git-Tag: basepoints/gcc-15~2184 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=979b38d4bef30787cdfda445045755832e02503c;p=thirdparty%2Fgcc.git gccrs: fix bug in the iterator testcase gcc/testsuite/ChangeLog: * rust/compile/iterators1.rs: this should be casting to the $ty Signed-off-by: Philip Herron --- diff --git a/gcc/testsuite/rust/compile/iterators1.rs b/gcc/testsuite/rust/compile/iterators1.rs index 33736f169d36..35fea5a04938 100644 --- a/gcc/testsuite/rust/compile/iterators1.rs +++ b/gcc/testsuite/rust/compile/iterators1.rs @@ -264,7 +264,7 @@ macro_rules! impl_uint { } pub fn overflowing_add(self, rhs: Self) -> (Self, bool) { - let (a, b) = unsafe { intrinsics::add_with_overflow(self as i32, rhs as i32) }; + let (a, b) = unsafe { intrinsics::add_with_overflow(self as $ty, rhs as $ty) }; (a as Self, b) } }