https://gcc.gnu.org/g:1067dd74239aa3efd3489cf8c6216fb9787031ca

commit r13-9685-g1067dd74239aa3efd3489cf8c6216fb9787031ca
Author: Jan Hubicka <hubi...@ucw.cz>
Date:   Mon Jul 29 10:48:34 2024 +0200

    Fix ICE with -fdump-tree-moref
    
    gcc/ChangeLog:
    
            PR ipa/116055
            * ipa-modref.cc (analyze_function): Do not ICE when flags regress.
    
    (cherry picked from commit 98baaa17561ca299eefc98f469f4326e551604c9)

Diff:
---
 gcc/ipa-modref.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gcc/ipa-modref.cc b/gcc/ipa-modref.cc
index d633c8331956..0fa381488e7e 100644
--- a/gcc/ipa-modref.cc
+++ b/gcc/ipa-modref.cc
@@ -3295,7 +3295,8 @@ analyze_function (bool ipa)
                    fprintf (dump_file, "  Flags for param %i improved:",
                             (int)i);
                  else
-                   gcc_unreachable ();
+                   fprintf (dump_file, "  Flags for param %i changed:",
+                            (int)i);
                  dump_eaf_flags (dump_file, old_flags, false);
                  fprintf (dump_file, " -> ");
                  dump_eaf_flags (dump_file, new_flags, true);
@@ -3311,7 +3312,7 @@ analyze_function (bool ipa)
                  || (summary->retslot_flags & EAF_UNUSED))
                fprintf (dump_file, "  Flags for retslot improved:");
              else
-               gcc_unreachable ();
+               fprintf (dump_file, "  Flags for retslot changed:");
              dump_eaf_flags (dump_file, past_retslot_flags, false);
              fprintf (dump_file, " -> ");
              dump_eaf_flags (dump_file, summary->retslot_flags, true);
@@ -3326,7 +3327,7 @@ analyze_function (bool ipa)
                  || (summary->static_chain_flags & EAF_UNUSED))
                fprintf (dump_file, "  Flags for static chain improved:");
              else
-               gcc_unreachable ();
+               fprintf (dump_file, "  Flags for static chain changed:");
              dump_eaf_flags (dump_file, past_static_chain_flags, false);
              fprintf (dump_file, " -> ");
              dump_eaf_flags (dump_file, summary->static_chain_flags, true);

Reply via email to