public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR88448
@ 2018-12-11 11:11 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2018-12-11 11:11 UTC (permalink / raw)
  To: gcc-patches


The following should fix PR88448, I've reverted the semantics changing
part of the gimple_assign_set_rhs_* previous change settling for
an alternate fix for the tree-complex.c issue.

Bootstrap & regtest in progress on x86_64-unknown-linux-gnu.

Richard.

2018-12-11  Richard Biener  <rguenther@suse.de>

	PR middle-end/88448
	PR middle-end/88415
	* gimple.c (gimple_assign_set_rhs_with_ops): Revert previous
	change.
	* tree-complex.c (update_complex_assignment): Properly transfer
	or clean EH info around gimple_assign_set_rhs_with_ops.

Index: gcc/gimple.c
===================================================================
--- gcc/gimple.c	(revision 266975)
+++ gcc/gimple.c	(working copy)
@@ -1752,7 +1752,7 @@ gimple_assign_set_rhs_with_ops (gimple_s
   if (new_rhs_ops > 2)
     gimple_assign_set_rhs3 (stmt, op3);
   if (stmt != old_stmt)
-    gsi_replace (gsi, stmt, true);
+    gsi_replace (gsi, stmt, false);
 }
 
 
Index: gcc/tree-complex.c
===================================================================
--- gcc/tree-complex.c	(revision 266975)
+++ gcc/tree-complex.c	(working copy)
@@ -698,12 +698,11 @@ update_complex_components_on_edge (edge
 static void
 update_complex_assignment (gimple_stmt_iterator *gsi, tree r, tree i)
 {
-  gimple *stmt;
-
+  gimple *old_stmt = gsi_stmt (*gsi);
   gimple_assign_set_rhs_with_ops (gsi, COMPLEX_EXPR, r, i);
-  stmt = gsi_stmt (*gsi);
+  gimple *stmt = gsi_stmt (*gsi);
   update_stmt (stmt);
-  if (maybe_clean_eh_stmt (stmt))
+  if (maybe_clean_or_replace_eh_stmt (old_stmt, stmt))
     bitmap_set_bit (need_eh_cleanup, gimple_bb (stmt)->index);
 
   update_complex_components (gsi, gsi_stmt (*gsi), r, i);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-11 11:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11 11:11 [PATCH] Fix PR88448 Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).