From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B4B3B3858404; Tue, 23 Nov 2021 17:00:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B4B3B3858404 From: "johelegp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103339] [modules] ICE in exporting module on use of outside specialization Date: Tue, 23 Nov 2021 17:00:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: johelegp at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2021 17:00:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103339 --- Comment #1 from Johel Ernesto Guerrero Pe=C3=B1a --- In non-reduced code, I got the error from Bug 99861 which I solved with the workaround above: ``` hash table checking failed: equal operator returns true for a pair of values with a different hash value In module waarudo.numbers, imported at /home/johel/Documents/C++/Repos/waarudo/tests/test.waarudo.numbers.cpp:4: /home/johel/Documents/C++/Repos/waarudo/sources/waarudo.numbers.cpp: In substitution of =E2=80=98template using number_difference_t =3D ty= pename waarudo::number_difference@waarudo.numbers::type [with T =3D short unsigned int]=E2=80=99: /home/johel/Documents/C++/Repos/waarudo/sources/waarudo.numbers.cpp:57:24:= =20=20 required by substitution of =E2=80=98template requires scalar_qu= antity using x_component =3D waarudo::component@waarudo.geometries [wi= th Q =3D waarudo::pixels@waarudo.quantities]=E2=80=99 /home/johel/Documents/C++/Repos/waarudo/tests/test.waarudo.numbers.cpp:111:= 9:=20=20 required from =E2=80=98{anonymous}::test():::::: [with I =3D short unsigned int]=E2=80=99 /usr/include/boost/mp11/algorithm.hpp:1039:29: required from =E2=80=98con= stexpr F boost::mp11::detail::mp_for_each_impl(boost::mp11::mp_list, F&&) [wi= th T =3D {unsigned char, short unsigned int}; F =3D {anonymous}::test()::::::]=E2= =80=99 /usr/include/boost/mp11/algorithm.hpp:1072:36: required from =E2=80=98con= stexpr F boost::mp11::mp_for_each(F&&) [with L =3D boost::mp11::mp_list; F =3D {anonymous}::test()::::::]=E2=80=99 /home/johel/Documents/C++/Repos/waarudo/tests/test.waarudo.numbers.cpp:110:= 58:=20 required from here /home/johel/Documents/C++/Repos/waarudo/sources/waarudo.numbers.cpp:25:32: internal compiler error: in hashtab_chk_error, at hash-table.c:137 25 | export template using number_difference_t =3D typename number_difference::type; | ^~~~~~~~~~~~~~~~~~~ 0x20f297d internal_error(char const*, ...) ???:0 0x97de46 fancy_abort(char const*, int, char const*) ???:0 0x97dc52 hashtab_chk_error() ???:0 0x9eb38e hash_table::verify(tree_node* con= st&, unsigned int) ???:0 0x9ea2c8 constraints_satisfied_p(tree_node*, tree_node*) ???:0 0xb8a0ec most_specialized_partial_spec(tree_node*, int) ???:0 0xba6a27 instantiate_class_template(tree_node*) ???:0 0xbf7c74 complete_type_or_maybe_complain(tree_node*, tree_node*, int) ???:0 0xb8d16a tsubst(tree_node*, tree_node*, int, tree_node*) ???:0 0xb8be48 tsubst(tree_node*, tree_node*, int, tree_node*) ???:0 0x9ea286 tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*) ???:0 0x9ea2c8 constraints_satisfied_p(tree_node*, tree_node*) ???:0 0xb8bfba tsubst(tree_node*, tree_node*, int, tree_node*) ???:0 0xb8e487 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) ???:0 0xb8e8df tsubst_argument_pack(tree_node*, tree_node*, int, tree_node*) ???:0 0xb8e664 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) ???:0 0xb8e487 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) ???:0 0xb8e8df tsubst_argument_pack(tree_node*, tree_node*, int, tree_node*) ???:0 0xb8e664 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) ???:0 0xb8e487 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) ???:0 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. ``` Workaround: ```C++ template using workaround_gcc_bug_103339 =3D std::type_identity_t<= T>; export template using number_representation_t =3D typename number_representation>::type; ```=