re PR c++/32992 (Incorrect code generated for anonymous union and return)
authorJakub Jelinek <jakub@redhat.com>
Wed, 15 Aug 2007 12:08:42 +0000 (14:08 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 15 Aug 2007 12:08:42 +0000 (14:08 +0200)
commit59fe92745a5360e7771f9ca0b86301ff6ddb2ac1
treedaf776af0f24665a9da545d0d072b17b91ce13ed
parent9bf5a5e86cc0d361ab73e0386b44adc7c7d00db5
re PR c++/32992 (Incorrect code generated for anonymous union and return)

PR c++/32992
* typeck.c (check_return_expr): Don't NRV optimize vars in
anonymous unions.
* decl.c (finish_function): Comment fix.

* g++.dg/opt/nrv14.C: New test.

From-SVN: r127510
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/nrv14.C [new file with mode: 0644]