Skip to content

gccgo: reflection-based type printing inconsistency #23620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tamird opened this issue Jan 30, 2018 · 3 comments
Closed

gccgo: reflection-based type printing inconsistency #23620

tamird opened this issue Jan 30, 2018 · 3 comments
Milestone

Comments

@tamird
Copy link
Contributor

tamird commented Jan 30, 2018

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

go version go1.10beta2 gccgo (GCC) 8.0.1 20180126 (experimental) linux/amd64

Does this issue reproduce with the latest release?

N/A

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/tduberstein/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/tduberstein/local/go"
GORACE=""
GOROOT="/home/tduberstein/local/gcc/gcc"
GOTMPDIR=""
GOTOOLDIR="/home/tduberstein/local/gcc/gcc/libexec/gcc/x86_64-pc-linux-gnu/8.0.1"
GCCGO="/home/tduberstein/local/gcc/gcc/bin/gccgo"
CC="gcc"
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"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build297122770=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

What did you do?

package main

import (
	"fmt"
)

type e = struct{ error }

func main() {
	fmt.Printf("%T\n", e{})
}

https://play.golang.org/p/HRkuS74EjTu

What did you expect to see?

struct { error }

What did you see instead?

struct { ? error }

@gopherbot gopherbot added this to the Gccgo milestone Jan 30, 2018
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/91138 mentions this issue: reflect: add embedded field test

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/91139 mentions this issue: compiler: omit field name for embedded fields in reflection string

@odeke-em
Copy link
Member

odeke-em commented Feb 1, 2018

Thank you @tamird for this bug report.

/cc @paranoiacblack @ianlancetaylor @thanm.

hubot pushed a commit to gcc-mirror/gcc that referenced this issue Feb 1, 2018
    
    This matches the gc compiler.
    
    The test case was sent for the master repo as
    https://golang.org/cl/91138.
    
    Fixes golang/go#23620
    
    Reviewed-on: https://go-review.googlesource.com/91139


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257300 138bc75d-0d04-0410-961f-82ee72b054a4
gopherbot pushed a commit that referenced this issue Feb 14, 2018
Gccgo failed this test.

Updates #23620

Change-Id: I3979a6d3b87d2d014850accf9cb7f356349e6195
Reviewed-on: https://go-review.googlesource.com/91138
Run-TryBot: Ian Lance Taylor <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Than McIntosh <[email protected]>
@golang golang locked and limited conversation to collaborators Feb 1, 2019
asiekierka pushed a commit to WonderfulToolchain/gcc-ia16 that referenced this issue May 16, 2022
    
    This matches the gc compiler.
    
    The test case was sent for the master repo as
    https://golang.org/cl/91138.
    
    Fixes golang/go#23620
    
    Reviewed-on: https://go-review.googlesource.com/91139

From-SVN: r257300
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants