]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: Fix FMV return type ambiguation
authorAlfie Richards <alfie.richards@arm.com>
Thu, 13 Feb 2025 15:59:43 +0000 (15:59 +0000)
committerAlfie Richards <alfie.richards@arm.com>
Mon, 7 Jul 2025 15:20:53 +0000 (15:20 +0000)
commit5abac04ffc7cc877ff5e1fa6562923b7b05b8289
tree60e2407fdc9ad616a1bbb9014e4b6ff9079d11de
parent8abc2e66be72a34db8c3cc97e4fbd90b7abae61d
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.
gcc/cp/decl.cc
gcc/testsuite/g++.target/aarch64/pr119498.C [new file with mode: 0644]