Skip to content

cmd/compile: Type.obj appears to be nil most (all?) of the time #81257

Description

@griesemer

The compiler internal error (now circumvented) reported in #81241 is due to a missing (cmd/compile/internal/types) type Object (Type.obj) of a struct. With a nil obj field, the type position is unknown which lead to an internal compiler error in that case.

The Type.obj field should be set at some point, perhaps after TFORW types are resolved (which would still be too late for the above case). It's also not clear where a type's position should be stored in the type is unnamed; presumably no Object exists in that case.

A cursory investigation seemed to imply that Type.obj is mostly (always?) nil.
Should investigate and resolve as this may be the cause for possibly other internal compiler errors.

Activity

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

Metadata

Metadata

Labels

NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.compiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions