Skip to content

cmd/compile: invalid instruction error for FMOVD when compiling for 387 #22429

Closed
@NightTsarina

Description

@NightTsarina

Please answer these questions before submitting your issue. Thanks!

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

go version go1.9.1 linux/386

What operating system and processor architecture are you using (go env)?

GOARCH="386"
GOBIN=""
GOEXE=""
GOHOSTARCH="386"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/lib/go-1.9"
GOTOOLDIR="/usr/lib/go-1.9/pkg/tool/linux_386"
GCCGO="gccgo"
GO386="387"
CC="gcc"
GOGCCFLAGS="-fPIC -m32 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build059883492=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

I did not try to isolate a minimal test case, as I have no idea what is going on. But at least one package in Debian is failing to build because of this (prometheus).

When compiling the tests, this line fails with the following error:

$ GOPATH=$PWD/build go test -c -v github.com/prometheus/prometheus/storage/local
# github.com/prometheus/prometheus/storage/local
build/src/github.com/prometheus/prometheus/storage/local/storage_test.go:2026:26: invalid instruction: 01483 (/tmp/buildd/prometheus-1.8.1+ds/build/src/github.com/prometheus/prometheus/storage/local/storage_test.go:2027) FMOVD ""..autotmp_78+176(DX)(SP*1), F0

I can't reproduce this problem with go 1.7 or 1.8 from Debian. Disabling optimisations with -gcflags=-N seems to solve the issue.

Looking at #21860, I guess that this could something else than an "invalid instruction", but I have no idea :-)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions