You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go version
go version go1.12.2 gccgo (GCC) 10.0.0 20190627 (experimental) linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
linux/amd64
What did you do?
This bug is a sibling of issue 33013; the failure mode is very similar, but because of the way the type in question is being imported, the fix for 33013 is not effective.
To reproduce, compile these three packages:
Package "a":
package a
type A interface {
M(i interface{}) interface{}
}
var a1 A
var a2 A
func V(p A, k, v interface{}) A {
defer func() { a1, a2 = a2, a1 }()
return a1
}
Package "b":
package b
import "a"
type Service uint64
var q *Service
var r *Service
type f struct{}
var fk f
func No(s a.A, qq uint8) *Service {
defer func() { q, r = r, q }()
return q
}
func Yes(s a.A, p *uint64) a.A {
return a.V(s, fk, p)
}
Package "c":
package c
import (
"a"
"b"
)
type BI interface {
Another(pxp a.A) int32
}
//go:noinline
func BRS(sd a.G, xyz int) *b.Service {
x := b.Yes(sd, nil)
return b.No(x, 1)
}
The fix for issue 33013 added a cleanup pass after Import::read_types() that went through the vector of newly imported types looking for interface types -- this works if the type in question is imported eagerly, but doesn't work if the type is only mentioned in a function that gets imported later on.
The text was updated successfully, but these errors were encountered:
This patch is a revision to CL 185518, which added code to perform
finalization of methods on types created by the importer and not
directly reachable until inlining is done.
The original fix invoked the finalization code at the end of
Import::read_types(), but it turns out this doesn't handle the case
where a type with methods is read in due to a reference from something
later in the export data (a function or variable). The fix is to move
the import finalization call to the end of Import::import().
Testcase for this bug is in CL 187057.
Fixesgolang/go#33219.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/187058
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273713 138bc75d-0d04-0410-961f-82ee72b054a4
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
This bug is a sibling of issue 33013; the failure mode is very similar, but because of the way the type in question is being imported, the fix for 33013 is not effective.
To reproduce, compile these three packages:
Package "a":
Package "b":
Package "c":
What did you expect to see?
Passing compilation
What did you see instead?
Compiler hits this assert:
The fix for issue 33013 added a cleanup pass after Import::read_types() that went through the vector of newly imported types looking for interface types -- this works if the type in question is imported eagerly, but doesn't work if the type is only mentioned in a function that gets imported later on.
The text was updated successfully, but these errors were encountered: