Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: internal compiler error: unhandled addr INDEXMAP #14678

Closed
rhysh opened this issue Mar 7, 2016 · 6 comments
Closed

cmd/compile: internal compiler error: unhandled addr INDEXMAP #14678

rhysh opened this issue Mar 7, 2016 · 6 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rhysh
Copy link
Contributor

rhysh commented Mar 7, 2016

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

go version devel +da1802f Sun Mar 6 23:57:06 2016 +0000 darwin/amd64

What did you do?

https://play.golang.org/p/t1rcQ_zYVD

// compile

// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package main

func main() {
    m := make(map[int]bool)
    i := interface{}(false)

    _, m[1] = i.(bool)
}

What did you expect to see?

Successful compilation

What did you see instead?

Tip fails with internal compiler error: unhandled addr INDEXMAP, go1.6 and go1.5.3 fail with internal compiler error: agen: unknown op INDEXMAP u(2) l(13) tc(1) assigned bool, compilation on go1.4 succeeds.

@josharian josharian added this to the Go1.7 milestone Mar 7, 2016
@ianlancetaylor
Copy link
Contributor

CC @randall77

@gopherbot
Copy link

CL https://golang.org/cl/22833 mentions this issue.

@mdempsky mdempsky reopened this May 8, 2016
@mdempsky
Copy link
Member

mdempsky commented May 8, 2016

Had to revert the fix due to #15602. Will try again for 1.8.

Minimal repro of regression:

package p

func f(i interface{}) {
        i, _ = i.(error)
}

(Sorry @tshprecher, I think your original CL did not have this problem, and it was only introduced by my suggested rewrite.)

@tshprecher
Copy link
Contributor

@mdempsky, sorry for this, and sorry for responding so late as I rewrite my noisy github gmail filters. It's no problem.

@mdempsky
Copy link
Member

Possibly related issue #13433.

Also, FYI (and for my own reference), running cmd/compile with -W -W will dump the nodes list both before and after the "order" pass. E.g., for function foo, it's before-order form is printed as "before order foo", and then it's after-order form is printed as "before foo". ("before foo" here really means "before walk foo", where 'walk' is the compiler's next function pass after 'order'.)

Unfortunately the raw Nod tree dump is very informative, but not very intuitive. (Aside: If anyone wants to play with prettier ways to print those out, that would be awesome.)

@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 6, 2016
@rsc
Copy link
Contributor

rsc commented Oct 17, 2016

Seems to work fine now.

@rsc rsc closed this as completed Oct 17, 2016
@golang golang locked and limited conversation to collaborators Oct 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

8 participants