projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edf5cd1
)
re PR rtl-optimization/6189 (Regression from 3.0.x: g++ -O3 generates wrong code)
author
Jason Merrill
<jason@gcc.gnu.org>
Tue, 9 Apr 2002 17:02:43 +0000
(13:02 -0400)
committer
Jason Merrill
<jason@gcc.gnu.org>
Tue, 9 Apr 2002 17:02:43 +0000
(13:02 -0400)
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
gcc/testsuite/g++.dg/opt/nrv3.C
[new file with mode: 0644]
patch
|
blob
diff --git a/gcc/testsuite/g++.dg/opt/nrv3.C
b/gcc/testsuite/g++.dg/opt/nrv3.C
new file mode 100644
(file)
index 0000000..
2ec5977
--- /dev/null
+++ b/
gcc/testsuite/g++.dg/opt/nrv3.C
@@ -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;
+}