This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
middle-end/3474: __builtin_sqrtf calls sqrtf
- To: gcc-gnats at gcc dot gnu dot org
- Subject: middle-end/3474: __builtin_sqrtf calls sqrtf
- From: nathan at codesourcery dot com
- Date: 29 Jun 2001 09:41:56 -0000
- Cc: wolfgang dot bangerth at iwr dot uni-heidelberg dot de
- Reply-To: nathan at codesourcery dot com
>Number: 3474
>Category: middle-end
>Synopsis: __builtin_sqrtf calls sqrtf
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 29 02:46:13 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Nathan
>Release: 3.0
>Organization:
>Environment:
sparc-sun-solaris2.7
>Description:
the builtin __builtin_sqrtf expands to code
which calls sqrtf. sqrtf is not available on all systems.
In particular it is not available on Solaris.
__builtin_sqrtf is used by libstdc++'s implementation of
float std::sqrt (float);
I attach a sample source file, and the assembler output
nathan@manao:716>gcc -v -S builtin.c
Reading specs from /usr/local/egcs/sparc-SunOS-5/lib/gcc-lib/sparc-sun-solaris2.7/3.0/specs
Configured with: ../gcc-3.0/configure --prefix=/usr/local/egcs --exec-prefix=/usr/local/egcs/sparc-SunOS-5 --with-ld=/usr/local/egcs/sparc-SunOS-5/bin/ld --with-as=/usr/local/egcs/sparc-SunOS-5/bin/as
Thread model: posix
gcc version 3.0
/usr/local/egcs/sparc-SunOS-5/lib/gcc-lib/sparc-sun-solaris2.7/3.0/cc1 -lang-c -std=c89 -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=0 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc builtin.c -quiet -dumpbase builtin.c -ansi -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -ansi -version -o builtin.s
GNU CPP version 3.0 (cpplib) (sparc)
GNU C version 3.0 (sparc-sun-solaris2.7)
compiled by GNU C version 3.0.
ignoring nonexistent directory "/usr/local/egcs/sparc-SunOS-5/sparc-sun-solaris2.7/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/local/egcs/sparc-SunOS-5/lib/gcc-lib/sparc-sun-solaris2.7/3.0/include
/usr/include
End of search list.
builtin.c:2: warning: no previous prototype for `foo'
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="builtin.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="builtin.c"
ZmxvYXQgZm9vIChmbG9hdCBmKQp7CiAgcmV0dXJuIF9fYnVpbHRpbl9zcXJ0ZiAoZik7Cn0K