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: in struct_field_expression #23870

ALTree opened this issue Feb 16, 2018 · 0 comments


Copy link

commented Feb 16, 2018

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

package p

var F func() [0]struct{
	A int 

var i int
var V = (F()[i]).A

crashes gccgo (GCC) 8.0.1 20180205 (experimental) with the following error:

go1: internal compiler error: in struct_field_expression, at go/
0x6e164b Gcc_backend::struct_field_expression(Bexpression*, unsigned long, Location)
0x6b8a81 Field_reference_expression::do_get_backend(Translate_context*)
0x6c839b Type_conversion_expression::do_get_backend(Translate_context*)
0x6ef008 Variable::get_init(Gogo*, Named_object*)
0x703979 Gogo::write_globals()

This gcc trunk build includes the fix for #22305, which no longer causes a crash; so I believe this is not a dup of #22305.

@ALTree ALTree added this to the Gccgo milestone Feb 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.