gccgo: internal compiler error: in do_export
dvyukov opened this issue · 3 comments
dvyukov commented
gccgo crashes on the following program:
package a
const A = <-0
go1: internal compiler error: in do_export, at go/gofrontend/types.cc:2561
0x65a3d7 Type::do_export(Export*) const
../../gcc/go/gofrontend/types.cc:2561
0x5d6e1f Type::export_type(Export*) const
../../gcc/go/gofrontend/types.h:980
0x5d6e1f Export::write_type(Type const*)
../../gcc/go/gofrontend/export.cc:431
0x613a1c Named_constant::export_const(Export*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const
../../gcc/go/gofrontend/gogo.cc:6631
0x614e84 Named_object::export_named_object(Export*) const
../../gcc/go/gofrontend/gogo.cc:7016
0x5d820f Export::export_globals(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Package*, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Package*> > > const&, std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Package*, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Package*> > > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::set<Import_init, std::less<Import_init>, std::allocator<Import_init> > const&, Bindings const*)
../../gcc/go/gofrontend/export.cc:178
0x611273 Gogo::do_exports()
../../gcc/go/gofrontend/gogo.cc:4521
0x60ef57 go_parse_input_files(char const**, unsigned int, bool, bool)
../../gcc/go/gofrontend/go.cc:118
0x60accf go_langhook_parse_file
../../gcc/go/go-lang.c:304
gofrontend is on commit 81810917af7ba19e1f9f8efc8b1989f7d6419d30
dvyukov commented
gopherbot commented
CL https://golang.org/cl/13984 mentions this issue.
ianlancetaylor commented
This no longer crashes on tip.
foo.go:2:11: error: expected channel
const A = <-0
^