Skip to content

gccgo: internal compiler error type_descriptor_backend_name building net/trace #68734

@cal-pratt

Description

@cal-pratt

Go version

go version go1.18 gccgo (Debian 14.1.0-5) 14.1.0 linux/arm64

Output of go env in your module/workspace:

GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT="fieldtrack"
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/libexec/gcc/aarch64-linux-gnu/14"
GOVCS=""
GOVERSION="go1.18 gccgo (Debian 14.1.0-5) 14.1.0"
GCCGO="/usr/bin/aarch64-linux-gnu-gccgo-14"
AR="ar"
CC="aarch64-linux-gnu-gcc-14"
CXX="aarch64-linux-gnu-g++-14"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2148568519=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

What did you do?

I've noticed that on the gccgo-14 release that the net/trace library no longer compiles. A simple docker setup:

from debian:sid
run apt-get update && apt-get install -y gccgo-go git
run cd /tmp && git clone https://github.com/golang/net.git && cd net && go build ./...

What did you see happen?

When I build the project I get back the following stack-trace:

# go build ./...
go: downloading golang.org/x/term v0.22.0
go: downloading golang.org/x/text v0.16.0
go: downloading golang.org/x/sys v0.22.0
# golang.org/x/net/trace
go1: internal compiler error: in type_descriptor_backend_name, at go/gofrontend/names.cc:1099
0xd064ff internal_error(char const*, ...)
	???:0
0xd065eb fancy_abort(char const*, int, char const*)
	???:0
0x18ff0ef Gogo::type_descriptor_backend_name(Type const*, Named_type*, Backend_name*)
	???:0
0x1928c1f Type::make_type_descriptor_var(Gogo*)
	???:0
0x19292ef Type::type_descriptor_pointer(Gogo*, Location)
	???:0
0x18a1f0f Interface_value_expression::do_get_backend(Translate_context*)
	???:0
0x187e56f Type_conversion_expression::do_get_backend(Translate_context*)
	???:0
0x1919cdf Temporary_statement::do_get_backend(Translate_context*)
	???:0
0x18d932f Block::get_backend(Translate_context*)
	???:0
0x1921e4f If_statement::do_get_backend(Translate_context*)
	???:0
0x18d932f Block::get_backend(Translate_context*)
	???:0
0x191a947 Block_statement::do_get_backend(Translate_context*)
	???:0
0x18d932f Block::get_backend(Translate_context*)
	???:0
0x18d9767 Function::build(Gogo*, Named_object*)
	???:0
0x18dab63 Gogo::write_globals()
	???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-14/README.Bugs> for instructions.

What did you expect to see?

This seems to be some sort of regression. Using gccgo-13 I was able to build the project successfully.

This test was running from an arm macbook via docker, but I have also seen this issue running on linux/amd64, on an internally built version of gccgo-14 .

Note: I'm sure if this is the place to raise this issue, or if there is a better place in the gcc project to submit such issues. I will close the ticket if there is a more appropriate bug tracker to raise this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions