This is the mail archive of the gcc-bugs@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]

[Bug middle-end/82899] *this in constructors could not alias with reference input parameters of the same type


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82899

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |alias, missed-optimization
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Would it be valid to make 'this' __restrict?  Is it valid to do

struct X { int i; };
struct Y : X { Y(Y *); int k; };

Y::Y(Y *x)
{
  k = x->i;
}

int main()
{
  Y y(&y);
}

?  That is, access members of the base class which should be initialized
already?
This would mean using __restrict isn't valid.

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