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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The old code in cp_emit_debug_info_for_using was buggy:
6566      /* FIXME: Handle TEMPLATE_DECLs.  */
6567      for (t = OVL_CURRENT (t); t; t = OVL_NEXT (t))
6568        if (TREE_CODE (t) != TEMPLATE_DECL)
That only ever looked at the first overload and not anything else, if it was
TEMPLATE_DECL, it didn't emit anything, otherwise it emitted debug info just
for the first overload and nothing else.  See the definitions:
#define OVL_CURRENT(NODE)       \
  ((TREE_CODE (NODE) == OVERLOAD) ? OVL_FUNCTION (NODE) : (NODE))
#define OVL_NEXT(NODE)          \
  ((TREE_CODE (NODE) == OVERLOAD) ? TREE_CHAIN (NODE) : NULL_TREE)
Normally, a walk over all overloads used to be done
  for (; t; t = OVL_NEXT (t))
    {
      tree fn = OVL_CURRENT (t);
      ...
    }

Reply via email to