-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a failing test; fix, don't mark as heap defined until label
- Loading branch information
Showing
4 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package main | ||
|
||
func main() { | ||
c := 0 | ||
loop: | ||
i := 1 | ||
println(i) | ||
c += 1 | ||
if c < 10 { | ||
goto loop | ||
} | ||
} | ||
|
||
// This does not make 'i' NameExprTypeHeapDefine, | ||
// because it is not actually used in a &ref or closure context. | ||
|
||
// Preprocessed: | ||
// file{ package main; func main() { c<VPBlock(1,0)> := (const (0 int)); i<VPBlock(1,1)> := (const (1 int)); (const (println func(xs ...interface{})()))(i<VPBlock(1,1)>); c<VPBlock(1,0)> += (const (1 int)); if c<VPBlock(2,0)> < (const (10 int)) { goto loop<1,1> } } } |