blob: bdb2a940c8f4bdfc131072131372841794e25465 [file] [log] [blame]
Dan Willemsen38f2dba2016-07-08 14:54:35 -07001// 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
Dan Willemsena3223282018-02-27 19:41:43 -08007// Issue 15747: If an ODCL is dropped, for example when inlining,
Dan Willemsen38f2dba2016-07-08 14:54:35 -07008// 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
13package p
14
15type R [100]byte
16
17func (x R) New() *R {
18 return &x
19}