atomic rmw intrinsics: RHS must be an integer

This commit is contained in:
Ralf Jung 2025-09-05 13:31:01 +02:00
parent 0dcc21b124
commit 69c7652a01

View file

@ -264,8 +264,9 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
let place = this.deref_pointer(place)?;
let rhs = this.read_immediate(rhs)?;
// The LHS can be a pointer, the RHS must be an integer.
if !(place.layout.ty.is_integral() || place.layout.ty.is_raw_ptr())
|| !(rhs.layout.ty.is_integral() || rhs.layout.ty.is_raw_ptr())
|| !rhs.layout.ty.is_integral()
{
span_bug!(
this.cur_span(),