#include <iostream>
struct foo { ~foo() { std::cout << "destroying!\n"; } };
const foo& func(const foo& a, const foo&) { return a; }
int main()
{
foo x;
const foo& y = func(foo(), x);
std::cout << "main\n";
}
I2luY2x1ZGUgPGlvc3RyZWFtPgpzdHJ1Y3QgZm9vIHsgfmZvbygpIHsgc3RkOjpjb3V0IDw8ICJkZXN0cm95aW5nIVxuIjsgfSB9Owpjb25zdCBmb28mIGZ1bmMoY29uc3QgZm9vJiBhLCBjb25zdCBmb28mKSB7IHJldHVybiBhOyB9CgppbnQgbWFpbigpCnsKICBmb28geDsKICBjb25zdCBmb28mIHkgPSBmdW5jKGZvbygpLCB4KTsKICBzdGQ6OmNvdXQgPDwgIm1haW5cbiI7Cn0=