fixes #15652 [backport:1.4] (#15679)

This commit is contained in:
Andreas Rumpf 2020-10-22 17:28:43 +02:00 • committed by GitHub
commit 8358974b73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -760,7 +760,7 @@ proc genDeref(p: BProc, e: PNode, d: var TLoc) =
# See tmissingderef. So we get rid of the deref instead. The codegen
# ends up using 'memcpy' for the array assignment,
# so the '&' and '*' cancel out:
putIntoDest(p, d, lodeTyp(a.t[0]), rdLoc(a), a.storage)
putIntoDest(p, d, e, rdLoc(a), a.storage)
else:
putIntoDest(p, d, e, "(*$1)" % [rdLoc(a)], a.storage)