------- 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