Re: [PATCH] tree: Fix up try_catch_may_fallthru [PR112619]

2023-11-23 Thread Richard Biener
On Wed, 22 Nov 2023, Jakub Jelinek wrote: > On Wed, Nov 22, 2023 at 01:21:12PM +0100, Jakub Jelinek wrote: > > So, pedantically perhaps just assuming TRY_CATCH_EXPR where second argument > > is not STATEMENT_LIST to be the CATCH_EXPR/EH_FILTER_EXPR case could work > > for C++, but there are other

Re: [PATCH] tree: Fix up try_catch_may_fallthru [PR112619]

2023-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2023 at 01:21:12PM +0100, Jakub Jelinek wrote: > So, pedantically perhaps just assuming TRY_CATCH_EXPR where second argument > is not STATEMENT_LIST to be the CATCH_EXPR/EH_FILTER_EXPR case could work > for C++, but there are other FEs and it would be fragile (and weird, given >

Re: [PATCH] tree: Fix up try_catch_may_fallthru [PR112619]

2023-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2023 at 01:06:28PM +0100, Jakub Jelinek wrote: > Looking at a trivial example > void bar (); > void > foo (void) > { > try { bar (); } catch (int) {} > } > it seems it is even more complicated, because what e.g. the gimplification > sees is not TRY_CATCH_EXPR with CATCH_EXPR

Re: [PATCH] tree: Fix up try_catch_may_fallthru [PR112619]

2023-11-22 Thread Jakub Jelinek
On Wed, Nov 22, 2023 at 11:32:10AM +, Richard Biener wrote: > > hack in gcc 13 and triggered on hundreds of tests there within just 5 > > seconds of running make check-g++ -j32 (and in cases I looked at had nothing > > to do with the r14-5086 backports), so I believe this is just bad > >

Re: [PATCH] tree: Fix up try_catch_may_fallthru [PR112619]

2023-11-22 Thread Richard Biener
On Wed, 22 Nov 2023, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs with -std=c++98 since r14-5086 because > block_may_fallthru is called on a TRY_CATCH_EXPR whose second operand > is a MODIFY_EXPR rather than STATEMENT_LIST, which try_catch_may_fallthru > apparently expects. > I've

[PATCH] tree: Fix up try_catch_may_fallthru [PR112619]

2023-11-22 Thread Jakub Jelinek
Hi! The following testcase ICEs with -std=c++98 since r14-5086 because block_may_fallthru is called on a TRY_CATCH_EXPR whose second operand is a MODIFY_EXPR rather than STATEMENT_LIST, which try_catch_may_fallthru apparently expects. I've been wondering whether that isn't some kind of FE bug and