seen with trunk 20210102 on ia64-linux-gnu: go1: internal compiler error: Segmentation fault 0x400000000126cfcf crash_signal ../../src/gcc/toplev.c:327 0x4000000002de14df std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned long, unsigned long) const /<<PKGBUILDDIR>>/build/ia64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:907 0x400000000036e3ff Gogo::special_name_pos(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ../../src/gcc/go/gofrontend/names.cc:1193 0x400000000023783f should_export ../../src/gcc/go/gofrontend/export.cc:464 0x400000000023c99f Export::export_globals(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Package*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Package*> > > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Package*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Package*> > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Import_init_set const&, Bindings const*, std::unordered_set<Named_object*, std::hash<Named_object*>, std::equal_to<Named_object*>, std::allocator<Named_object*> >*) ../../src/gcc/go/gofrontend/export.cc:573 0x40000000003ae35f Gogo::do_exports() /<<PKGBUILDDIR>>/build/prev-ia64-linux-gnu/libstdc++-v3/include/bits/basic_string.h:907 0x400000000035dbef Gogo::do_exports() ../../src/gcc/go/gofrontend/gogo.cc:5201 0x400000000035dbef go_parse_input_files(char const**, unsigned int, bool, bool) ../../src/gcc/go/gofrontend/go.cc:157 0x40000000002f4aff go_langhook_parse_file ../../src/gcc/go/go-lang.c:352 Please submit a full bug report, with preprocessed source if appropriate. configured with: --enable-languages=c,c++,go,d,fortran,objc,obj-c++ --prefix=/usr/lib/gcc-snapshot --with-gcc-major-version-only --program-prefix= --enable-shared --enable-linker-build-id --disable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libssp --disable-libitm --disable-libsanitizer --enable-plugin --with-system-zlib --disable-libphobos --enable-objc-gc=auto --enable-multiarch --disable-werror --with-system-libunwind --enable-checking=yes --build=ia64-linux-gnu --host=ia64-linux-gnu --target=ia64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=1
make[6]: *** [Makefile:2962: runtime.lo] Error 1 make[6]: Leaving directory '/<<PKGBUILDDIR>>/build/ia64-linux-gnu/libgo' make[5]: *** [Makefile:2292: all-recursive] Error 1 make[5]: Leaving directory '/<<PKGBUILDDIR>>/build/ia64-linux-gnu/libgo' make[4]: *** [Makefile:1187: all] Error 2 make[4]: Leaving directory '/<<PKGBUILDDIR>>/build/ia64-linux-gnu/libgo' make[3]: *** [Makefile:21385: all-target-libgo] Error 2
Does it also fail without LTO?
Maybe I'm missing something obvious, but I don't see how this is possible. The code in the Go frontend is if (suffix.compare(2, 5, "thunk") == 0 && Gogo::is_digits(suffix.substr(7))) return pos; The crash is apparently occurring on the call to suffix.substr(7). Given that suffix.compare already worked, there should be no way that that code could crash. So to me this looks like a miscompilation of the Go frontend code, rather than a bug in the Go frontend.
a trunk 20210130 build without LTO did succeed.
Matthias, what's the state on current trunk?
(In reply to Richard Biener from comment #5) > Matthias, what's the state on current trunk? I can test this for Matthias on my own machine as the new ia64 porterbox that we set up in Debian is currently having connection issues with the LDAP database. I will try to get the machine fixed over the weekend.
GCC 11.1 has been released, retargeting bugs to GCC 11.2.
GCC 11.2 is being released, retargeting bugs to GCC 11.3
Any update on the status on current trunk?
(In reply to Richard Biener from comment #9) > Any update on the status on current trunk? I can give it a try later this week. We have a new shiny ia64 porterbox in Debian now :-).
(In reply to John Paul Adrian Glaubitz from comment #10) > (In reply to Richard Biener from comment #9) > > Any update on the status on current trunk? > > I can give it a try later this week. We have a new shiny ia64 porterbox in > Debian now :-). So, I just did a bootstrap build with $ ../configure --prefix=$HOME/gcc-install --enable-multilib --enable-languages=c,c++,go --with-system-libunwind and it built fine without any issues. Trying to build a simple Go program failed however due to an unrelated error: (sid_ia64-dchroot)glaubitz@yttrium:~/gcc-install/bin$ ./gccgo ~/hello.go /home/glaubitz/hello.go:5:11: error: import file 'fmt' not found 5 | import "fmt" | ^ /home/glaubitz/hello.go:10:5: error: reference to undefined name 'fmt' 10 | fmt.Println("hello world") | ^ (sid_ia64-dchroot)glaubitz@yttrium:~/gcc-install/bin$ I'm not a GO expert, so no idea how to tell the Go compiler where the libraries are located.
You can pass the -I option to tell the compiler where to find the fmt.gox file. But, of course, you shouldn't have to. A "make install" should put fmt.gox in the right place by default. I don't know why you are seeing a problem there.
(In reply to Ian Lance Taylor from comment #12) > But, of course, you shouldn't have to. A "make install" should put fmt.gox > in the right place by default. I don't know why you are seeing a problem > there. I gave it a try again. Compiling works, but the program crashes: glaubitz@yttrium:~$ gccgo hello.go -o hello glaubitz@yttrium:~$ ./hello Aborted glaubitz@yttrium:~$
(In reply to John Paul Adrian Glaubitz from comment #11) > (In reply to John Paul Adrian Glaubitz from comment #10) > > (In reply to Richard Biener from comment #9) > > > Any update on the status on current trunk? > > > > I can give it a try later this week. We have a new shiny ia64 porterbox in > > Debian now :-). > > So, I just did a bootstrap build with > > $ ../configure --prefix=$HOME/gcc-install --enable-multilib > --enable-languages=c,c++,go --with-system-libunwind > > and it built fine without any issues. Btw, that was never broken - broken was a build with --with-build-config=bootstrap-lto-lean I'd still be interested if that now works. P4 as default config bootstrap never was broken and ia64-linux isn't primary or secondary.
GCC 11.3 is being released, retargeting bugs to GCC 11.4.
GCC 11.4 is being released, retargeting bugs to GCC 11.5.