test: add new Go tests from source repo
[official-gcc.git] / gcc / testsuite / go.test / test / fixedbugs / issue15071.dir / exp.go
blobe6041e602da3262c288ef150909a041a57281dd3
1 // Copyright 2016 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.
5 package exp
7 func Exported(x int) int {
8 return inlined(x)
11 func inlined(x int) int {
12 y := 0
13 switch {
14 case x > 0:
15 y += 5
16 return 0 + y
17 case x < 1:
18 y += 6
19 fallthrough
20 default:
21 y += 7
22 return 2 + y