Skip to content

cmd/compile: wrong line number in error message #50133

@zigo101

Description

@zigo101

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

$ go version
go version go1.17.5 linux/amd64
go version devel go1.18-9bfe09d78b Mon Dec 13 06:35:06 2021 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes

What did you do?

package main

const N = 2000000000

var x [N+1]byte

var y *[N+1]byte

func main() {
	var a [N+1]byte // okay
	y = &a // main.go:11:4: main.x: symbol too large (2000000001 bytes > 2000000000 bytes)
}

What did you expect to see?

main.go:5:5: main.x: symbol too large (2000000001 bytes > 2000000000 bytes)

What did you see instead?

main.go:11:4: main.x: symbol too large (2000000001 bytes > 2000000000 bytes)

Metadata

Metadata

Assignees

No one assigned

    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

    Status

    Triage Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions