From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8CD3B385800C; Fri, 12 Mar 2021 23:13:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CD3B385800C From: "ryan.burn at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99568] New: ICE when compiling basic module: internal compiler error: in module_may_redeclare, at cp/module.cc:18453 Date: Fri, 12 Mar 2021 23:13:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ryan.burn 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Fri, 12 Mar 2021 23:13:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99568 Bug ID: 99568 Summary: ICE when compiling basic module: internal compiler error: in module_may_redeclare, at cp/module.cc:18453 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ryan.burn at gmail dot com Target Milestone: --- Here's how to reproduce /// say_hello.cc module; #include #include export module Hello; // the module purview starts here // provide a function to users by exporting it export void SayHello (std::string_view const &name) { std::cout << "Hello " << name << "!\n"; } /// main.cc import Hello; #include int main() { SayHello("world"); return 0; } If I compile with g++ -fmodules-ts -std=3Dc++20 -c say_hello.cc g++ -fmodules-ts -std=3Dc++20 -c main.cc I get the ICE below. This is my gcc version root@15a43977d8e1:/hello-world# g++ --version g++ (GCC) 11.0.1 20210311 (experimental) Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. root@15a43977d8e1:/hello-world# g++ -fmodules-ts -std=3Dc++20 -c main.cc In file included from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:61, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/bits/cpp_type_traits.h:429:7: error: template definition of non-template 'enum std::__is_nonvolatile_trivially_copyable<_Tp>::' 429 | enum { __value =3D __is_trivially_copyable(_Tp) }; | ^~~~ /usr/local/include/c++/11.0.1/bits/cpp_type_traits.h:436:12: error: redefinition of 'struct std::__is_nonvolatile_trivially_copyable' 436 | struct __is_nonvolatile_trivially_copyable | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:61, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/ios:40, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/bits/cpp_type_traits.h:436:12: note: previous definition of 'struct std::__is_nonvolatile_trivially_copyable' 436 | struct __is_nonvolatile_trivially_copyable | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:63, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/ext/numeric_traits.h:159:41: error: template definition of non-template 'const int __gnu_cxx::__numeric_traits_floating<_Value>::__max_digits10' 159 | static const int __max_digits10 =3D __glibcxx_max_digits10(_V= alue); | ^~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/c++/11.0.1/ext/numeric_traits.h:162:39: error: template definition of non-template 'const bool __gnu_cxx::__numeric_traits_floating<_Value>::__is_signed' 162 | static const bool __is_signed =3D true; | ^~~~ /usr/local/include/c++/11.0.1/ext/numeric_traits.h:163:37: error: template definition of non-template 'const int __gnu_cxx::__numeric_traits_floating<_Value>::__digits10' 163 | static const int __digits10 =3D __glibcxx_digits10(_Value); | ^~~~~~~~~~~~~~~~~~ /usr/local/include/c++/11.0.1/ext/numeric_traits.h:164:43: error: template definition of non-template 'const int __gnu_cxx::__numeric_traits_floating<_Value>::__max_exponent10' 164 | static const int __max_exponent10 =3D __glibcxx_max_exponent10(_Value); | ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/nested_exception.h= :40, from /usr/local/include/c++/11.0.1/exception:148, from /usr/local/include/c++/11.0.1/ios:39, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/type_traits:231:11: error: conflicting global module declaration 'template using __remove_cv_t =3D typename std::remove_cv@Hello::type' 231 | using __remove_cv_t =3D typename remove_cv<_Tp>::type; | ^~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/stl_pair.h:59, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/type_traits:231:11: note: existing declaration 'template using __remove_cv_t =3D typename std::remove_cv::type' 231 | using __remove_cv_t =3D typename remove_cv<_Tp>::type; | ^~~~~~~~~~~~~ /usr/local/include/c++/11.0.1/type_traits:249:45: note: during load of pend= ings for 'std::__remove_cv_t' 249 | : public __is_void_helper<__remove_cv_t<_Tp>>::type | ^~~ /usr/local/include/c++/11.0.1/type_traits:820:40: error: template definitio= n of non-template 'typedef decltype (__test<_Tp>(0)) std::__is_destructible_impl<_Tp>::type' 820 | typedef decltype(__test<_Tp>(0)) type; | ^~~~ /usr/local/include/c++/11.0.1/type_traits:871:40: error: template definitio= n of non-template 'typedef decltype (__test<_Tp>(0)) std::__is_nt_destructible_impl<_Tp>::type' 871 | typedef decltype(__test<_Tp>(0)) type; | ^~~~ /usr/local/include/c++/11.0.1/type_traits:1102:12: error: redefinition of 'struct std::__is_nt_copy_assignable_impl<_Tp, false>' 1102 | struct __is_nt_copy_assignable_impl<_Tp, false> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/nested_exception.h= :40, from /usr/local/include/c++/11.0.1/exception:148, from /usr/local/include/c++/11.0.1/ios:39, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/type_traits:1102:12: note: previous definitio= n of 'struct std::__is_nt_copy_assignable_impl<_Tp, false>' 1102 | struct __is_nt_copy_assignable_impl<_Tp, false> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/stl_pair.h:59, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/type_traits:1106:12: error: redefinition of 'struct std::__is_nt_copy_assignable_impl<_Tp, true>' 1106 | struct __is_nt_copy_assignable_impl<_Tp, true> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/nested_exception.h= :40, from /usr/local/include/c++/11.0.1/exception:148, from /usr/local/include/c++/11.0.1/ios:39, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/type_traits:1106:12: note: previous definitio= n of 'struct std::__is_nt_copy_assignable_impl<_Tp, true>' 1106 | struct __is_nt_copy_assignable_impl<_Tp, true> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/stl_pair.h:59, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/type_traits:1566:21: error: default argument = for template parameter for class enclosing 'std::__add_lvalue_reference_helper<= _Tp, >::type' 1566 | { typedef _Tp type; }; | ^~~~ /usr/local/include/c++/11.0.1/type_traits:1566:21: error: template definiti= on of non-template 'typedef _Tp std::__add_lvalue_reference_helper<_Tp, >::type' /usr/local/include/c++/11.0.1/type_traits:1569:12: error: redefinition of 'struct std::__add_lvalue_reference_helper<_Tp, true>' 1569 | struct __add_lvalue_reference_helper<_Tp, true> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/nested_exception.h= :40, from /usr/local/include/c++/11.0.1/exception:148, from /usr/local/include/c++/11.0.1/ios:39, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/type_traits:1569:12: note: previous definitio= n of 'struct std::__add_lvalue_reference_helper<_Tp, true>' 1569 | struct __add_lvalue_reference_helper<_Tp, true> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/stl_pair.h:59, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/type_traits:1575:47: error: wrong number of template arguments (1, should be 2) 1575 | : public __add_lvalue_reference_helper<_Tp> | ^ /usr/local/include/c++/11.0.1/type_traits:1565:12: note: provided for 'template > struct std::__add_lvalue_reference_helper' 1565 | struct __add_lvalue_reference_helper | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/c++/11.0.1/type_traits:1945:12: error: redefinition of 'struct std::remove_all_extents< >' 1945 | struct remove_all_extents | ^~~~~~~~~~~~~~~~~~ /usr/local/include/c++/11.0.1/type_traits:790:12: note: previous definition= of 'struct std::remove_all_extents< >' 790 | struct remove_all_extents; | ^~~~~~~~~~~~~~~~~~ /usr/local/include/c++/11.0.1/type_traits:1949:12: error: redefinition of 'struct std::remove_all_extents<_Tp [_Size]>' 1949 | struct remove_all_extents<_Tp[_Size]> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/nested_exception.h= :40, from /usr/local/include/c++/11.0.1/exception:148, from /usr/local/include/c++/11.0.1/ios:39, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/type_traits:1949:12: note: previous definitio= n of 'struct std::remove_all_extents<_Tp [_Size]>' 1949 | struct remove_all_extents<_Tp[_Size]> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/stl_pair.h:59, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/type_traits:1953:12: error: redefinition of 'struct std::remove_all_extents<_Tp []>' 1953 | struct remove_all_extents<_Tp[]> | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/nested_exception.h= :40, from /usr/local/include/c++/11.0.1/exception:148, from /usr/local/include/c++/11.0.1/ios:39, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/type_traits:1953:12: note: previous definitio= n of 'struct std::remove_all_extents<_Tp []>' 1953 | struct remove_all_extents<_Tp[]> | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/c++/11.0.1/type_traits:2170:11: error: conflicting global module declaration 'template using __remove_cvref_t =3D typename std::remove_cv@Hello::type>::type' 2170 | using __remove_cvref_t | ^~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/stl_pair.h:59, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/type_traits:2170:11: note: existing declarati= on 'template using __remove_cvref_t =3D typename std::remove_cv::type>::type' 2170 | using __remove_cvref_t | ^~~~~~~~~~~~~~~~ /usr/local/include/c++/11.0.1/type_traits:2195:77: note: during load of pendings for 'std::__remove_cvref_t' 2195 | static __success_type<__remove_cvref_t<__cond_t>> |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ^~ /usr/local/include/c++/11.0.1/type_traits:2401:12: error: redefinition of 'struct std::__result_of_memobj<_Res _Class::*, _Arg>' 2401 | struct __result_of_memobj<_Res _Class::*, _Arg> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/nested_exception.h= :40, from /usr/local/include/c++/11.0.1/exception:148, from /usr/local/include/c++/11.0.1/ios:39, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/type_traits:2401:12: note: previous definitio= n of 'struct std::__result_of_memobj<_Res _Class::*, _Arg>' 2401 | struct __result_of_memobj<_Res _Class::*, _Arg> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/stl_pair.h:59, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/type_traits:2416:12: error: redefinition of 'struct std::__result_of_memfun<_Res _Class::*, _Arg, _Args ...>' 2416 | struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/nested_exception.h= :40, from /usr/local/include/c++/11.0.1/exception:148, from /usr/local/include/c++/11.0.1/ios:39, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/type_traits:2416:12: note: previous definitio= n of 'struct std::__result_of_memfun<_Res _Class::*, _Arg, _Args ...>' 2416 | struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/c++/11.0.1/type_traits:3292:11: error: conflicting global module declaration 'template using __copy_cv =3D ty= pename std::__match_cv_qualifiers@Hello<_From, _To>::__type' 3292 | using __copy_cv =3D typename __match_cv_qualifiers<_From, _To>::__type; | ^~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/stl_pair.h:59, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/type_traits:3292:11: note: existing declarati= on 'template using __copy_cv =3D typename std::__match_cv_qualifiers<_From, _To>::__type' 3292 | using __copy_cv =3D typename __match_cv_qualifiers<_From, _To>::__type; | ^~~~~~~~~ /usr/local/include/c++/11.0.1/type_traits:3309:45: note: during load of pendings for 'std::__copy_cv' 3309 | __void_t<__cond_res<__copy_cv<_Xp, _Yp>&, __copy_cv<_Yp, _Xp>= &>>> | ^ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/nested_exception.h= :40, from /usr/local/include/c++/11.0.1/exception:148, from /usr/local/include/c++/11.0.1/ios:39, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/type_traits:3357:11: error: conflicting global module declaration 'template using __basic_common_r= ef =3D typename std::basic_common_reference::type>::type, typename std::remove_cv@Hello::type>::typ= e, std::__xref@Hello<_Tp>::template __type, std::__xref@Hello<_Tp2>::template __type>::type' 3357 | using __basic_common_ref | ^~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/stl_pair.h:59, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/type_traits:3357:11: note: existing declarati= on 'template using __basic_common_ref =3D typename std::basic_common_reference::type>::type, typename std::remove_cv::type>::type, std::__xref<_Tp>::template __type, std::__xref<_Tp2>::template __type>::type' 3357 | using __basic_common_ref | ^~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/nested_exception.h= :40, from /usr/local/include/c++/11.0.1/exception:148, from /usr/local/include/c++/11.0.1/ios:39, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/type_traits:2522:11: error: conflicting global module declaration 'template using common_type_t =3D typename std::common_type@Hello::type' 2522 | using common_type_t =3D typename common_type<_Tp...>::type; | ^~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/stl_pair.h:59, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/type_traits:2522:11: note: existing declarati= on 'template using common_type_t =3D typename std::common_type:= :type' 2522 | using common_type_t =3D typename common_type<_Tp...>::type; | ^~~~~~~~~~~~~ /usr/local/include/c++/11.0.1/type_traits:3381:54: note: during load of pendings for 'std::__common_reference_impl' 3381 | : __common_reference_impl<_Tp1, _Tp2, _Bullet + 1> | ^ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/nested_exception.h= :40, from /usr/local/include/c++/11.0.1/exception:148, from /usr/local/include/c++/11.0.1/ios:39, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/type_traits:3367:11: error: conflicting global module declaration 'template using common_reference_t =3D ty= pename std::common_reference@Hello::type' 3367 | using common_reference_t =3D typename common_reference<_Tp...>:= :type; | ^~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/move.h:57, from /usr/local/include/c++/11.0.1/bits/stl_pair.h:59, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/type_traits:3367:11: note: existing declarati= on 'template using common_reference_t =3D typename std::common_reference::type' 3367 | using common_reference_t =3D typename common_reference<_Tp...>:= :type; | ^~~~~~~~~~~~~~~~~~ /usr/local/include/c++/11.0.1/type_traits:3445:63: note: during load of pendings for 'std::common_reference_t' 3445 | void_t= >> | ^~~~ In file included from /usr/local/include/c++/11.0.1/bits/stl_pair.h:65, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/ios:40, from /usr/local/include/c++/11.0.1/ostream:38, from /usr/local/include/c++/11.0.1/iostream:39, from say_hello.cc:4, of module Hello, imported at main.cc:2: /usr/local/include/c++/11.0.1/compare:405:11: error: conflicting global mod= ule declaration 'template using common_comparison_category_t =3D typename std::common_comparison_category@Hello::type' 405 | using common_comparison_category_t | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/include/c++/11.0.1/bits/stl_pair.h:65, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:64, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/compare:405:11: note: existing declaration 'template using common_comparison_category_t =3D typename std::common_comparison_category::type' 405 | using common_comparison_category_t | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/c++/11.0.1/compare:413:57: note: during load of pendings= for 'std::common_comparison_category_t' 413 | =3D same_as, _Cat>; | ^ In file included from /usr/local/include/c++/11.0.1/bits/stl_iterator.h:82, from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:67, from /usr/local/include/c++/11.0.1/bits/char_traits.h:39, from /usr/local/include/c++/11.0.1/string_view:41, from main.cc:4: /usr/local/include/c++/11.0.1/new:89:27: internal compiler error: in module_may_redeclare, at cp/module.cc:18453 89 | enum class align_val_t: size_t {}; | ^~~~~~ 0x69ca74 module_may_redeclare(tree_node*) ../../gcc/cp/module.cc:18453 0x981c01 start_enum(tree_node*, tree_node*, tree_node*, tree_node*, bool, bool*) ../../gcc/cp/decl.c:15662 0xa63c27 cp_parser_enum_specifier ../../gcc/cp/parser.c:19975 0xa63c27 cp_parser_type_specifier ../../gcc/cp/parser.c:18401 0xa64919 cp_parser_decl_specifier_seq ../../gcc/cp/parser.c:15051 0xa656f1 cp_parser_simple_declaration ../../gcc/cp/parser.c:14308 0xa923c5 cp_parser_declaration ../../gcc/cp/parser.c:14126 0xa91cf9 cp_parser_toplevel_declaration ../../gcc/cp/parser.c:14155 0xa91cf9 cp_parser_declaration_seq_opt ../../gcc/cp/parser.c:13943 0xa92192 cp_parser_namespace_body ../../gcc/cp/parser.c:20443 0xa92192 cp_parser_namespace_definition ../../gcc/cp/parser.c:20421 0xa928e8 cp_parser_declaration ../../gcc/cp/parser.c:14106 0xa91cf9 cp_parser_toplevel_declaration ../../gcc/cp/parser.c:14155 0xa91cf9 cp_parser_declaration_seq_opt ../../gcc/cp/parser.c:13943 0xa93675 cp_parser_linkage_specification ../../gcc/cp/parser.c:15319 0xa924da cp_parser_declaration ../../gcc/cp/parser.c:14045 0xa9313c cp_parser_toplevel_declaration ../../gcc/cp/parser.c:14155 0xa9313c cp_parser_translation_unit ../../gcc/cp/parser.c:4940 0xa9313c c_parse_file() ../../gcc/cp/parser.c:45241 0xbb6e7d c_common_parse_file() ../../gcc/c-family/c-opts.c:1218 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=