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 2009df72cb
commit 8a3f542532

View File

@@ -220,7 +220,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)
of ctArray: