Skip to content
Snippets Groups Projects
Commit cc072316 authored by Jason Merrill's avatar Jason Merrill
Browse files

also test with inlining

From-SVN: r48984
parent 4ffbff59
No related branches found
No related tags found
No related merge requests found
// Test for the named return value optimization, this time with inlining.
// { dg-do run }
// { dg-options -O2 }
int c;
int d;
struct A
{
A() { ++c; }
A(const A&) { ++c; };
~A() { ++d; }
};
inline A f ()
{
A a;
return a;
}
int main ()
{
{
A a = f ();
}
return !(c == 1 && c == d);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment