This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix tree-opt/33589 out of SSA not cleaning up eh info for statements
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Andrew Pinski" <pinskia at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 28 Oct 2007 13:55:10 +0100
- Subject: Re: [PATCH] Fix tree-opt/33589 out of SSA not cleaning up eh info for statements
- References: <de8d50360710280540s173e63datf236893696932dd9@mail.gmail.com>
On 10/28/07, Andrew Pinski <pinskia@gmail.com> wrote:
> Hi,
> The problem here is that out of SSA (via TER) replaces the function
> expression inside a CALL_EXPR with a nothrowing function. So we go
> from a possible throwing call to a call which is known not to throw.
> But Out of SSA does not call maybe_clean_or_replace_eh_stmt to make
> sure the eh information is updated so we get an ICE.
>
> This fixes the problem by calling maybe_clean_or_replace_eh_stmt if
> the expression changed. We may as well also call
> tree_purge_dead_eh_edges if maybe_clean_or_replace_eh_stmt returns
> true also to cleanup the dead edges now instead of during
> final_cleanup.
>
> OK? Bootstrapped and tested on i386-apple-darwin8.10.1.
Ok.
Thanks,
Richard.
> :ADDPATCH tree-opt:
>
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * tree-outof-ssa.c (rewrite_trees): If the statement changed, cleanup
> the eh information on the statement.
>
>
> * testsuite/g++.dg/torture/pr33589-1.C: New testcase.
> * testsuite/g++.dg/torture/pr33589-2.C: New testcase.
>
>