This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ PATCH] Re: gcc trunk rev. 127646 breaks bootstrap during stage 3


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)?

	Jakub

Attachment: G
Description: Text document

Attachment: G2
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]