Issue 1:
What is the expected output?

go tool vet panics on some of our internal code.

Reducing it is quite a big job. If there isn't enough info here, let me know and I'll go
for it.

INTERNAL PANIC: runtime error: invalid memory address or nil pointer dereference
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x10 pc=0x4eb475]

goroutine 1 [running]:
code.google.com/p/go.tools/go/types.func·003()
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/check.go:447 +0x175
code.google.com/p/go.tools/go/types.identicalMethods(0xc2001e53e0, 0x1, 0x1,
0xc2001c9d90, 0x1, ...)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/predicates.go:219 +0xe5
code.google.com/p/go.tools/go/types.IsIdentical(0xc20008db00, 0xc2001e2d80,
0xc20008db00, 0xc2001c6760, 0xc2000cd700, ...)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/predicates.go:165 +0x8de
code.google.com/p/go.tools/go/types.(*operand).isAssignable(0xc2001b7ac0, 0xc2000cd980,
0xc20008db40, 0xc20020d420, 0xc20016d000, ...)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/operand.go:144 +0x172
code.google.com/p/go.tools/go/types.(*checker).assignment(0xc2000af160, 0xc2001b7ac0,
0xc20008db40, 0xc20020d420, 0xc20008db40, ...)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/stmt.go:36 +0x1dd
code.google.com/p/go.tools/go/types.(*checker).argument(0xc2000af160, 0xc2001c6f60, 0x0,
0xc2000cd680, 0xc20006dbc0, ...)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/expr.go:984 +0x23a
code.google.com/p/go.tools/go/types.(*checker).rawExpr(0xc2000af160, 0xc2001b7ac0,
0xc2000cd700, 0xc2000cd800, 0x0, ...)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/expr.go:1577 +0x353a
code.google.com/p/go.tools/go/types.(*checker).expr(0xc2000af160, 0xc2001b7ac0,
0xc2000cd700, 0xc2000cd800, 0x0, ...)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/expr.go:1727 +0x88
code.google.com/p/go.tools/go/types.(*checker).assignNtoM(0xc2000af160, 0xc20006db40,
0x2, 0x2, 0xc2000aaa70, ...)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/stmt.go:188 +0x1b4
code.google.com/p/go.tools/go/types.(*checker).stmt(0xc2000af160, 0xc2000cd7c0,
0xc2000cd840)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/stmt.go:375 +0x3846
code.google.com/p/go.tools/go/types.(*checker).stmtList(0xc2000af160, 0xc20006dbe0, 0x2,
0x2)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/stmt.go:247 +0x68
code.google.com/p/go.tools/go/types.check(0xc2000cd980, 0x6060a0, 0x1, 0xc2000cd440,
0xc200000268, ...)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/check.go:485 +0x4cf
code.google.com/p/go.tools/go/types.(*Context).Check(0xc2000cd980, 0x6060a0, 0x1,
0xc2000cd440, 0xc200000268, ...)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/go/types/api.go:112 +0x6c
main.(*Package).check(0xc2000cd8c0, 0xc2000cd440, 0xc200000268, 0x1, 0x1, ...)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/cmd/vet/types.go:32 +0x168
main.doPackage(0x6060a0, 0x1, 0xc20006d010, 0x1, 0x1, ...)
/home/alberts/go/src/pkg/code.google.com/p/go.tools/cmd/vet/main.go:226 +0x8f5
main.main()
/home/alberts/go/src/pkg/code.google.com/p/go.tools/cmd/vet/main.go:144 +0x665

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

6g

Which operating system are you using?

linux

Which version are you using? (run 'go version')

tip

Issue 2:
Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull", "hg update default", rebuild, and
retry
what you did to
reproduce the problem. Thanks.

What steps will reproduce the problem?
1. Run the attached code, makeslice.go

What is the expected output?
Sensible outcomes should be either a panic or an output of "0 non-zero values"
- the expected behaviour is not specified in the documentation.

What do you see instead?
len > cap
627 non-zero values

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

Which operating system are you using?
Ubuntu lucid

Which revision are you using? (hg identify)
3cdba7b0650c weekly/weekly.2012-03-13

Please provide any additional information below.

Attachments:

makeslice.go (319 bytes)