re PR rtl-optimization/6189 (Regression from 3.0.x: g++ -O3 generates wrong code)

PR optimization/6189
        * semantics.c (genrtl_start_function): Don't free
        DECL_SAVED_FUNCTION_DATA for inline functions.

[[Split portion of a mixed commit.]]

From-SVN: r52083.2
This commit is contained in:
Jason Merrill 2002-04-09 13:02:43 -04:00
parent edf5cd1d1d
commit 02f136ee0d
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
// PR optimization/6189
// Bug: we forgot about foo's nrv after writing it out.
// { dg-options -O3 }
// { dg-do run }
struct A
{
int i;
};
A foo ()
{
A a;
a.i = 42;
return a;
}
int main()
{
A b = foo();
return b.i != 42;
}