repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
test: add new Go tests from source repo
[official-gcc.git]
/
gcc
/
testsuite
/
go.test
/
test
/
fixedbugs
/
issue15071.dir
/
exp.go
blob
e6041e602da3262c288ef150909a041a57281dd3
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.
4
5
package
exp
6
7
func
Exported
(
x
int
)
int
{
8
return
inlined
(
x
)
9
}
10
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
23
}
24
}