gcc/libmudflap/testsuite/libmudflap.c++/pass66-frag.cxx
Jakub Jelinek 2d18853048 re PR tree-optimization/37568 (ICE returning a struct)
PR c++/37568
	* semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
	setting it to error_mark_node.

	* testsuite/libmudflap.c++/pass66-frag.cxx: New test.

From-SVN: r141010
2008-10-09 22:15:17 +02:00

18 lines
150 B
C++

// PR c++/37568
// { dg-do compile }
// { dg-options "-fmudflap -O" }
struct A
{
int i;
};
A
foo ()
{
A a = { 1 };
return a;
}
A a = foo ();