https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78692
--- Comment #6 from Thomas Schwinge <tschwinge at gcc dot gnu.org> --- Author: tschwinge Date: Mon Dec 11 09:49:25 2017 New Revision: 255538 URL: https://gcc.gnu.org/viewcvs?rev=255538&root=gcc&view=rev Log: [PR c++/83301] cgraph.c segfault Backport trunk r243377: gcc/ 2016-12-07 Jakub Jelinek <ja...@redhat.com> 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. gcc/testsuite/ 2016-12-07 Jakub Jelinek <ja...@redhat.com> PR c++/78692 * g++.dg/torture/pr78692.C: New test. Added: branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr78692.C Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/cgraph.c branches/gcc-6-branch/gcc/testsuite/ChangeLog