https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100134

Sandipan Mohanty <sandipan.mohanty at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sandipan.mohanty at gmail dot 
com

--- Comment #2 from Sandipan Mohanty <sandipan.mohanty at gmail dot com> ---
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 2022)
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 <vector>;
export module SomeModule;

struct SomeClass {
    using iterator = std::vector<int>::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=c++20 -fmodules-ts -xc++-system-header vector
$ g++ -std=c++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 this
specific ICE.

(iv) Replacing the container with std::map<int, int> still has the same error,
but std::unordered_map<int, int> does not! With an unordered_set, one can get
further and create objects in the module.

Reply via email to