parent
c1a06bd56e
commit
4395a26764
4 changed files with 26 additions and 3 deletions
22
tests/gc/trace_globals.nim
Normal file
22
tests/gc/trace_globals.nim
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue