https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125123
Bug ID: 125123
Summary: mangler issue with 'template for' and 'requires expr'
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nurullahcitil1536 at gmail dot com
Target Milestone: ---
Compilation failure when a template for is used within a function with requires
expression. It doesn't matter what is the content of requires expr, compilation
always fails with mangler issues: https://godbolt.org/z/7ef94vz6W
I think the problem was introduced recently, at most 1-2 months.
------------------------------------------------
template<typename OTHER>
void Func(const OTHER& other) requires(std::is_integral_v<OTHER>)
{
template for(constexpr int I : std::views::iota(0, 5))
{ ... }
}
------------------------------------------------
error: mangling of 'constexpr const std::ranges::iota_view<int, int>::_Iterator
__for_iter ' as '_ZZ4FuncIiEvRKT_Q13is_integral_vIS0_EE11__for_iter ' conflicts
with a previous mangle