https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96901
Bug ID: 96901 Summary: [11 Regression] Many libstdc++ tests FAIL on i686-linux due to a PCH FE bug Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- I'm seeing following regressions between Monday and Tuesday evening CET trunk bootstraps: Running target unix +FAIL: 20_util/bind/42593.cc (test for excess errors) +FAIL: 20_util/bind/48698.cc (test for excess errors) +FAIL: 20_util/is_compound/value.cc (test for excess errors) +FAIL: 20_util/is_fundamental/value.cc (test for excess errors) +FAIL: 20_util/is_signed/value.cc (test for excess errors) +FAIL: 20_util/is_unsigned/value.cc (test for excess errors) +FAIL: 20_util/unique_ptr/assign/nullptr.cc (test for excess errors) +UNRESOLVED: 20_util/unique_ptr/assign/nullptr.cc compilation failed to produce executable +FAIL: 20_util/unique_ptr/cons/convertible_neg.cc (test for excess errors) +FAIL: 20_util/unique_ptr/cons/incomplete.cc (test for excess errors) +FAIL: 20_util/unique_ptr/cons/nullptr.cc (test for excess errors) +UNRESOLVED: 20_util/unique_ptr/cons/nullptr.cc compilation failed to produce executable +FAIL: 20_util/unique_ptr/requirements/explicit_instantiation/explicit_instantiation.cc (test for excess errors) +FAIL: 21_strings/basic_string/allocator/wchar_t/noexcept.cc (test for excess errors) +FAIL: 22_locale/conversions/string/requirements/typedefs-2.cc (test for excess errors) +FAIL: 23_containers/list/allocator/noexcept.cc (test for excess errors) +FAIL: 23_containers/map/modifiers/insert/2.cc (test for excess errors) +UNRESOLVED: 23_containers/map/modifiers/insert/2.cc compilation failed to produce executable +FAIL: 23_containers/map/modifiers/insert/5.cc (test for excess errors) +UNRESOLVED: 23_containers/map/modifiers/insert/5.cc compilation failed to produce executable +FAIL: 23_containers/multimap/modifiers/insert/2.cc (test for excess errors) +UNRESOLVED: 23_containers/multimap/modifiers/insert/2.cc compilation failed to produce executable +FAIL: 23_containers/multimap/modifiers/insert/22102.cc (test for excess errors) +UNRESOLVED: 23_containers/multimap/modifiers/insert/22102.cc compilation failed to produce executable +FAIL: 23_containers/multimap/modifiers/insert/4.cc (test for excess errors) +UNRESOLVED: 23_containers/multimap/modifiers/insert/4.cc compilation failed to produce executable +FAIL: 23_containers/multiset/allocator/swap.cc (test for excess errors) +UNRESOLVED: 23_containers/multiset/allocator/swap.cc compilation failed to produce executable +FAIL: 23_containers/set/allocator/swap.cc (test for excess errors) +UNRESOLVED: 23_containers/set/allocator/swap.cc compilation failed to produce executable +FAIL: 23_containers/unordered_map/insert/map_single_move-2.cc (test for excess errors) +UNRESOLVED: 23_containers/unordered_map/insert/map_single_move-2.cc compilation failed to produce executable +FAIL: 23_containers/unordered_map/modifiers/reserve.cc (test for excess errors) +UNRESOLVED: 23_containers/unordered_map/modifiers/reserve.cc compilation failed to produce executable +FAIL: 23_containers/vector/allocator/noexcept.cc (test for excess errors) +FAIL: 23_containers/vector/bool/allocator/noexcept.cc (test for excess errors) +FAIL: 25_algorithms/max/constexpr.cc (test for excess errors) +FAIL: 25_algorithms/min/constexpr.cc (test for excess errors) +FAIL: 26_numerics/random/cauchy_distribution/cons/default.cc (test for excess errors) +UNRESOLVED: 26_numerics/random/cauchy_distribution/cons/default.cc compilation failed to produce executable +FAIL: 26_numerics/random/extreme_value_distribution/cons/default.cc (test for excess errors) +UNRESOLVED: 26_numerics/random/extreme_value_distribution/cons/default.cc compilation failed to produce executable +FAIL: 26_numerics/random/normal_distribution/cons/default.cc (test for excess errors) +UNRESOLVED: 26_numerics/random/normal_distribution/cons/default.cc compilation failed to produce executable +FAIL: 26_numerics/random/student_t_distribution/cons/default.cc (test for excess errors) +UNRESOLVED: 26_numerics/random/student_t_distribution/cons/default.cc compilation failed to produce executable +FAIL: 28_regex/match_results/ctors/wchar_t/default.cc (test for excess errors) +UNRESOLVED: 28_regex/match_results/ctors/wchar_t/default.cc compilation failed to produce executable FAIL: 29_atomics/atomic_float/1.cc execution test +FAIL: 30_threads/thread/adl.cc (test for excess errors) +FAIL: experimental/net/buffer/traits.cc (test for excess errors) +FAIL: experimental/net/execution_context/make_service.cc (test for excess errors) FAIL: experimental/net/internet/resolver/ops/lookup.cc execution test +FAIL: experimental/optional/relops/2.cc (test for excess errors) +UNRESOLVED: experimental/optional/relops/2.cc compilation failed to produce executable +FAIL: experimental/optional/relops/3.cc (test for excess errors) +UNRESOLVED: experimental/optional/relops/3.cc compilation failed to produce executable +FAIL: ext/random/normal_mv_distribution/cons/default.cc (test for excess errors) +UNRESOLVED: ext/random/normal_mv_distribution/cons/default.cc compilation failed to produce executable === libstdc++ Summary === -# of expected passes 15192 -# of unexpected failures 2 +# of expected passes 15136 +# of unexpected failures 40 # of expected failures 98 +# of unresolved testcases 19 # of unsupported tests 334 -Compiler version: 11.0.0 20200831 (experimental) (GCC) +Compiler version: 11.0.0 20200901 (experimental) (GCC) Platform: i686-pc-linux-gnu The regressions ICEs are all PCH related, with ICEs like: FAIL: 20_util/bind/42593.cc (test for excess errors) Excess errors: /home/jakub/src/gcc/obj71/i686-pc-linux-gnu/libstdc++-v3/include/chrono:441: in 'constexpr' expansion of 'std::chrono::duration<long long int, std::ratio<1, 1000000000> >::_S_gcd(((intmax_t)std::ratio<1>::den), ((intmax_t)std::ratio<1, 1000000000>::den))' /home/jakub/src/gcc/obj71/i686-pc-linux-gnu/libstdc++-v3/include/chrono:442: internal compiler error: Segmentation fault 0x8dd035a crash_signal ../../gcc/toplev.c:327 0x86877b6 cxx_eval_call_expression ../../gcc/cp/constexpr.c:2622 0x8688782 cxx_eval_constant_expression ../../gcc/cp/constexpr.c:5765 0x868bcab cxx_eval_outermost_constant_expr ../../gcc/cp/constexpr.c:6772 0x86901c0 maybe_constant_value(tree_node*, tree_node*, bool) ../../gcc/cp/constexpr.c:7045 0x87195dc fold_for_warn(tree_node*) ../../gcc/cp/expr.c:418 It is PCH related and very hard to reproduce, after all, the same cc1plus doesn't crash always, but only sometimes. I've tracked it to what seems to be another occurrence of PR92458, this time on fundef_copies_table. This is a non-deletable non-cache hash_map<tree, tree> preserved across PCH, which means it is hashed when compiling the PCH header using pointer hashing of the decls, then PCH reassigns addresses to GC registered objects. When PCH is read, the hash_map will usually contain keys with different hash values compared to what it hashed originally, so there are chances that some fundef->decl isn't found. The ICE is because we don't find an entry for _S_gcd, so add a for now NULL value to that function, but the addition to the hash table results in later call not finding that NULL entry, but some other one from before PCH was saved, which results in very bad things for recursive constexpr calls.