blob: fc83b1b56f5a14610d882d7c1e47590a7dcb6506 [file] [log] [blame]
// { dg-do run { target c++11 } }
// Contributed by Sylvain Pion
static int rvalue_constructions = 0;
struct A {
A () { }
A (const A&) { }
A (A&&) { ++rvalue_constructions; }
~A () { }
};
A f() { return A(); }
extern "C" {
void abort(void);
}
int main()
{
A c = f();
if (rvalue_constructions != 0)
abort();
}