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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>Calling `foo` with reference to local should not prevent tail calling `cont` 
>in this case

WRONG.

foo could store the local reference variable into a global pointer.

E.g.
static const int *a;
void foo(const int &b) noexcept
{
  a = &b;
}

void cont(void)
{
  printf(*a);
}

You can't do tail call as the argument variable escapes.

Reply via email to