This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR78229


On Mon, Nov 07, 2016 at 01:20:20PM +0100, Richard Biener wrote:
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk
> and branch.
> 
> Richard.
> 
> 2016-11-07  Richard Biener  <rguenther@suse.de>
> 
> 	PR target/78229
> 	* config/i386/i386.c (ix86_gimple_fold_builtin): Do not adjust
> 	EH info.
> 
> 	* g++.dg/pr78229.C: New testcase.

On the trunk there are 2 other spots with gsi_replace (..., true); in
the same function (and both of them are for functions which also should
really be ECF_NOTHROW, but aren't).

I haven't managed to create a simple testcase.  Anyway, here is a fix,
bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2016-11-07  Jakub Jelinek  <jakub@redhat.com>

	PR target/78229
	* config/i386/i386.c (ix86_gimple_fold_builtin): Do not adjust                                                                             
	EH info even for bzhi and pdep/pext.

--- gcc/config/i386/i386.c.jj	2016-11-07 18:32:14.000000000 +0100
+++ gcc/config/i386/i386.c	2016-11-07 18:46:10.901250307 +0100
@@ -33537,7 +33537,7 @@ ix86_gimple_fold_builtin (gimple_stmt_it
 	  location_t loc = gimple_location (stmt);
 	  gimple *g = gimple_build_assign (gimple_call_lhs (stmt), arg0);
 	  gimple_set_location (g, loc);
-	  gsi_replace (gsi, g, true);
+	  gsi_replace (gsi, g, false);
 	  return true;
 	}
       break;
@@ -33554,7 +33554,7 @@ ix86_gimple_fold_builtin (gimple_stmt_it
 	  arg0 = gimple_call_arg (stmt, 0);
 	  gimple *g = gimple_build_assign (gimple_call_lhs (stmt), arg0);
 	  gimple_set_location (g, loc);
-	  gsi_replace (gsi, g, true);
+	  gsi_replace (gsi, g, false);
 	  return true;
 	}
       break;


	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]