[gcc r14-7955] gccrs: fix bug in the iterator testcase
Arthur Cohen
cohenarthur@gcc.gnu.org
Tue Jan 16 18:08:30 GMT 2024
https://gcc.gnu.org/g:979b38d4bef30787cdfda445045755832e02503c
commit r14-7955-g979b38d4bef30787cdfda445045755832e02503c
Author: Philip Herron <herron.philip@googlemail.com>
Date: Thu Aug 31 11:50:31 2023 +0100
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 <herron.philip@googlemail.com>
Diff:
---
gcc/testsuite/rust/compile/iterators1.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/rust/compile/iterators1.rs b/gcc/testsuite/rust/compile/iterators1.rs
index 33736f169d3..35fea5a0493 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)
}
}
More information about the Gcc-cvs
mailing list