Skip to content

gc: better error message for [...]array, currently "floating point exception" #879

@lvdlvd

Description

@lvdlvd
What steps will reproduce the problem?

$ cat >> lala.go <<EOF
package lala

var mult [3][...]byte = [3][5]byte{
        [...]byte{ 1,2,3,4,5 },
        [...]byte{ 1,2,3,4,5 },
        [...]byte{ 1,2,3,4,5 },
}
EOF

$ 8g lala.go 

What is the expected output?

lala.8, but that fails to appear

What do you see instead?

Floating point exception


What is your $GOOS?  $GOARCH?
GOARCH=386
GOROOT=/Users/lvd/Project/go
GOOS=darwin

Which revision are you using?  (hg identify)

7b086a3a9a76 tip

Please provide any additional information below.

i was experimenting to find out if [...][...] would work on a 2-dimensional array, and
noticed the compiler crash.  then i fiddled around a bit to find out it's the second
..., not the first.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions