public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "lmakhlis at bmc dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/22083] New: TARGET_C99_FUNCTIONS is wrongly defined on AIX 5.1 Date: Wed, 15 Jun 2005 20:56:00 -0000 [thread overview] Message-ID: <20050615205609.22083.lmakhlis@bmc.com> (raw) 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
next reply other threads:[~2005-06-15 20:56 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-06-15 20:56 lmakhlis at bmc dot com [this message] 2005-06-17 13:57 ` [Bug target/22083] " dje at gcc dot gnu dot org 2005-06-17 14:02 ` pinskia at gcc dot gnu dot org 2005-06-17 14:43 ` [Bug target/22083] [3.4/4.0/4.1 Regression] " pinskia at gcc dot gnu dot org 2005-06-17 17:22 ` roger at eyesopen dot com 2005-06-17 19:01 ` lmakhlis at bmc dot com 2005-06-17 19:05 ` pinskia at gcc dot gnu dot org 2005-06-17 19:13 ` ebotcazou at gcc dot gnu dot org 2005-06-17 19:32 ` lmakhlis at bmc dot com 2005-06-18 13:26 ` cvs-commit at gcc dot gnu dot org 2005-06-30 21:54 ` [Bug target/22083] [3.4/4.0 " pinskia at gcc dot gnu dot org 2005-07-06 16:28 ` mmitchel at gcc dot gnu dot org 2005-07-08 18:28 ` cvs-commit at gcc dot gnu dot org 2005-07-08 18:33 ` cvs-commit at gcc dot gnu dot org 2005-07-08 18:35 ` dje at gcc dot gnu dot org 2005-07-08 18:38 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20050615205609.22083.lmakhlis@bmc.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).