https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103304
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is a bug in your program, combined with a bug in libstdc++ that allows
your invalid code to compile.
You have included <ctgmath> but then called fma and fmaf unqualified, which is
invalid. If you include <ctgmath> then they are only guaranteed to be defined
in namespace std. What happens is that you call ::fma which is the libc version
that takes double arguments. To get the overload for float arguments you need
to call std::fma (either using a qualified name, or following using std::fma or
using namespace std).
*** This bug has been marked as a duplicate of bug 89855 ***