projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed89de9
)
re PR c++/15461 (ICE due to NRV and inlining)
author
Jason Merrill
<jason@gcc.gnu.org>
Wed, 25 Aug 2004 15:16:36 +0000
(11:16 -0400)
committer
Jason Merrill
<jason@gcc.gnu.org>
Wed, 25 Aug 2004 15:16:36 +0000
(11:16 -0400)
PR c++/15461
* semantics.c (nullify_returns_r): Replace a DECL_STMT
for the NRV with an INIT_EXPR.
From-SVN: r86552
gcc/testsuite/g++.dg/opt/nrv7.C
[new file with mode: 0644]
patch
|
blob
diff --git a/gcc/testsuite/g++.dg/opt/nrv7.C
b/gcc/testsuite/g++.dg/opt/nrv7.C
new file mode 100644
(file)
index 0000000..
c5034ec
--- /dev/null
+++ b/
gcc/testsuite/g++.dg/opt/nrv7.C
@@ -0,0
+1,13
@@
+// PR c++/15461
+
+struct A {
+ int i;
+};
+
+inline A foo () {
+ int j = 1;
+ A a = { j };
+ return a;
+}
+
+A tv = foo();