https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68672
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Feb 12 11:57:54 2016 New Revision: 233374 URL: https://gcc.gnu.org/viewcvs?rev=233374&root=gcc&view=rev Log: PR ipa/68672 * ipa-split.c (split_function): Don't compute/use main_part_return_p. Compute retval and retbnd 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: trunk/gcc/testsuite/g++.dg/ipa/pr68672-1.C trunk/gcc/testsuite/g++.dg/ipa/pr68672-2.C trunk/gcc/testsuite/g++.dg/ipa/pr68672-3.C Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-split.c trunk/gcc/testsuite/ChangeLog