https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119498
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Alfie Richards <alfiericha...@gcc.gnu.org>: https://gcc.gnu.org/g:5abac04ffc7cc877ff5e1fa6562923b7b05b8289 commit r16-2066-g5abac04ffc7cc877ff5e1fa6562923b7b05b8289 Author: Alfie Richards <alfie.richa...@arm.com> Date: Thu Feb 13 15:59:43 2025 +0000 c++: Fix FMV return type ambiguation Add logic for the case of two FMV annotated functions with identical signature other than the return type. Previously this was ignored, this changes the behavior to emit a diagnostic. gcc/cp/ChangeLog: PR c++/119498 * decl.cc (duplicate_decls): Change logic to not always exclude FMV annotated functions in cases of return type non-ambiguation. gcc/testsuite/ChangeLog: PR c++/119498 * g++.target/aarch64/pr119498.C: New test.