<p dir="auto">by <strong>fgergo</strong>:</p>
<pre class="notranslate">What steps will reproduce the problem?
1. compiling, linking and running ./5.out

package main

import "fmt"

func main() {
    fmt.Println("Hello")
}

What is the expected output?
"Hello" is printed.

What do you see instead?
SIGILL: illegal instruction
PC=0x637c4

math.initÂˇ1+0x30 /n/sd/1/go/src/pkg/math/pow10.go:24
        math.initÂˇ1()
math.InitÂˇ+0x76c /n/sd/1/go/src/pkg/math/unsafe.go:21
        math.InitÂˇ()
reflect.InitÂˇ+0x68 /n/sd/1/go/src/pkg/reflect/value.go:1234
        reflect.InitÂˇ()
fmt.InitÂˇ+0x78 /n/sd/1/go/src/pkg/fmt/scan.go:992
        fmt.InitÂˇ()
main.init+0x68 /n/sd/1/go/src/cmd/fgergo/a.go:7
        main.init()
runtime.mainstart+0x8 /n/sd/1/go/src/pkg/runtime/arm/asm.s:65
        runtime.mainstart()
runtime.initdone+0x64 /n/sd/1/go/src/pkg/runtime/proc.c:-1181
        runtime.initdone()

trap    0x6
error   0x0
oldmask 0x0
r0      0xe76a0
r1      0x0
r2      0xc013d686
r3      0xcad20
r4      0x0
r5      0x0
r6      0x0
r7      0x0
r8      0x0
r9      0xe7378
r10     0x40022000
fp      0xe5728
ip      0xcafebabe
sp      0x40023fb8
lr      0x640a8
pc      0x637c4
cpsr    0x20000010
fault   0x0



Which compiler are you using (5g, 6g, 8g, gccgo)?
5g

Which operating system are you using?
$ uname -a
Linux dugo 2.6.22.18 #1 Thu Mar 19 14:46:22 IST 2009 armv5tejl GNU/Linux

Which revision are you using?  (hg identify)
b91808966dbd+ tip

Please provide any additional information below.
Sheevaplug

$ set|grep GO
GOARCH=arm
GOARM=5
GOOS=linux
GOROOT=/n/sd/1/go

$ gdb --quiet 5.out
(no debugging symbols found)
(gdb) r
Starting program: /n/sd/1/go/src/cmd/fgergo/5.out

Program received signal SIGILL, Illegal instruction.
0x000637c4 in ?? ()
(gdb) disassemble 0x637c0 0x637f0
Dump of assembler code from 0x637c0 to 0x637f0:
0x000637c0:     nop                     (mov r0,r0)
0x000637c4:     fconstd d0, #112
0x000637c8:     vstr    d0, [r0]
0x000637cc:     ldr     r0, [pc, #268]  ; 0x638e0
0x000637d0:     nop                     (mov r0,r0)
0x000637d4:     mov     r1, #8  ; 0x8
0x000637d8:     add     r0, r0, r1
0x000637dc:     nop                     (mov r0,r0)
0x000637e0:     fconstd d0, #36
0x000637e4:     vstr    d0, [r0]
0x000637e8:     mov     r0, #2  ; 0x2
0x000637ec:     str     r0, [sp, #20]
End of assembler dump.
(gdb)</pre>
<p dir="auto">go/types accepts the following program:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package a
func f() {
    switch 0 {
        case 0:
        case 0:
    }
}"><pre class="notranslate"><span class="pl-k">package</span> a
<span class="pl-k">func</span> <span class="pl-en">f</span>() {
    <span class="pl-k">switch</span> <span class="pl-c1">0</span> {
        <span class="pl-k">case</span> <span class="pl-c1">0</span>:
        <span class="pl-k">case</span> <span class="pl-c1">0</span>:
    }
}</pre></div>
<p dir="auto">While both gc and gccgo reject it with <code class="notranslate">duplicate case 0 in switch</code>.<br>
Compilers should agree on validity of this program.</p>
<p dir="auto">on commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/golang/go/commit/997b3545fd86c3a2d8e5fe6366174d7786e71278/hovercard" href="https://github.com/golang/go/commit/997b3545fd86c3a2d8e5fe6366174d7786e71278"><tt>997b354</tt></a></p>