From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C25B03858C20; Thu, 10 Mar 2022 14:49:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C25B03858C20 From: "sandipan.mohanty at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100134] [modules] ICE when using a vector in a module Date: Thu, 10 Mar 2022 14:49:35 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sandipan.mohanty 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: cc 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: Thu, 10 Mar 2022 14:49:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100134 Sandipan Mohanty changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sandipan.mohanty at gmail = dot com --- Comment #2 from Sandipan Mohanty --- I was about to report something very similar, so I will add my observations= to this report: (i) I have reproduced this after pulling and rebuilding today (10 March 202= 2) from gcc git repository. The commit id for my testing version is 3357878ef56d1e47666fc697cfd7cb5cd9c1dfc9. (ii) The ICE happens even if you don't create a vector instance: // minimal code to reproduce module; import ; export module SomeModule; struct SomeClass { using iterator =3D std::vector::iterator; }; // end code Compilation steps are as in the original report. In order to avoid possible interference from other header units, I performed each of my tests by first removing gcm.cache/. $ rm -rf gcm.cache $ g++ -std=3Dc++20 -fmodules-ts -xc++-system-header vector $ g++ -std=3Dc++20 -fmodules-ts -c module_ICE_1.cc -freport-bug (iii) One can change vector to deque, list, forward_list or a set, and still have the same error. Changing the container to std::array does not cause th= is specific ICE. (iv) Replacing the container with std::map still has the same err= or, but std::unordered_map does not! With an unordered_set, one can g= et further and create objects in the module.=