ipa/107897 - avoid property verification ICE after error

Message ID 20221129092523.7E43313428@imap2.suse-dmz.suse.de
State Repeat Merge
Headers
Series ipa/107897 - avoid property verification ICE after error |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Richard Biener Nov. 29, 2022, 9:25 a.m. UTC
  The target clone pass is the only small IPA pass that doesn't disable
itself after errors but has properties whose verification can fail
because we cut off build SSA passes after errors.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

	PR ipa/107897
	* multiple_target.cc (pass_target_clone::gate): Disable
	after errors.
---
 gcc/multiple_target.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gcc/multiple_target.cc b/gcc/multiple_target.cc
index 77e0f21dd05..fd88c22b002 100644
--- a/gcc/multiple_target.cc
+++ b/gcc/multiple_target.cc
@@ -539,7 +539,8 @@  public:
 bool
 pass_target_clone::gate (function *)
 {
-  return true;
+  /* If there were any errors avoid pass property verification errors.  */
+  return !seen_error ();
 }
 
 } // anon namespace