fixes #14470 [backport:1.2] (#19115)

(cherry picked from commit 15157d06c3)
This commit is contained in:
Andreas Rumpf
2021-11-09 22:48:04 +01:00
committed by narimiran
parent 68df3c9afd
commit 0df0510722

View File

@@ -223,7 +223,8 @@ proc isInvalidReturnType(conf: ConfigRef; rettype: PType): bool =
# such a poor programming language.
# We exclude records with refs too. This enhances efficiency and
# is necessary for proper code generation of assignments.
if rettype == nil: result = true
if rettype == nil or getSize(conf, rettype) > conf.target.floatSize*3:
result = true
else:
case mapType(conf, rettype, skResult)
of ctArray: