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

--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Also note that the dominance check is written the wrong way, so it only passes
for first BB in the function

diff --git a/gcc/ipa-sra.cc b/gcc/ipa-sra.cc
index 96b020fb2dd..6b2df2f3ff0 100644
--- a/gcc/ipa-sra.cc
+++ b/gcc/ipa-sra.cc
@@ -2403,8 +2403,8 @@ process_scan_results (cgraph_node *node, struct function
*fun,
                pdoms_calculated = true;
              }
            if (dominated_by_p (CDI_POST_DOMINATORS,
-                               gimple_bb (call_stmt),
-                               single_succ (ENTRY_BLOCK_PTR_FOR_FN (fun))))
+                               single_succ (ENTRY_BLOCK_PTR_FOR_FN (fun))
+                               gimple_bb (call_stmt)))
              csum->m_arg_flow[argidx].safe_to_import_accesses = true;
          }

Reply via email to