[Bug middle-end/21282] [4.1 Regression] Converting floor into lfloor built-in function
uros at kss-loka dot si
gcc-bugzilla@gcc.gnu.org
Fri Apr 29 20:48:00 GMT 2005
------- Additional Comments From uros at kss-loka dot si 2005-04-29 20:48 -------
(In reply to comment #5)
> Hmm, even though floor is C99, some libc (or in this case newlib) don't have full
> TARGET_C99_FUNCTIONS support.
Andrew, did you mean floorf in your comment?
The problem is that (int)floor(float) is converted in BUILT_IN_LFLOORF, and when
there is no lfloor{si,di}2 expander present, it falls back to BUILT_IN_FLOORF.
However, BUILT_IN_FLOORF is enabled only for TARGET_C99_FUNCTIONS, so
(int)floor(float) conversion (in convert.c source) to BUILT_IN_LFLOORF should be
performed only when TARGET_C99_FUNCTIONS is set.
floor() is standard in libc, so I'm almost sure that changing parameter of foo()
in comment #0 from float to double shouldn't produce a segfault.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21282
More information about the Gcc-bugs
mailing list