From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E8F5E3858029; Fri, 11 Feb 2022 15:00:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8F5E3858029 From: "egor.pugin at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjKysvMTA0NTAzXSBOZXc6IFsxMiByZWdyZXNzaW9uXVtt?= =?UTF-8?B?b2R1bGVzXSBiaXRzL3NoYXJlZF9wdHJfYmFzZS5oOiBlcnJvcjogbXVzdCA=?= =?UTF-8?B?4oCYI2luY2x1ZGUgPHR5cGVpbmZvPuKAmSBiZWZvcmUgdXNpbmcg4oCYdHlw?= =?UTF-8?B?ZWlk4oCZ?= Date: Fri, 11 Feb 2022 15:00:55 +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: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: egor.pugin 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, 11 Feb 2022 15:00:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104503 Bug ID: 104503 Summary: [12 regression][modules] bits/shared_ptr_base.h: error: must =E2=80=98#include =E2=80=99 befor= e using =E2=80=98typeid=E2=80=99 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: egor.pugin at gmail dot com Target Milestone: --- 11.2.1 works fine. #include is present in include/c++/12.0.1/bits/shared_ptr_base.h Repro: cat << EOF > 1.cpp export module m; import ; EOF cat << EOF > 2.cpp import m; int main(){} EOF g++ -std=3Dc++23 -fmodules-ts -x c++-system-header bits/stdc++.h g++ -std=3Dc++23 -fmodules-ts -c 1.cpp g++ -std=3Dc++23 -fmodules-ts -c 2.cpp Error: In file included from /home/egor/dev/gcc/build_debug/install/include/c++/12.0.1/bits/shared_ptr.h= :53, from /home/egor/dev/gcc/build_debug/install/include/c++/12.0.1/memory:77, from /home/egor/dev/gcc/build_debug/install/include/c++/12.0.1/x86_64-pc-linux-g= nu/bits/stdc++.h:82, of module /home/egor/dev/gcc/build_debug/install/include/c++/12.0.1/x86_64-pc-linux-g= nu/bits/stdc++.h, imported at 1.cpp:2, of module m, imported at 2.cpp:1: /home/egor/dev/gcc/build_debug/install/include/c++/12.0.1/bits/shared_ptr_b= ase.h: In instantiation of =E2=80=98void* std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_get_deleter(const std::type_info&) [with _Tp =3D std::mutex; _Allo= c =3D std::allocator; __gnu_cxx::_Lock_policy _Lp =3D __gnu_cxx::_S_atomic]= =E2=80=99: /home/egor/dev/gcc/build_debug/install/include/c++/12.0.1/bits/shared_ptr_b= ase.h:631:7: required from here /home/egor/dev/gcc/build_debug/install/include/c++/12.0.1/bits/shared_ptr_b= ase.h:641:21: error: must =E2=80=98#include =E2=80=99 before using =E2=80=98typ= eid=E2=80=99 62 | #include +++ |+#include 63 | #if __cplusplus >=3D 202002L ...... 641 | __ti =3D=3D typeid(_Sp_make_shared_tag) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/egor/dev/gcc/build_debug/install/include/c++/12.0.1/bits/shared_ptr_b= ase.h: In instantiation of =E2=80=98void* std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_get_deleter(const std::type_info&) [with _Tp =3D std::__future_base::_State_baseV2; _Alloc =3D std::allocator; __gnu_cxx::_Lock_policy _Lp =3D __gnu_cxx::_S_atomic]=E2=80=99: /home/egor/dev/gcc/build_debug/install/include/c++/12.0.1/bits/shared_ptr_b= ase.h:631:7: required from here /home/egor/dev/gcc/build_debug/install/include/c++/12.0.1/bits/shared_ptr_b= ase.h:641:21: error: must =E2=80=98#include =E2=80=99 before using =E2=80=98typ= eid=E2=80=99 Build: Using built-in specs. COLLECT_GCC=3D/home/egor/dev/gcc/build_debug/install/bin/g++ COLLECT_LTO_WRAPPER=3D/home/egor/dev/gcc/build_debug/install/libexec/gcc/x8= 6_64-pc-linux-gnu/12.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../configure --disable-multilib --disable-bootstrap --prefix=3D/home/egor/dev/gcc/build_debug/install --disable-libsanitizer --disable-gcov --disable-libgomp --disable-libquadmath --disable-libssp --enable-languages=3Dc,c++ Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.1 20220211 (experimental) (GCC)=