Debian Codegraph @

test/fixedbugs/issue15747b.go

raw
1 // compile
2
3 // Copyright 2016 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6
7 // Issue 15747: If an ODCL is dropped, for example when inlining,
8 // then it's easy to end up not initializing the '&x' pseudo-variable
9 // to point to an actual allocation. The liveness analysis will detect
10 // this and abort the computation, so this test just checks that the
11 // compilation succeeds.
12
13 package p
14
15 type R [100]byte
16
17 func (x R) New() *R {
18 return &x
19 }