gcc/config/rs6000/aix51.h and gcc/config/rs6000/aix52.h both define TARGET_C99_FUNCTIONS. This seems to be wrong for AIX 5.1: it has xxxl functions, but not xxxf ones.
Source code: === CUT === extern double sqrt(double); float f(float x) { return sqrt(x); } int main() { return f(1.0f) != 1.0f; } === CUT === "gcc -v" output: === CUT === Reading specs from /bmc/moe/lib/gcc/powerpc-ibm-aix5.1.0.0/3.4.3/specs Configured with: /depot/gnu/gcc-3.4.3/configure --prefix=/bmc/moe --srcdir=/depot/gnu/gcc-3.4.3 --exec-prefix=/bmc/moe --with-local-prefix=/bmc/moe --enable-shared --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-threads=posix --with-x --enable-java-awt=xlib --disable-nls Thread model: aix gcc version 3.4.3 === CUT === "oslevel -r" output: 5100-04 "lslpp -l bos.adt.libm" output: === CUT === Fileset Level State Description ---------------------------------------------------------------------------- Path: /usr/lib/objrepos bos.adt.libm 5.1.0.25 COMMITTED Base Application Development Math Library === CUT === "gcc <file> -O -lm" output: ld: 0711-317 ERROR: Undefined symbol: .sqrtf ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: ld returned 8 exit status The problem becomes even worse for C++ code: libstdc++ correctly detects that (e.g.) sqrtf() is missing, and generates a stub that calls sqrt(). But the compiler converts that sqrt() call back into sqrtf(), resulting in infinite recursion! The following example triggers this: === CUT === #include <cmath> int main() { return std::sqrt(1.0f) != 1.0f; } === CUT === -- Summary: TARGET_C99_FUNCTIONS is wrongly defined on AIX 5.1 Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: lmakhlis at bmc dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc-ibm-aix5.1.0.0 GCC host triplet: powerpc-ibm-aix5.1.0.0 GCC target triplet: powerpc-ibm-aix5.1.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22083