cmd/link: multiple function bodies accepted, one in a .go, one in a .s #15297
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:
in x_other.go now has "go build" picking up the other definition:
Still, something ain't right. Re-inserting that
into the x_other.go file gives:
The text was updated successfully, but these errors were encountered:
Duh, of course it's DUPOK. It's been so long since I've seen a deliberate DUPOK that I forgot it existed.
I'm closing this as WAI.
The 7 occurs in https://github.com/klauspost/compress/blob/master/snappy/asm_amd64.s which is probably a copy/paste of old standard library .s files. See https://groups.google.com/d/msg/golang-nuts/uJTYuruvnZM/6j4KXgkdcf0J for some history.