Skip to content

Commit bc649a1

Browse files
committed
Minimally adapt lit-test codegen/atomicrmw.d to new deprecation
'Deprecation: `ubyte += float` is performing truncating conversion'
1 parent 9316cc5 commit bc649a1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/codegen/atomicrmw.d

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ void main() {
3434
assert(x == r);
3535
// CHECK: = atomicrmw xor ptr
3636

37-
r = atomicOp!"+="(x, 1.0f);
38-
assert(x == r);
39-
// CHECK: = cmpxchg weak ptr
37+
{
38+
shared float x2 = 2.5f;
39+
const r2 = atomicOp!"+="(x2, 1.0f);
40+
assert(x2 == r2);
41+
// CHECK: = cmpxchg weak ptr
42+
}
4043
}

0 commit comments

Comments
 (0)