https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101419
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> --- I think none of NEXT_PASS (pass_complete_unrolli); NEXT_PASS (pass_backprop); NEXT_PASS (pass_phiprop); NEXT_PASS (pass_forwprop); are useful for objsize so IMHO we should move pass_object_sizes earlier. CCP and it's into SSA are probably useful though. Like the following (untested): diff --git a/gcc/passes.def b/gcc/passes.def index 945d2bc797c..fd38e1f2d8e 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -194,14 +194,14 @@ along with GCC; see the file COPYING3. If not see They ensure memory accesses are not indirect wherever possible. */ NEXT_PASS (pass_strip_predict_hints, false /* early_p */); NEXT_PASS (pass_ccp, true /* nonzero_p */); - NEXT_PASS (pass_post_ipa_warn); /* After CCP we rewrite no longer addressed locals into SSA form if possible. */ + NEXT_PASS (pass_object_sizes, false /* insert_min_max_p */); + NEXT_PASS (pass_post_ipa_warn); NEXT_PASS (pass_complete_unrolli); NEXT_PASS (pass_backprop); NEXT_PASS (pass_phiprop); NEXT_PASS (pass_forwprop); - NEXT_PASS (pass_object_sizes, false /* insert_min_max_p */); /* pass_build_alias is a dummy pass that ensures that we execute TODO_rebuild_alias at this point. */ NEXT_PASS (pass_build_alias);