[PATCH] Fix PR c++/17972

Andrew Pinski pinskia@physics.uc.edu
Mon Mar 21 16:34:00 GMT 2005


On Mar 21, 2005, at 11:06 AM, Jason Merrill wrote:

> 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.

But this is for 3.4 which does not include gimplification at all.
-- Pinski



More information about the Gcc-patches mailing list