From: Richard Biener Date: Mon, 7 Nov 2016 12:26:48 +0000 (+0000) Subject: re PR target/78229 (ICE in redirect_eh_edge_1, at tree-eh.c:2305) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e8ab5cb19b6d93ed4dd1eaf6dbea66da41256926;p=gcc.git re PR target/78229 (ICE in redirect_eh_edge_1, at tree-eh.c:2305) 2016-11-07 Richard Biener PR target/78229 * config/i386/i386.c (ix86_gimple_fold_builtin): Do not adjust EH info. * g++.dg/pr78229.C: New testcase. From-SVN: r241901 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ccd3b4ca62..9714a07dbe0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-11-07 Richard Biener + + PR target/78229 + * config/i386/i386.c (ix86_gimple_fold_builtin): Do not adjust + EH info. + 2016-11-07 Richard Biener PR tree-optimization/78218 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index bffba803eee..a78cf78a201 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -33518,7 +33518,7 @@ ix86_gimple_fold_builtin (gimple_stmt_iterator *gsi) gsi_insert_before (gsi, g, GSI_SAME_STMT); g = gimple_build_assign (gimple_call_lhs (stmt), NOP_EXPR, lhs); gimple_set_location (g, loc); - gsi_replace (gsi, g, true); + gsi_replace (gsi, g, false); return true; } break; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 242b51b3764..06798a9a176 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-11-07 Richard Biener + + PR target/78229 + * g++.dg/pr78229.C: New testcase. + 2016-11-07 Richard Biener PR tree-optimization/78218 diff --git a/gcc/testsuite/g++.dg/pr78229.C b/gcc/testsuite/g++.dg/pr78229.C new file mode 100644 index 00000000000..a52141b6b83 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr78229.C @@ -0,0 +1,24 @@ +/* { dg-do compile { target x86_64-*-* i?86-*-* } } */ +/* { dg-options "-O2 -mbmi -w" } */ + +void a(); +inline int b(int c) { + int d = c; + return __builtin_ia32_tzcnt_u32(d); +} +struct e {}; +int f, g, h; +void fn3() { + float j; + &j; + { + e k; + while (h) { + if (g == 0) + continue; + int i = b(g); + f = i; + } + a(); + } +}