https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125555
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Last reconfirmed| |2026-06-28
Summary|error: mangling of ... |[16/17 Regression] error:
|conflicts with a previous |mangling of ... conflicts
|mangle [import std] |with a previous mangle
| |[import std]
Target Milestone|--- |16.2
CC| |ppalka at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
The original testcase started failing with r16-1911 "libstdc++: Use hidden
friends for __normal_iterator operators". The following reduced testcase never
worked:
$ cat 125555_a.H
template<typename _Tp>
struct __normal_iterator {
template <typename _Iter>
friend bool operator==(__normal_iterator, _Iter) { return true; }
};
template <typename _Up>
void foo() {
__normal_iterator<int> it;
it == it;
}
$ cat 125555_b.C
import "125555_a.H";
void test() {
__normal_iterator<int> it;
it == it;
foo<void>();
}
$ g++ -fmodules 125555_{a.H,b.C}
In module 125555_a.H, imported at 125555_b.C:1:
125555_a.H: In instantiation of ‘void foo() [with _Up = void]’:
125555_b.C:6:12: required from here
6 | foo<void>();
| ~~~~~~~~~^~
125555_a.H:10:6: internal compiler error: in instantiate_decl, at
cp/pt.cc:28979
10 | it == it;
| ~~~^~~~~
...