URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr19317-2.C] - Rev 318
Go to most recent revision | Compare with Previous | Blame | View Log
// PR c++/19317
// { dg-options "-O2" }
// { dg-do run }
extern "C" void abort (void);
struct A
{
A () { d = e = 0; f = -1; }
A (int x) : d (0), e (0), f (x) { }
A b () const;
int d;
int e;
int f;
};
A
A::b () const
{
A t;
t.f = 10 + this->f;
return t;
}
int
main ()
{
A a (100);
a = a.b ();
if (a.f != 110)
abort ();
}
Go to most recent revision | Compare with Previous | Blame | View Log