Rework DFA traversal (#18016)
* enable using dbg: without a context * Optimally joining first write/last read analysis * Add test for #18002 * potLastReads -> potentialLastReads
This commit is contained in:
parent
99788ee504
commit
3614523664
2 changed files with 133 additions and 109 deletions
|
|
@ -784,3 +784,37 @@ proc main3 =
|
|||
|
||||
main3()
|
||||
|
||||
# misc
|
||||
proc smoltest(x: bool): bool =
|
||||
while true:
|
||||
if true: return x
|
||||
|
||||
discard smoltest(true)
|
||||
|
||||
# bug #18002
|
||||
type
|
||||
TTypeAttachedOp = enum
|
||||
attachedAsgn
|
||||
attachedSink
|
||||
attachedTrace
|
||||
|
||||
PNode = ref object
|
||||
discard
|
||||
|
||||
proc genAddrOf(n: PNode) =
|
||||
assert n != nil, "moved?!"
|
||||
|
||||
proc atomicClosureOp =
|
||||
let x = PNode()
|
||||
|
||||
genAddrOf:
|
||||
block:
|
||||
x
|
||||
|
||||
case attachedTrace
|
||||
of attachedSink: discard
|
||||
of attachedAsgn: discard
|
||||
of attachedTrace: genAddrOf(x)
|
||||
|
||||
atomicClosureOp()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue