diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2021-11-09 22:48:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 22:48:04 +0100 |
commit | 15157d06c3e0bba0c372a094917a13b916e15b54 (patch) | |
tree | 64096da3ddfc83f4354c829527bea3b5b2f1b8db | |
parent | 997ccc588955dab5cdbfd4c0fc067d91ccc1a7c8 (diff) | |
download | Nim-15157d06c3e0bba0c372a094917a13b916e15b54.tar.gz |
fixes #14470 [backport:1.2] (#19115)
-rw-r--r-- | compiler/ccgtypes.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index 23e1a5867..e7e099659 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -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, skResult) of ctArray: |