fixes #17085 [backport:1.2] (#17101)

This commit is contained in:
Andreas Rumpf 2021-02-19 12:30:39 +01:00 • committed by GitHub
commit 4395a26764
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 3 deletions

View file

@ -0,0 +1,22 @@
discard """
output: '''10000000
10000000
10000000'''
"""
# bug #17085
proc init(): string =
for a in 0..<10000000:
result.add 'c'
proc f() =
var a {.global.} = init()
var b {.global.} = init()
var c {.global.} = init()
echo a.len
echo b.len
echo c.len
f()