This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Re: gcc trunk rev. 127646 breaks bootstrap during stage 3
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jakub Jelinek" <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 21 Aug 2007 14:14:41 +0200
- Subject: Re: [C++ PATCH] Re: gcc trunk rev. 127646 breaks bootstrap during stage 3
- References: <Pine.LNX.4.64.0708201608170.6500@veith-web.com> <de8d50360708200723v9a63a6dtf265fd2da5f593b3@mail.gmail.com> <de8d50360708200726y1ba8eca2pd46de40bdbf966ab@mail.gmail.com> <20070820163316.GY2063@devserv.devel.redhat.com>
On 8/20/07, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Aug 20, 2007 at 07:26:02AM -0700, Andrew Pinski wrote:
> > > The statement which we are gimplifying:
> > > <<<change_dynamic_type (struct __recursive_mutex *) &fake_mutex)>>>
> > >
> > > 5887 case CHANGE_DYNAMIC_TYPE_EXPR:
> > > 5888 ret = gimplify_expr (&CHANGE_DYNAMIC_TYPE_LOCATION (*expr_p),
> > > 5889 pre_p, post_p, is_gimple_reg, fb_lvalue);
> > >
> > >
> > > So why fb_lvalue?
> >
> > Actually this is correct, we need a decl here as we need to mark that
> > for pointing to anything. Jakub, how did you test your patch again?
>
> I'm sorry, I bet I forgot to make in libstdc++-v3 this time, only tested
> make -C check-g++ and make -C x86_64*/libstdc++-v3.
>
> The problem is that save_expr on constant arg (which &fake_mutex is)
> does nothing at all and we really need the SAVE_EXPR around, so that
> during gimplification a temporary is created (but we can't create it
> right away in the FE, it must be initialized in the correct spot).
>
> Attached are two possible fixes, one is to force creation of SAVE_EXPR
> when it wasn't added by save_expr, the other one is to use a TARGET_EXPR
> instead (force creation thereof).
> I have briefly tested the former, the latter was tested with make
> in libstdc++-v3, make check-g++ and make check in libstdc++-v3.
>
> Ok for trunk (which one)?
I think the target expr one is better though I cannot approve the patch.
Richard.