Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Delta Between Two Patch Sets: test/escape2.go

Issue 152570049: [dev.power64] code review 152570049: all: merge default into dev.power64 (Closed)
Left Patch Set: diff -r 36f7fc9495481ed67a159eea0eb2fac35b7c46a5 https://code.google.com/p/go Created 10 years, 4 months ago
Right Patch Set: diff -r 36f7fc9495481ed67a159eea0eb2fac35b7c46a5 https://code.google.com/p/go Created 10 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « test/assign.go ('k') | test/escape2n.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(Both sides are equal)
1 // errorcheck -0 -m -l 1 // errorcheck -0 -m -l
2 2
3 // Copyright 2010 The Go Authors. All rights reserved. 3 // Copyright 2010 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style 4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file. 5 // license that can be found in the LICENSE file.
6 6
7 // Test, using compiler diagnostic flags, that the escape analysis is working. 7 // Test, using compiler diagnostic flags, that the escape analysis is working.
8 // Compiles but does not run. Inlining is disabled. 8 // Compiles but does not run. Inlining is disabled.
9 9
10 // escape2n.go contains all the same tests but compiles with -N. 10 // escape2n.go contains all the same tests but compiles with -N.
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 1485
1486 func f() (x int, y *int) { // ERROR "moved to heap: x" 1486 func f() (x int, y *int) { // ERROR "moved to heap: x"
1487 y = &x // ERROR "&x escapes to heap" 1487 y = &x // ERROR "&x escapes to heap"
1488 return 1488 return
1489 } 1489 }
1490 1490
1491 func g() (x interface{}) { // ERROR "moved to heap: x" 1491 func g() (x interface{}) { // ERROR "moved to heap: x"
1492 x = &x // ERROR "&x escapes to heap" 1492 x = &x // ERROR "&x escapes to heap"
1493 return 1493 return
1494 } 1494 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b