Skip to content

Commit 8a3f542

Browse files
Araqnarimiran
authored andcommitted
fixes #14470 [backport:1.2] (#19115)
(cherry picked from commit 15157d0)
1 parent 2009df7 commit 8a3f542

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/ccgtypes.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ proc isInvalidReturnType(conf: ConfigRef; rettype: PType): bool =
220220
# such a poor programming language.
221221
# We exclude records with refs too. This enhances efficiency and
222222
# is necessary for proper code generation of assignments.
223-
if rettype == nil: result = true
223+
if rettype == nil or getSize(conf, rettype) > conf.target.floatSize*3:
224+
result = true
224225
else:
225226
case mapType(conf, rettype)
226227
of ctArray:

0 commit comments

Comments
 (0)