1// Copyright 2018 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package main
6
7func f()
8func leaf()
9func leaf2()
10
11var f1called, f2called, f3called, f4called bool
12
13func main() {
14	f()
15	if !f1called {
16		panic("f1 not called")
17	}
18	if !f2called {
19		panic("f2 not called")
20	}
21	leaf()
22	if !f3called {
23		panic("f3 not called")
24	}
25	leaf2()
26	if !f4called {
27		panic("f4 not called")
28	}
29}
30
31func f1() { f1called = true }
32func f2() { f2called = true }
33func f3() { f3called = true }
34func f4() { f4called = true }
35
36func unreachable() {
37	panic("unreachable function called")
38}
39