Skip to content
Snippets Groups Projects
Commit a7698c0e authored by Marek Polacek's avatar Marek Polacek
Browse files

c++: Add test for Core issue 1376 [PR52202]

As Jens says in the PR, we handle this correctly.

gcc/testsuite/ChangeLog:

	PR c++/52202
	* g++.dg/cpp0x/rv-life.C: New test.
parent 8cac6af6
No related branches found
No related tags found
No related merge requests found
// Core 1376
// PR c++/52202
// { dg-do run { target c++11 } }
extern "C" void abort();
bool x;
struct T { ~T() { if (!x) abort (); } };
int main()
{
T&& r = static_cast<T&&>(T());
x = true;
}
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