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: unexpected type alias in inlined function body #24857

Closed
dsnet opened this issue Apr 14, 2018 · 2 comments
Closed

cmd/compile: unexpected type alias in inlined function body #24857

dsnet opened this issue Apr 14, 2018 · 2 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dsnet
Copy link
Member

dsnet commented Apr 14, 2018

Consider the following program:

package main
import "unsafe"
type ifaceHeader = [2]unsafe.Pointer
func Bar() (x interface{}) {
	*(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{nil, nil}
	return x
}
func Foo() { _ = Bar() }
func main() {}

This currently crashes with:

<autogenerated>:1:0: internal compiler error: exporter: unexpected type alias ifaceHeader in inlined function body

Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new
@dsnet dsnet added the NeedsFix The path to resolution is known, but the work has not been done. label Apr 14, 2018
@dsnet dsnet added this to the Go1.11 milestone Apr 14, 2018
@ALTree
Copy link
Member

ALTree commented Apr 14, 2018

This was fixed on tip by CL 97719. Or are you still seeing crashes on tip?

@dsnet
Copy link
Member Author

dsnet commented Apr 14, 2018

Confirmed. Fixed on tip. Thanks.

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

3 participants