Hi update_escape_summary_1 has thinko where it compues proper min_flags but then stores original value (ignoring the fact whether there was a dereference in the escape point).
Bootstrapped/regtested and comitted. PR ipa/103432 * ipa-modref.c (update_escape_summary_1): Fix handling of min_flags. 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); }