https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68672
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed Mar 30 12:27:12 2016 New Revision: 234547 URL: https://gcc.gnu.org/viewcvs?rev=234547&root=gcc&view=rev Log: Backported from mainline 2016-02-12 Jakub Jelinek <ja...@redhat.com> PR ipa/68672 * ipa-split.c (split_function): Compute retval early in all cases if split_part_return_p and return_bb is not EXIT. Remove all clobber stmts and reset all debug stmts that refer to SSA_NAMEs defined in split part, except if it is retval, in that case replace the old retval with the lhs of the call to the split part. * g++.dg/ipa/pr68672-1.C: New test. * g++.dg/ipa/pr68672-2.C: New test. * g++.dg/ipa/pr68672-3.C: New test. Added: branches/gcc-5-branch/gcc/testsuite/g++.dg/ipa/pr68672-1.C branches/gcc-5-branch/gcc/testsuite/g++.dg/ipa/pr68672-2.C branches/gcc-5-branch/gcc/testsuite/g++.dg/ipa/pr68672-3.C Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/ipa-split.c branches/gcc-5-branch/gcc/testsuite/ChangeLog