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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-03-19
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Is there something to optimize when foo() cannot be tail-called?  IMO that
would be best done separately.  Consider

int foo();

int test() {
    try {
        return foo() + 1;
    } catch (...) {
        throw;
    }
}

wouldn't it be valid to turn this into

int test() {
  return foo () + 1;
}

so the requirement is that the try {} catch (...) { throw; } is the
outermost EH handling region, nothing more?  And then we can elide it?

Reply via email to