parent
a236002e54
commit
b03d6c9b2f
2 changed files with 15 additions and 3 deletions
|
|
@ -696,9 +696,10 @@ proc skipTrivials(c: var Con, n: PNode): PNode =
|
||||||
proc genUse(c: var Con; orig: PNode) =
|
proc genUse(c: var Con; orig: PNode) =
|
||||||
let n = c.skipTrivials(orig)
|
let n = c.skipTrivials(orig)
|
||||||
|
|
||||||
if n.kind == nkSym and n.sym.kind in InterestingSyms:
|
if n.kind == nkSym:
|
||||||
|
if n.sym.kind in InterestingSyms:
|
||||||
c.code.add Instr(n: orig, kind: use)
|
c.code.add Instr(n: orig, kind: use)
|
||||||
elif n.kind in nkCallKinds:
|
else:
|
||||||
gen(c, n)
|
gen(c, n)
|
||||||
|
|
||||||
proc genDef(c: var Con; orig: PNode) =
|
proc genDef(c: var Con; orig: PNode) =
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ finalizer
|
||||||
aaaaa
|
aaaaa
|
||||||
hello
|
hello
|
||||||
ok
|
ok
|
||||||
|
true
|
||||||
closed
|
closed
|
||||||
destroying variable: 20
|
destroying variable: 20
|
||||||
destroying variable: 10
|
destroying variable: 10
|
||||||
|
|
@ -422,3 +423,13 @@ proc test3 =
|
||||||
|
|
||||||
static: test3() # was buggy
|
static: test3() # was buggy
|
||||||
test3()
|
test3()
|
||||||
|
|
||||||
|
# bug #17712
|
||||||
|
proc t17712 =
|
||||||
|
var ppv = new int
|
||||||
|
discard @[ppv]
|
||||||
|
var el: ref int
|
||||||
|
el = [ppv][0]
|
||||||
|
echo el != nil
|
||||||
|
|
||||||
|
t17712()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue