summaryrefslogtreecommitdiff
path: root/libmudflap
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
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')
-rw-r--r--libmudflap/ChangeLog5
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass66-frag.cxx17
2 files changed, 22 insertions, 0 deletions
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog
index b09f9440d5f..9214759b304 100644
--- a/libmudflap/ChangeLog
+++ b/libmudflap/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/37568
+ * testsuite/libmudflap.c++/pass66-frag.cxx: New test.
+
2008-09-26 Peter O'Gorman <pogma@thewrittenword.com>
Steve Ellcey <sje@cup.hp.com>
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 ();