Skip to content
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

gccgo: internal compiler error: Segmentation fault #22305

Closed
ALTree opened this issue Oct 17, 2017 · 3 comments
Closed

gccgo: internal compiler error: Segmentation fault #22305

ALTree opened this issue Oct 17, 2017 · 3 comments
Milestone

Comments

@ALTree
Copy link
Member

ALTree commented Oct 17, 2017

$ gccgo --version
gccgo (GCC) 7.2.0

The following program (reduced from a gosmith-generated one):

package main

var F func() [0]func()
var i = 2
var B = F()[i]

func main() {}

crashes gccgo-7.2.0 with the following error

$ gccgo 0.go 
go1: internal compiler error: Segmentation fault
0xa5192f crash_signal
	../../gcc-7.2.0/gcc/toplev.c:337
0x639504 Gcc_backend::convert_expression(Btype*, Bexpression*, Location)
	../../gcc-7.2.0/gcc/go/go-gcc.cc:1459
0x621acb Type_conversion_expression::do_get_backend(Translate_context*)
	../../gcc-7.2.0/gcc/go/gofrontend/expressions.cc:3485
0x645db8 Variable::get_init(Gogo*, Named_object*)
	../../gcc-7.2.0/gcc/go/gofrontend/gogo.cc:6601
0x65a001 Gogo::write_globals()
	../../gcc-7.2.0/gcc/go/gofrontend/gogo.cc:1370

The crash is reproducible on gccgo tip.

@ALTree ALTree added this to the Gccgo milestone Oct 17, 2017
@ALTree
Copy link
Member Author

ALTree commented Oct 17, 2017

cc @ianlancetaylor

@gopherbot
Copy link

Change https://golang.org/cl/91556 mentions this issue: test: add new test that gccgo failed to compile

@ianlancetaylor
Copy link
Contributor

gopherbot pushed a commit that referenced this issue Feb 15, 2018
Updates #22305

Change-Id: I0e6bbd880599fc1b70d0378b746d162d4a846c65
Reviewed-on: https://go-review.googlesource.com/91556
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@golang golang locked and limited conversation to collaborators Feb 2, 2019
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