https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78692
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed Dec 7 19:10:50 2016 New Revision: 243377 URL: https://gcc.gnu.org/viewcvs?rev=243377&root=gcc&view=rev Log: PR c++/78692 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Set lhs var to lhs of new_stmt right before noreturn handling rather than to lhs of e->call_stmt early. * g++.dg/torture/pr78692.C: New test. Added: trunk/gcc/testsuite/g++.dg/torture/pr78692.C Modified: trunk/gcc/ChangeLog trunk/gcc/cgraph.c trunk/gcc/testsuite/ChangeLog