https://gcc.gnu.org/g:fb1ba48f557acc89f0616d330c8ef5caf613aff7
commit r16-1677-gfb1ba48f557acc89f0616d330c8ef5caf613aff7 Author: Martin Jambor <mjam...@suse.cz> Date: Wed Jun 25 16:48:44 2025 +0200 Mark rtl_avoid_store_forwarding functions final override It is customary to mark the gate and execute functions of the classes representing passes as final override but this is missing in pass_rtl_avoid_store_forwarding. This patch adds it which also silences a clang warning about it. gcc/ChangeLog: 2025-06-24 Martin Jambor <mjam...@suse.cz> * avoid-store-forwarding.cc (class pass_rtl_avoid_store_forwarding): Mark member function gate as final override. Diff: --- gcc/avoid-store-forwarding.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/avoid-store-forwarding.cc b/gcc/avoid-store-forwarding.cc index 6825d0426ecc..37e095316c93 100644 --- a/gcc/avoid-store-forwarding.cc +++ b/gcc/avoid-store-forwarding.cc @@ -80,12 +80,12 @@ public: {} /* opt_pass methods: */ - virtual bool gate (function *) + virtual bool gate (function *) final override { return flag_avoid_store_forwarding && optimize >= 1; } - virtual unsigned int execute (function *) override; + virtual unsigned int execute (function *) final override; }; // class pass_rtl_avoid_store_forwarding /* Handler for finding and avoiding store forwardings. */