diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-10-09 22:15:17 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-10-09 22:15:17 +0200 |
commit | 2d188530483c739165beb1f2e0c96d27fbae8421 (patch) | |
tree | ca64d416e627764761b0a356641e582bd975140c /libmudflap | |
parent | 1692ae7eda60ea567bcd8e8bae40b6f20db5d82a (diff) | |
download | gcc-2d188530483c739165beb1f2e0c96d27fbae8421.tar.gz |
re PR tree-optimization/37568 (ICE returning a struct)
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.
From-SVN: r141010
Diffstat (limited to 'libmudflap')
-rw-r--r-- | libmudflap/ChangeLog | 5 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.c++/pass66-frag.cxx | 17 |
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 (); |