Commit 77eb5950 by Seongbae Park Committed by Seongbae Park

re PR tree-optimization/30590 (tree-nrv optimization clobbers return variable)

2007-03-19  Seongbae Park <seongbae.park@gmail.com>

	PR tree-optimization/30590
	* g++.dg/opt/pr30590.C: New testcase.

From-SVN: r123087
parent caaf5345
2007-03-19 Seongbae Park <seongbae.park@gmail.com>
PR tree-optimization/30590
* g++.dg/opt/pr30590.C: New testcase.
2007-03-20 Jakub Jelinek <jakub@redhat.com>
PR c/30762
/* { dg-do run } */
/* { dg-options "-O" } */
struct test
{
int type;
char buffer[4242]; /* should trigger pass-by-reference */
};
int flag = 0;
struct test
reset (void)
{
struct test retval;
retval.type = 1;
return retval;
}
struct test
test (void)
{
struct test result;
result.type = 0;
for (int i = 0; i < 2; ++i)
{
struct test candidate = reset ();
if (flag)
result = candidate;
}
return result;
}
int
main (void)
{
struct test result = test ();
return result.type;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment