From: Richard Biener Date: Thu, 17 Nov 2016 12:39:24 +0000 (+0000) Subject: re PR c++/78383 (label as values ICE with C++ lambda) X-Git-Tag: basepoints/gcc-8~3053 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b05c3fd684219cde701d995c88277ced21dbc3b5;p=thirdparty%2Fgcc.git re PR c++/78383 (label as values ICE with C++ lambda) 2016-11-17 Richard Biener PR middle-end/78383 * tree-cfgcleanup.c (cleanup_control_flow_bb): Do not turn non-local goto into CFG. From-SVN: r242543 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e07caaa26234..0fb592a624d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-11-17 Richard Biener + + PR middle-end/78383 + * tree-cfgcleanup.c (cleanup_control_flow_bb): Do not turn + non-local goto into CFG. + 2016-11-17 Richard Biener * common.opt (ftree-loop-if-convert-stores): Mark as preserved for diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index 21873f8d516c..fe22ed309e4a 100644 --- a/gcc/tree-cfgcleanup.c +++ b/gcc/tree-cfgcleanup.c @@ -230,6 +230,8 @@ cleanup_control_flow_bb (basic_block bb, bool first_p) edges which do not go to the right block. For the one edge which goes to the right block, fix up its flags. */ label = TREE_OPERAND (gimple_goto_dest (stmt), 0); + if (DECL_CONTEXT (label) != cfun->decl) + return retval; target_block = label_to_block (label); for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); ) {