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/gc: typechecking loop #2203

Closed
gopherbot opened this Issue Aug 29, 2011 · 10 comments

Comments

Projects
None yet
5 participants
@gopherbot
Copy link

gopherbot commented Aug 29, 2011

by amangogna@modelrealization.com:

1. What is a short input program that triggers the error?
package main

import "fmt"


type Foo struct {
    pbar *Bar
}

type Bar struct {
    pfoo *Foo
}

var f = [10]Foo{Foo{pbar: &b[0]}}
var b = [10]Bar{Bar{pfoo: &f[0]}}

func main() {
    fmt.Println(f, b)
}

2. What is the full compiler output?
frwd.go:15: typechecking loop
frwd.go:18: internal compiler error: cgen: n nil

Please file a bug report including a short program that triggers the error.
http://code.google.com/p/go/issues/entry?template=compilerbug

3. What version of the compiler are you using?  (Run it with the -V flag.)
8g version release.r59 9087
@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Aug 29, 2011

Comment 1:

The 'internal compiler error' is already fixed at tip,
but the typechecking loop is still a problem.

Owner changed to @rsc.

Status changed to Accepted.

@lvdlvd

This comment has been minimized.

Copy link

lvdlvd commented Nov 14, 2011

Comment 2:

Labels changed: added compilerbug.

@remyoudompheng

This comment has been minimized.

Copy link
Contributor

remyoudompheng commented Nov 29, 2011

Comment 3:

Hello, I have started some work about this issue at
  http://golang.org/cl/5445050
@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Dec 9, 2011

Comment 4:

Labels changed: added priority-later.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Dec 12, 2011

Comment 5:

Labels changed: added priority-go1.

@lvdlvd

This comment has been minimized.

Copy link

lvdlvd commented Dec 13, 2011

Comment 6:

Owner changed to @lvdlvd.

@robpike

This comment has been minimized.

Copy link
Contributor

robpike commented Jan 13, 2012

Comment 7:

Owner changed to builder@golang.org.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Jan 24, 2012

Comment 8:

$ cat x.go
package main
import "fmt"
type Foo struct {
    pbar *Bar
}
type Bar struct {
    pfoo *Foo
}
var f = [10]Foo{Foo{pbar: &b[0]}}
var b = [10]Bar{Bar{pfoo: &f[0]}}
func main() {
    fmt.Println(f, b)
}
$ 6g x.go
x.go:14: typechecking loop involving f = composite literal
$ 
May not be worth fixing before Go 1, unless it is trivial.
@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Feb 11, 2012

Comment 9:

The loop is real; will make the compiler print more useful information though.
@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Feb 11, 2012

Comment 10:

Done

Status changed to Fixed.

@rsc rsc added this to the Go1 milestone Apr 10, 2015

@rsc rsc removed the priority-go1 label Apr 10, 2015

@golang golang locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.