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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Target Milestone|---                         |16.2
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
   Last reconfirmed|                            |2026-05-25
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
struct A
{
  int a[2];
  constexpr int const *begin () const { return a; }
  constexpr int const *end () const { return a + 2; }
};

template <typename T>
requires true
void
foo ()
{
  template for (constexpr int i : A { 0, 1 })
    ;
  template for (constexpr int i : A { 0, 1 })
    ;
}
template void foo <void> ();

rejects even duplicate mangling of "__for_begin ", not just "__for_iter ".
The reason is that discriminators aren't tracked for DECL_ARTIFICIAL vars.

Reply via email to