https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96927
Bug ID: 96927 Summary: [11 regression] ICE in libstdc++-v3/include/chrono:442 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: seurer at gcc dot gnu.org Target Milestone: --- I am seeing ICEs in some of the C++ conformance tests with a bootstrap build. I think they are all like the following. I am not sure what exact revision caused them as they do not occur with every run nor on every system but it is in the range r11-2828 to r11-2985. I'll try to narrow it down a bit. seurer@makalu-lp1:~/gcc/git/build/gcc-test$ /home/seurer/gcc/git/build/gcc-trunk-bootstrap/./gcc/xg++ -shared-libgcc -B/home/seurer/gcc/git/build/gcc-trunk-bootstrap/./gcc -nostdinc++ -L/home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/libstdc++-v3/src -L/home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -B/home/seurer/gcc/git/install/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/bin/ -B/home/seurer/gcc/git/install/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/lib/ -isystem /home/seurer/gcc/git/install/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/include -isystem /home/seurer/gcc/git/install/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/sys-include -fchecking=1 -B/home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/./libstdc++-v3/src/.libs -fmessage-length=0 -fno-show-column -ffunction-sections -fdata-sections -g -O2 -D_GNU_SOURCE -DLOCALEDIR="." -nostdinc++ -I/home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu -I/home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/libstdc++-v3/include -I/home/seurer/gcc/git/gcc-trunk-bootstrap/libstdc++-v3/libsupc++ -I/home/seurer/gcc/git/gcc-trunk-bootstrap/libstdc++-v3/include/backward -I/home/seurer/gcc/git/gcc-trunk-bootstrap/libstdc++-v3/testsuite/util /home/seurer/gcc/git/gcc-trunk-bootstrap/libstdc++-v3/testsuite/20_util/is_empty/value.cc -include bits/stdc++.h -fdiagnostics-plain-output -S -o value.s In file included from /home/seurer/gcc/git/gcc-trunk-bootstrap/libstdc++-v3/include/precompiled/stdc++.h:101: /home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/libstdc++-v3/include/chrono: In substitution of 'template<class _Rep2, class _Period2, class> constexpr std::chrono::duration<long int, std::ratio<1, 1000000000> >::duration(const std::chrono::duration<_Rep1, _Period1>&) [with _Rep2 = long int; _Period2 = std::ratio<1>; <template-parameter-1-3> = <missing>]': /home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/libstdc++-v3/include/chrono:614: required from 'constexpr typename std::common_type<std::chrono::duration<_Rep1, _Period1>, std::chrono::duration<_Rep2, _Period2> >::type std::chrono::operator-(const std::chrono::duration<_Rep1, _Period1>&, const std::chrono::duration<_Rep2, _Period2>&) [with _Rep1 = long int; _Period1 = std::ratio<1, 1000000000>; _Rep2 = long int; _Period2 = std::ratio<1>; typename std::common_type<std::chrono::duration<_Rep1, _Period1>, std::chrono::duration<_Rep2, _Period2> >::type = std::chrono::duration<long int, std::ratio<1, 1000000000> >]' /home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/libstdc++-v3/include/chrono:975: required from 'constexpr std::chrono::time_point<_Clock, typename std::common_type<_Dur1, std::chrono::duration<_Rep2, _Period2> >::type> std::chrono::operator-(const std::chrono::time_point<_Clock, _Duration1>&, const std::chrono::duration<_Rep2, _Period2>&) [with _Clock = std::filesystem::__file_clock; _Dur1 = std::chrono::duration<long int, std::ratio<1, 1000000000> >; _Rep2 = long int; _Period2 = std::ratio<1>; typename std::common_type<_Dur1, std::chrono::duration<_Rep2, _Period2> >::type = std::chrono::duration<long int, std::ratio<1, 1000000000> >]' /home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/libstdc++-v3/include/chrono:3254: required from 'static std::chrono::time_point<std::filesystem::__file_clock, _Dur> std::filesystem::__file_clock::_S_from_sys(const std::chrono::time_point<std::chrono::_V2::system_clock, _Dur2>&) [with _Dur = std::chrono::duration<long int, std::ratio<1, 1000000000> >]' /home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/libstdc++-v3/include/chrono:3221: required from here /home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/libstdc++-v3/include/chrono:441: in 'constexpr' expansion of 'std::chrono::duration<long int, std::ratio<1, 1000000000> >::_S_gcd(((intmax_t)std::ratio<1>::den), ((intmax_t)std::ratio<1, 1000000000>::den))' /home/seurer/gcc/git/build/gcc-trunk-bootstrap/powerpc64-unknown-linux-gnu/libstdc++-v3/include/chrono:442: internal compiler error: Segmentation fault 0x10df176b crash_signal /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/toplev.c:327 0x102aed7c cxx_eval_call_expression /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/constexpr.c:2622 0x102b131f cxx_eval_constant_expression /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/constexpr.c:5765 0x102b52f7 cxx_eval_outermost_constant_expr /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/constexpr.c:6772 0x102bbaf7 maybe_constant_value(tree_node*, tree_node*, bool) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/constexpr.c:7045 0x103bf65f fold_for_warn(tree_node*) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/expr.c:418 0x105ff317 cp_build_binary_op(op_location_t const&, tree_code, tree_node*, tree_node*, int) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/typeck.c:4741 0x1025e337 build_new_op_1 /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/call.c:6555 0x1025f143 build_new_op(op_location_t const&, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/call.c:6601 0x105e76bf build_x_binary_op(op_location_t const&, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node**, int) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/typeck.c:4287 0x104f6e03 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/pt.c:19576 0x104f6d37 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/pt.c:19568 0x1050bc5b tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/pt.c:18879 0x1052778f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/pt.c:17933 0x1052778f tsubst_template_arg(tree_node*, tree_node*, int, tree_node*) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/pt.c:12162 0x1052778f tsubst_template_arg(tree_node*, tree_node*, int, tree_node*) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/pt.c:12150 0x105278f3 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/pt.c:13215 0x1052281f tsubst_aggr_type /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/pt.c:13418 0x104f59b3 tsubst_qualified_id /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/pt.c:16199 0x104f8f43 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) /home/seurer/gcc/git/gcc-trunk-bootstrap/gcc/cp/pt.c:19605 On one system it affected all of these: FAIL: 20_util/common_type/requirements/sfinae_friendly_2.cc (test for excess errors) FAIL: 20_util/is_empty/value.cc (test for excess errors) FAIL: 20_util/tuple/56785.cc (test for excess errors) FAIL: 20_util/tuple/cons/element_accepts_anything_byval.cc (test for excess errors) FAIL: 21_strings/basic_string/allocator/char/noexcept.cc (test for excess errors) FAIL: 23_containers/map/modifiers/insert/87194.cc (test for excess errors) FAIL: 23_containers/multimap/init-list.cc (test for excess errors) FAIL: 23_containers/multimap/modifiers/emplace/1.cc (test for excess errors) FAIL: 23_containers/multimap/modifiers/insert/87194.cc (test for excess errors) FAIL: 23_containers/multiset/debug/move_assign_neg.cc (test for excess errors) FAIL: 23_containers/unordered_map/allocator/copy.cc (test for excess errors) FAIL: 23_containers/unordered_map/allocator/copy_assign.cc (test for excess errors) FAIL: 23_containers/unordered_map/allocator/minimal.cc (test for excess errors) FAIL: 23_containers/unordered_multimap/erase/51845-multimap.cc (test for excess errors) FAIL: 23_containers/unordered_multimap/insert/multimap_single_move-1.cc (test for excess errors) FAIL: 23_containers/unordered_multimap/operations/count.cc (test for excess errors) FAIL: 23_containers/unordered_multimap/operators/1.cc (test for excess errors) FAIL: 23_containers/unordered_multimap/operators/2.cc (test for excess errors) FAIL: 23_containers/unordered_set/allocator/move.cc (test for excess errors) FAIL: 30_threads/shared_future/cons/assign.cc (test for excess errors) FAIL: 30_threads/this_thread/58038.cc (test for excess errors) FAIL: tr1/4_metaprogramming/has_nothrow_assign/value.cc (test for excess errors) FAIL: tr1/4_metaprogramming/has_nothrow_copy/value.cc (test for excess errors) FAIL: tr1/4_metaprogramming/has_trivial_assign/value.cc (test for excess errors) FAIL: tr1/4_metaprogramming/has_trivial_copy/value.cc (test for excess errors) FAIL: tr1/4_metaprogramming/is_empty/value.cc (test for excess errors) FAIL: tr1/6_containers/headers/unordered_map/synopsis.cc (test for excess errors) FAIL: tr1/6_containers/headers/unordered_set/synopsis.cc (test for excess errors) FAIL: tr1/6_containers/tuple/cons/big_tuples.cc (test for excess errors) FAIL: tr1/6_containers/tuple/cons/constructor.cc (test for excess errors) FAIL: tr1/6_containers/unordered_map/24064.cc (test for excess errors) FAIL: tr1/6_containers/unordered_map/requirements/iterator_neg.cc (test for excess errors) FAIL: tr1/6_containers/unordered_map/requirements/iterator_null_neg.cc (test for excess errors) FAIL: tr1/6_containers/unordered_map/requirements/typedefs.cc (test for excess errors) FAIL: tr1/6_containers/unordered_multimap/requirements/iterator_neg.cc (test for excess errors) FAIL: tr1/6_containers/unordered_multimap/requirements/iterator_null_neg.cc (test for excess errors) FAIL: tr1/6_containers/unordered_multimap/requirements/typedefs.cc (test for excess errors) FAIL: tr1/6_containers/unordered_multiset/24054.cc (test for excess errors) FAIL: tr1/6_containers/unordered_multiset/erase/1.cc (test for excess errors) FAIL: tr1/6_containers/unordered_multiset/erase/24061-multiset.cc (test for excess errors) FAIL: tr1/6_containers/unordered_multiset/insert/24061-multiset.cc (test for excess errors) FAIL: tr1/6_containers/unordered_multiset/insert/multiset_single.cc (test for excess errors) FAIL: tr1/6_containers/unordered_multiset/requirements/explicit_instantiation.cc (test for excess errors) FAIL: tr1/6_containers/unordered_multiset/requirements/iterator_neg.cc (test for excess errors) FAIL: tr1/6_containers/unordered_multiset/requirements/iterator_null_neg.cc (test for excess errors) FAIL: tr1/6_containers/unordered_multiset/requirements/typedefs.cc (test for excess errors) FAIL: tr1/6_containers/unordered_set/23053.cc (test for excess errors) FAIL: tr1/6_containers/unordered_set/26127.cc (test for excess errors) FAIL: tr1/6_containers/unordered_set/insert/24061-set.cc (test for excess errors) FAIL: tr1/6_containers/unordered_set/insert/set_range.cc (test for excess errors) FAIL: tr1/6_containers/unordered_set/requirements/explicit_instantiation.cc (test for excess errors) FAIL: tr1/6_containers/unordered_set/requirements/iterator_neg.cc (test for excess errors) FAIL: tr1/6_containers/unordered_set/requirements/iterator_null_neg.cc (test for excess errors) FAIL: tr1/6_containers/unordered_set/requirements/iterators_default_constructor.cc (test for excess errors) FAIL: tr1/6_containers/unordered_set/requirements/typedefs.cc (test for excess errors)