[Bug ipa/103432] [12 regression] libjxl-0.5 is miscompiled, works fine with -fno-ipa-modref

hubicka at kam dot mff.cuni.cz gcc-bugzilla@gcc.gnu.org
Fri Nov 26 09:14:52 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103432

--- Comment #3 from hubicka at kam dot mff.cuni.cz ---
Caused by stupid thinko (also present in gcc11). I compute right
min_flags but then use wrong value (without dereference applied).
I am testing the following.

diff --git a/gcc/ipa-modref.c b/gcc/ipa-modref.c
index c2edc0d28a6..9e537b04196 100644
--- a/gcc/ipa-modref.c
+++ b/gcc/ipa-modref.c
@@ -4201,7 +4201,7 @@ update_escape_summary_1 (cgraph_edge *e,
          if (ee->direct && !em->direct)
            min_flags = deref_flags (min_flags, ignore_stores);
          struct escape_entry entry = {em->parm_index, ee->arg,
-                                      ee->min_flags,
+                                      min_flags,
                                       ee->direct & em->direct};
          sum->esc.safe_push (entry);
        }


More information about the Gcc-bugs mailing list