* fixes #20572

* added a test case
This commit is contained in:
Andreas Rumpf 2022-10-17 23:48:51 +02:00 • committed by GitHub
commit 81087c949f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 116 additions and 70 deletions

View file

@ -3086,7 +3086,7 @@ proc expr(p: BProc, n: PNode, d: var TLoc) =
cow(p, n[1])
if nfPreventCg notin n.flags:
genAsgn(p, n, fastAsgn=false)
of nkFastAsgn:
of nkFastAsgn, nkSinkAsgn:
cow(p, n[1])
if nfPreventCg notin n.flags:
# transf is overly aggressive with 'nkFastAsgn', so we work around here.