1// run
2
3// Copyright 2019 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
7package main
8
9import (
10	"bytes"
11	"fmt"
12)
13
14func main() {
15	_, _ = false || g(1), g(2)
16	if !bytes.Equal(x, []byte{1, 2}) {
17		panic(fmt.Sprintf("wanted [1,2], got %v", x))
18	}
19}
20
21var x []byte
22
23//go:noinline
24func g(b byte) bool {
25	x = append(x, b)
26	return false
27}
28