blob: 7001f5a7b52e3f7e68c6bfae82f57315f10024a4 [file] [log] [blame]
// { dg-do run }
// { dg-additional-options -fstrong-eval-order=all }
struct A
{
virtual A& operator=(const A&) { return *this; }
};
int i;
A& f() { if (i != 1) __builtin_abort (); i = 2; static A a; return a; }
A& g() { if (i != 0) __builtin_abort (); i = 1; static A a; return a; }
int main()
{
f() = g();
if (i != 2) __builtin_abort ();
}