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]

Re: MEM/u trouble


    > I don't see that.  What I see is an assignment
    > 
    > 	this = &m;
    > 
    > where the type of "this" is a pointer to the non-constant variant of
    > the type of M.  I don't see this as related to the TARGET_EXPR at all.

    You see a different assignment.
    I'll repeat the testcase, since I think it was sent just to you privately:

I'm talking about the smaller test case:

    struct J { int c; J(int j) : c(j) {} };
    struct K { int d; K(int k) : d(k) {} K(const J &l) : d(l.c) {} };
    J u();
    struct foo { K h; foo(const K m) : h(m) {} };
    foo *f;
    void bar() { f = new foo(u()); }

    There is no this = &m; assignment, there is this = &unnamed_temporary;
    assignment.

I should have been clearer: the &m is in the DECL_INITIAL of "this".


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