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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |16.0
                 CC|                            |ppalka at gcc dot gnu.org
            Summary|[13/14/15/16 Regression]    |[13/14/15 Regression]
                   |internal compiler error:    |internal compiler error:
                   |tree check: accessed elt 1  |tree check: accessed elt 1
                   |of 'tree_vec' with -1 elts  |of 'tree_vec' with -1 elts
                   |in add_to_template_args, at |in add_to_template_args, at
                   |cp/pt.cc:612                |cp/pt.cc:612
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot 
gnu.org

--- Comment #11 from Patrick Palka <ppalka at gcc dot gnu.org> ---
This is incidentally fixed for GCC 16 by r16-7491 "c++: constrained auto NTTP
vs associated constraints".  Working on a more narrow fix for the release
branches...

As mentioned in one of the dups, a workaround is to replace the constrained
auto NTTP with a requires-clause:

-        template <car auto c>
+        template <auto c> requires car<decltype(c)>

Reply via email to