GCC Build Fails with Your Tree Branch for Threads
Greetings, We discussed at Cauldron I would help you out. However your does not build but the mainline does. Not sure if this is a issue with your tree or a old bug in the libstd++. I've configured it with:
../threads/configure --disable-bootstrap --prefix=$HOME/GCC --enable-threads --disable-multilibs --enable-languages=c,c++
during RTL pass: expand
monetary_members.cc: In member function ‘void std::__cxx11::moneypunct<_CharT, _Intl>::_M_initialize_moneypunct(std::__c_locale, const char*) [with _CharT = char; bool _Intl = false]’: monetary_members.cc:370:5: internal compiler error: Segmentation fault
370 | moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc, | ^~~~~~~~~~~~~~~~~~~~~~~ 0x10c476b3 crash_signal ../../threads/gcc/toplev.c:326
0x10794750 test<rtx_def> ../../threads/gcc/rtl.h:880
0x10794750 is_a<rtx_insn*, rtx_def> ../../threads/gcc/is-a.h:187
0x10794750 safe_as_a<rtx_insn*, rtx_def> ../../threads/gcc/is-a.h:210
0x10794750 PREV_INSN ../../threads/gcc/rtl.h:1449
0x10794750 add_insn_before_nobb ../../threads/gcc/emit-rtl.c:4205
0x1079d46f add_insn_before(rtx_insn*, rtx_insn*, basic_block_def*) ../../threads/gcc/emit-rtl.c:4264
0x1079e703 emit_note_before(insn_note, rtx_insn*) ../../threads/gcc/emit-rtl.c:4832
0x1066cbe3 create_basic_block_structure(rtx_insn*, rtx_insn*, rtx_note*, basic_block_def*) ../../threads/gcc/cfgrtl.c:316
0x1066cf43 rtl_create_basic_block ../../threads/gcc/cfgrtl.c:370
0x1064a6df create_basic_block_1 ../../threads/gcc/cfghooks.c:718
0x10667e1b rtl_split_edge ../../threads/gcc/cfgrtl.c:1908
0x1064c323 split_edge(edge_def*) ../../threads/gcc/cfghooks.c:648
0x10d46e73 expand_phi_nodes(ssaexpand*) ../../threads/gcc/tree-outof-ssa.c:1009
0x1064753b execute ../../threads/gcc/cfgexpand.c:6495 Please submit a full bug report,
with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See https://gcc.gnu.org/bugs/ for instructions. make[5]: *** [monetary_members.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
during RTL pass: expand
In file included from ../../../../../threads/libstdc++-v3/src/c++98/cow-istream-string.cc:30: ../../../../../threads/libstdc++-v3/src/c++98/istream-string.cc: In function ‘std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&, std::basic_string<_CharT, _Traits, _Alloc>&, _CharT) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]’:
../../../../../threads/libstdc++-v3/src/c++98/istream-string.cc:122:5: internal compiler error: Segmentation fault 122 | getline(basic_istream& __in, basic_string& __str, | ^~~~~~~ during RTL pass: expand
../../../../../threads/libstdc++-v3/src/c++98/istream-string.cc: In function ‘std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT) [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]’:
../../../../../threads/libstdc++-v3/src/c++98/istream-string.cc:122:5: internal compiler error:
Segmentation fault 122 | getline(basic_istream& __in, basic_string& __str, | ^~~~~~~
0x10c476b3 crash_signal ../../threads/gcc/toplev.c:326
0x10794750 test<rtx_def> ../../threads/gcc/rtl.h:880
0x10794750 is_a<rtx_insn*, rtx_def> ../../threads/gcc/is-a.h:187
0x10794750 safe_as_a<rtx_insn*, rtx_def> ../../threads/gcc/is-a.h:210
0x10794750 PREV_INSN ../../threads/gcc/rtl.h:1449
0x10794750 add_insn_before_nobb ../../threads/gcc/emit-rtl.c:4205
0x1079d46f add_insn_before(rtx_insn*, rtx_insn*, basic_block_def*) ../../threads/gcc/emit-rtl.c:4264
0x1079e703 emit_note_before(insn_note, rtx_insn*) ../../threads/gcc/emit-rtl.c:4832
0x1066cbe3 create_basic_block_structure(rtx_insn*, rtx_insn*, rtx_note*, basic_block_def*) ../../threads/gcc/cfgrtl.c:316
0x1066cf43 rtl_create_basic_block ../../threads/gcc/cfgrtl.c:370
0x1064a6df create_basic_block_1 ../../threads/gcc/cfghooks.c:718
0x10667e1b rtl_split_edge ../../threads/gcc/cfgrtl.c:1908
0x1064c323 split_edge(edge_def*) ../../threads/gcc/cfghooks.c:648
0x10d46e73 expand_phi_nodes(ssaexpand*) ../../threads/gcc/tree-outof-ssa.c:1009
0x1064753b execute ../../threads/gcc/cfgexpand.c:6495
0x10c476b3 crash_signal ../../threads/gcc/toplev.c:326
Please submit a full bug report, with preprocessed source if appropriate.
Please include the complete backtrace with any bug report. See https://gcc.gnu.org/bugs/ for instructions.
make[5]: *** [cow-istream-string.lo] Error 1
0x10794750 test<rtx_def> ../../threads/gcc/rtl.h:880
0x10794750 is_a<rtx_insn*, rtx_def> ../../threads/gcc/is-a.h:187
0x10794750 safe_as_a<rtx_insn*, rtx_def> ../../threads/gcc/is-a.h:210
0x10794750 PREV_INSN ../../threads/gcc/rtl.h:1449
0x10794750 add_insn_before_nobb ../../threads/gcc/emit-rtl.c:4205
0x1079d46f add_insn_before(rtx_insn*, rtx_insn*, basic_block_def*) ../../threads/gcc/emit-rtl.c:4264
0x1079e703 emit_note_before(insn_note, rtx_insn*) ../../threads/gcc/emit-rtl.c:4832
0x1066cbe3 create_basic_block_structure(rtx_insn*, rtx_insn*, rtx_note*, basic_block_def*) ../../threads/gcc/cfgrtl.c:316
0x1066cf43 rtl_create_basic_block ../../threads/gcc/cfgrtl.c:370
0x1064a6df create_basic_block_1 ../../threads/gcc/cfghooks.c:718
0x10667e1b rtl_split_edge ../../threads/gcc/cfgrtl.c:1908
0x1064c323 split_edge(edge_def*) ../../threads/gcc/cfghooks.c:648
0x10d46e73 expand_phi_nodes(ssaexpand*) ../../threads/gcc/tree-outof-ssa.c:1009
0x1064753b execute ../../threads/gcc/cfgexpand.c:6495
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See https://gcc.gnu.org/bugs/ for instructions.
make[5]: *** [istream-string.lo] Error 1
during RTL pass: expand
monetary_members_cow.cc: In member function ‘void std::moneypunct<_CharT, _Intl>::_M_initialize_moneypunct(std::__c_locale, const char*) [with _CharT = char; bool _Intl = true]’: monetary_members_cow.cc:214:5: internal compiler error: Segmentation fault
214 | moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
| ^~~~~~~~~~~~~~~~~~~~~~
0x10c476b3 crash_signal
../../threads/gcc/toplev.c:326
0x10794750 test<rtx_def>
../../threads/gcc/rtl.h:880
0x10794750 is_a<rtx_insn*, rtx_def>
../../threads/gcc/is-a.h:187
0x10794750 safe_as_a<rtx_insn*, rtx_def>
../../threads/gcc/is-a.h:210
0x10794750 PREV_INSN ../../threads/gcc/rtl.h:1449
0x10794750 add_insn_before_nobb ../../threads/gcc/emit-rtl.c:4205
0x1079d46f add_insn_before(rtx_insn*, rtx_insn*, basic_block_def*) ../../threads/gcc/emit-rtl.c:4264
0x1079e703 emit_note_before(insn_note, rtx_insn*) ../../threads/gcc/emit-rtl.c:4832
0x1066cbe3 create_basic_block_structure(rtx_insn*, rtx_insn*, rtx_note*, basic_block_def*) ../../threads/gcc/cfgrtl.c:316
0x1066cf43 rtl_create_basic_block ../../threads/gcc/cfgrtl.c:370
during RTL pass: expand
../../../../../threads/libstdc++-v3/src/c++98/istream.cc: In function ‘std::basic_istream<_CharT2, _Traits2>& std::operator>>(std::basic_istream<_CharT2, _Traits2>&, _CharT2*) [with _CharT2 = char; _Traits2 = std::char_traits; _CharT = char; _Traits = std::char_traits]’:
../../../../../threads/libstdc++-v3/src/c++98/istream.cc:197:5: internal compiler error: Segmentation fault 197 | operator>>(basic_istream& __in, char* __s) | ^~~~~~~~ 0x1064a6df create_basic_block_1 ../../threads/gcc/cfghooks.c:718
0x10667e1b rtl_split_edge ../../threads/gcc/cfgrtl.c:1908 0x1064c323 split_edge(edge_def*)
../../threads/gcc/cfghooks.c:648
0x10d46e73 expand_phi_nodes(ssaexpand*) ../../threads/gcc/tree-outof-ssa.c:1009
0x1064753b execute ../../threads/gcc/cfgexpand.c:6495
Please submit a full bug report, with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See https://gcc.gnu.org/bugs/ for instructions.
make[5]: *** [monetary_members_cow.lo] Error 1 0x10c476b3 crash_signal ../../threads/gcc/toplev.c:326 0x10669190 force_nonfallthru_and_redirect(edge_def*, basic_block_def*, rtx_def*) ../../threads/gcc/cfgrtl.c:1506
0x1064d467 force_nonfallthru(edge_def*) ../../threads/gcc/cfghooks.c:1024
0x10668083 rtl_split_edge ../../threads/gcc/cfgrtl.c:1863
0x1064c323 split_edge(edge_def*) ../../threads/gcc/cfghooks.c:648
0x10d46e73 expand_phi_nodes(ssaexpand*) ../../threads/gcc/tree-outof-ssa.c:1009
0x1064753b execute ../../threads/gcc/cfgexpand.c:6495
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See https://gcc.gnu.org/bugs/ for instructions.
make[5]: *** [istream.lo] Error 1
make[5]: Leaving directory `/home/xerofoify/GCC/powerpc64le-unknown-linux-gnu/libstdc++-v3/src/c++98'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/xerofoify/GCC/powerpc64le-unknown-linux-gnu/libstdc++-v3/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/xerofoify/GCC/powerpc64le-unknown-linux-gnu/libstdc++-v3'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/xerofoify/GCC/powerpc64le-unknown-linux-gnu/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory `/home/xerofoify/GCC'
make: *** [all] Error 2