Home | History | Annotate | Download | only in test

Lines Matching defs:escape

7 // Test escape analysis when assigning to indirections.
9 package escape
26 x := &ConstPtr{} // ERROR "&ConstPtr literal does not escape"
27 // BAD: i should not escape here
41 x := &ConstPtr{} // ERROR "&ConstPtr literal does not escape"
62 x := &ConstPtr{} // ERROR "&ConstPtr literal does not escape"
69 *p = *&ConstPtr{} // ERROR "&ConstPtr literal does not escape"
75 p1 := &ConstPtr{} // ERROR "&ConstPtr literal does not escape"
80 // BAD: p should not escape here
82 p1 := &ConstPtr{} // ERROR "&ConstPtr literal does not escape"
90 p1 := &tmp // ERROR "&tmp does not escape"
98 p.c = *&tmp // ERROR "&tmp does not escape"
103 p := new(ConstPtr) // ERROR "new\(ConstPtr\) does not escape"
115 p = &ConstPtr{p: &i, x: &x} // ERROR "&i escapes to heap" "&x escapes to heap" "&ConstPtr literal does not escape"
117 pp = &p // ERROR "&p does not escape"
124 p1 := &ConstPtr{} // ERROR "&ConstPtr literal does not escape"
130 func foo(p **int) { // ERROR "foo p does not escape"
136 func foo1(p *int) { // ERROR "p does not escape"
138 y := &p // ERROR "&p does not escape"
149 z.f = &x // ERROR "&x does not escape"