Issue 1:
$ pwd
/tmp/scratch
$ ls
main.go x_amd64.s x_other.go
$ cat main.go
package main

func main() {
println(foo())
}
$ cat x_amd64.s
TEXT ·foo(SB), 7, $0
MOVQ $43, ret+0(FP)
RET

$ cat x_other.go
package main

func foo() int { return 42 }

Note that foo has two bodies defined: one returns 42, the other returns 43. Surely this should be a compile or asm or link error, yet "go build" seems happy:

$ go build -x && ./scratch && rm ./scratch
WORK=/tmp/go-build115513716
mkdir -p $WORK/_/tmp/scratch/_obj/
mkdir -p $WORK/_/tmp/scratch/_obj/exe/
cd /tmp/scratch
/home/nt/go/pkg/tool/linux_amd64/compile -o $WORK/_/tmp/scratch.a -trimpath $WORK -p main -buildid acfccd74ae478f8fecc64195dd5e90e7757cec11 -D _/tmp/scratch -I $WORK -pack -asmhdr $WORK/_/tmp/scratch/_obj/go_asm.h ./main.go ./x_other.go
/home/nt/go/pkg/tool/linux_amd64/asm -o $WORK/_/tmp/scratch/_obj/x_amd64.o -trimpath $WORK -I $WORK/_/tmp/scratch/_obj/ -I /home/nt/go/pkg/include -D GOOS_linux -D GOARCH_amd64 ./x_amd64.s
pack r $WORK/_/tmp/scratch.a $WORK/_/tmp/scratch/_obj/x_amd64.o # internal
cd .
/home/nt/go/pkg/tool/linux_amd64/link -o $WORK/_/tmp/scratch/_obj/exe/a.out -L $WORK -extld=gcc -buildmode=exe -buildid=acfccd74ae478f8fecc64195dd5e90e7757cec11 $WORK/_/tmp/scratch.a
mv $WORK/_/tmp/scratch/_obj/exe/a.out scratch
42

Changing the

func foo() int { return 42 }

to be

func foo() int

in x_other.go now has "go build" picking up the other definition:

$ vim x_other.go
$ cat x_other.go
package main

func foo() int
$ go build -x && ./scratch && rm ./scratch
WORK=/tmp/go-build732255335
mkdir -p $WORK/_/tmp/scratch/_obj/
mkdir -p $WORK/_/tmp/scratch/_obj/exe/
cd /tmp/scratch
/home/nt/go/pkg/tool/linux_amd64/compile -o $WORK/_/tmp/scratch.a -trimpath $WORK -p main -buildid acfccd74ae478f8fecc64195dd5e90e7757cec11 -D _/tmp/scratch -I $WORK -pack -asmhdr $WORK/_/tmp/scratch/_obj/go_asm.h ./main.go ./x_other.go
/home/nt/go/pkg/tool/linux_amd64/asm -o $WORK/_/tmp/scratch/_obj/x_amd64.o -trimpath $WORK -I $WORK/_/tmp/scratch/_obj/ -I /home/nt/go/pkg/include -D GOOS_linux -D GOARCH_amd64 ./x_amd64.s
pack r $WORK/_/tmp/scratch.a $WORK/_/tmp/scratch/_obj/x_amd64.o # internal
cd .
/home/nt/go/pkg/tool/linux_amd64/link -o $WORK/_/tmp/scratch/_obj/exe/a.out -L $WORK -extld=gcc -buildmode=exe -buildid=acfccd74ae478f8fecc64195dd5e90e7757cec11 $WORK/_/tmp/scratch.a
mv $WORK/_/tmp/scratch/_obj/exe/a.out scratch
43

Still, something ain't right. Re-inserting that

{ return 42 }

into the x_other.go file gives:

$ vim x_other.go
$ cat x_other.go
package main

func foo() int { return 42 }
$ go vet
: x_amd64.s:1: [amd64] foo: function foo missing Go declaration
exit status 1

Issue 2:
Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version devel +beabd87 Tue Mar 8 06:02:15 2016 +0000 freebsd/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN="/home/rhinofly/home/ds/sandspace/go/bin.freebsd-amd64"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="freebsd"
GOOS="freebsd"
GOPATH="/home/rhinofly/home/ds/sandspace/external/:/home/rhinofly/home/ds/sandspace/golibs/"
GORACE=""
GOROOT="/home/rhinofly/home/ds/sandspace/go"
GOTOOLDIR="/home/rhinofly/home/ds/sandspace/go/pkg/tool/freebsd_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches"
CXX="clang++"
CGO_ENABLED="1"

$ ifconfig -a
em0: flags=8843 metric 0 mtu 1500
options=209b
ether 66:30:38:38:64:30
inet 10.236.12.201 netmask 0xffffff00 broadcast 10.236.12.255
nd6 options=29
media: Ethernet autoselect (1000baseT )
status: active
lo0: flags=8049 metric 0 mtu 16384
options=600003
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
nd6 options=21
groups: lo

$ uname -a
FreeBSD rhinofly-devel-800201.localdomain 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r295683: Wed Feb 17 02:07:17 UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64

What did you do?

(Use play.golang.org to provide a runnable example, if possible.)

git clone https://github.com/golang/go.git tips-go && cd tips-go/src && ./all.bash

What did you expect to see?

build done without error and warning.

What did you see instead?

--- FAIL: TestInterfaces (0.00s)
interface_test.go:74: route ip+net: invalid network interface name
FAIL
FAIL net 2.240s

detail data by fmt.Printf(%v):

all interfaces data:
ift=[{1 1500 dc:05:00:00:00:00:00:00:00:ca:9a:3b:00:00:00:00:94:49:13:00:00:00:00:00:00:00:00:00:00:00:00:00:1f:61:0a:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:44:63:57:67:00:00:00:00:08:dc:76:04:00:00:00:00:18:1f:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:06:00:00:00:00:00:00:00:01:00:00:00:00:00:00:00:6b:f0:dc:56:00:00:00:00:3f:f6:05:00:00:00:00:00:38:12:01:00:06:03:06:00 up|broadcast|multicast} {2 16384 00:40:00:00:00:00:00:00:00:00:00:00:00:00:00:00:9d:ac:01:00:00:00:00:00:00:00:00:00:00:00:00:00:9d:ac:01:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:2b:d2:32:0c:00:00:00:00:2b:d2:32:0c:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:0f:0e:00:00:00:00:00:00:01:00:00:00:00:00:00:00:6a:f0:dc:56:00:00:00:00:5d:8e:08:00:00:00:00:00:38:12:02:00:18:03:00:00 up|loopback|multicast}]

test failed:
ifi={1 1500 dc:05:00:00:00:00:00:00:00:ca:9a:3b:00:00:00:00:94:49:13:00:00:00:00:00:00:00:00:00:00:00:00:00:1f:61:0a:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:44:63:57:67:00:00:00:00:08:dc:76:04:00:00:00:00:18:1f:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:06:00:00:00:00:00:00:00:01:00:00:00:00:00:00:00:6b:f0:dc:56:00:00:00:00:3f:f6:05:00:00:00:00:00:38:12:01:00:06:03:06:00 up|broadcast|multicast}, ifxn-, err=route ip+net: invalid network interface name