summaryrefslogtreecommitdiff
path: root/libmudflap/testsuite
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-09 20:15:17 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-09 20:15:17 +0000
commitd7daeaeb94f8d7c416dc6f9fe7950ee112f44017 (patch)
treeca64d416e627764761b0a356641e582bd975140c /libmudflap/testsuite
parentfc6ce27c03b66a30e70293d4a4ebed684a5065df (diff)
downloadgcc-d7daeaeb94f8d7c416dc6f9fe7950ee112f44017.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141010 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap/testsuite')
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass66-frag.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/libmudflap/testsuite/libmudflap.c++/pass66-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass66-frag.cxx
new file mode 100644
index 00000000000..989c7ca6f1c
--- /dev/null
+++ b/libmudflap/testsuite/libmudflap.c++/pass66-frag.cxx
@@ -0,0 +1,17 @@
+// PR c++/37568
+// { dg-do compile }
+// { dg-options "-fmudflap -O" }
+
+struct A
+{
+ int i;
+};
+
+A
+foo ()
+{
+ A a = { 1 };
+ return a;
+}
+
+A a = foo ();