https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68874
--- Comment #1 from vries at gcc dot gnu.org --- Created attachment 37009 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37009&action=edit tentative patch This tentative patch introduces a prev variable (maintained in NEXT_PASS) and uses that to get to the previous pass instance in PUSH_INSERT_PASSES_WITHIN. Note that this ignores the pass argument to PUSH_INSERT_PASSES_WITHIN, so we could go to the point of removing it: ... NEXT_PASS (pass_build_ssa_passes); PUSH_INSERT_PASSES_WITHIN () NEXT_PASS (pass_fixup_cfg); NEXT_PASS (pass_init_datastructures); NEXT_PASS (pass_build_ssa); POP_INSERT_PASSES () ... NEXT_PASS (pass_build_ssa_passes); PUSH_INSERT_PASSES_WITHIN () NEXT_PASS (pass_ubsan); NEXT_PASS (pass_early_warn_uninitialized); NEXT_PASS (pass_nothrow); POP_INSERT_PASSES () ...