This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR c++/17972
- From: Jason Merrill <jason at redhat dot com>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 21 Mar 2005 11:06:28 -0500
- Subject: Re: [PATCH] Fix PR c++/17972
- References: <200503090851.55785.ebotcazou@libertysurf.fr>
On Wed, 9 Mar 2005 08:54:08 +0100, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
> When the C++ FE converts the decrement expression to the 3-operand form, it
> first stabilizes the lhs; however, since the function is marked as 'const',
> the stabilization is a no-op so the CALL_EXPR ends up being referenced twice
> in the expression. Later, when the tree inliner kicks in, it inlines the
> unique CALL_EXPR. When the enclosing expression is expanded to RTL, the
> inlined body is expanded twice and all hell breaks loose since the RETURN of
> the second block points to the return label of the first block.
Hmm, wait...inlining happens after gimplification, yes? The gimplification
process should have unshared the CALL_EXPR in one of the two calls to
unshare_all_trees, so we should have had two CALL_EXPRs, not one shared
one.
Jason